PCANUSB API函数说明.docx
文本预览下载声明
PCAN-LightAPI FunctionsThe PCAN-Light API provides the following functions for different programming languages:Basic functions valid for all hardware typesFunctionDescriptionInit ?Non-Plug-and-Play hardware,Init ?Plug-and-Play hardware Initializes Non-Plug-and-Play hardware, sets the Baud rate.(初始化 非-即插即用硬件,设置波特率)CloseCloses a previously initialized PCAN hardware.(关闭之前初始化的硬件)WriteTransmits a CAN message.(发送CAN报文)ReadReads a CAN message from the receive queue.(从接收列表读取CAN报文)ReadExReads a CAN message from the receive queue and returns its reception time-stamp.(从接收列表读取CAN报文并显示报文接收时间标记)StatusGets the current status of a PCAN hardware.(获取当前硬件状态)VersionInfoReads information about driver, driver version, and copyright information from the driver.(读取驱动程序版本和版权信息)DLLVersionInfoGets the version information of the used PCAN-Light DLL.(读取DLL版本信息)ResetClientResets the receive and transmit queues of the application.(重置程序的接收和发送列表)MsgFilterConfigures the reception filter.(配置接收过滤器)ResetFilterCloses the reception filter. No more CAN messages will be received.(关闭接收滤波器)SetRcvEventSets the handle of the Receive-Event.(设置接收事件)Additional functions for PCAN-USB(针对PCAN-USB增加的函数)FunctionDescriptionSetUSBDeviceNrSets the USB device number to a specified value.SetUSB2DeviceNrSets the USB device number of a second PCAN-USB adapter to a specified value.GetUSBDeviceNrFetches the device number of the USB hardware.GetUSB2DeviceNrFetches the device number of a second PCAN-USB adapter.1、Close FunctionCloses a previously initialized PCAN hardware.(关闭之前初始化的硬件)SyntaxC / C++DWORD__stdcall CAN_Close();Return valuesCAN_ERR_OK, CAN_ERR_NOVXD2、DLLVersionInfo FunctionGets the version information of the used PCAN-Light DLL.(读取DLL版本信息)SyntaxC / C++DWORD__stdcall CAN_DLLVersionInfo(????LPSTR TextBuff);ParametersTextBuff[Out] Pointer or reference to a text buffer. The returned text has a maximum length of 255 characters.【输出】(输出最大255个字符的文本)Return valuesCAN_ERR_OKRemarksThe DLLVersionInfo function is available since
显示全部