labbCAN_Bus_API.h File Reference
labbCAN Bus Application Programming Interface More...
This graph shows which files directly or indirectly include this file:
Typedefs | |
typedef long long | dev_hdl |
generic device handle | |
typedef long long | labb_hdl |
generic labbcan API handle | |
Enumerations | |
enum | LCB_CommState { LCB_COMM_STOPPED = 0x02, LCB_COMM_CONFIGURABLE = 0x80, LCB_COMM_OPERATIONAL = 0x01 } |
Communication state identifiers for LCB_SetCommState() More... | |
enum | LCB_EventId { LCB_EVENT_DATA_LINK_LAYER = 2, LCB_EVENT_ERR = 4, LCB_EVENT_DEVICE_EMERGENCY = 5, LCB_EVENT_DEVICE_GUARD = 6 } |
Event identifier returned in EventId when reading event queue via LCB_ReadEventEx(). More... | |
enum | LCB_GuardEventId { NODEGUARD_ERR_OCCURED = 0, NODEGUARD_ERR_RESOLVED, HEARTBEAT_ERR_OCCURED, HEARTBEAT_ERR_RESOLVED, NODESTATE_ERR, NODESTATE_CHANGED } |
Guard event identifier that is returned in the first data field if the event type is LCB_EVENT_DEVICE_GUARD. More... | |
Functions | |
long | LCB_Close () |
Close LabCanBus instance. More... | |
long | LCB_GetCurrentTime (unsigned long *pTime) |
Returns the current local system time as a C like time type. More... | |
long | LCB_GetDevErrMsg (dev_hdl DeviceHandle, unsigned long DevErr, char *pMsgBuf, int MsgBufSize) |
Get the error string for a certain device error message. More... | |
long | LCB_GetDeviceProperty (dev_hdl DeviceHandle, int PropertyId, double *Value) |
Function for reading a device specific property. More... | |
long | LCB_GetDevName (dev_hdl DeviceHandle, char *pNameStringBuf, int StringBufSize) |
Query name of specific device. More... | |
long | LCB_GetErrMsg (long ErrCode, char *pMsgBuf, int MsgBufSize) |
Get descriptive error message for a certain error return code. More... | |
long | LCB_GetExtendedLastErrorString (char *pStringBuf, int StringBufSize) |
If an error occurs, then a function returns an error code. More... | |
long | LCB_GetNodeId (dev_hdl DeviceHandle) |
Query node identifier of specific device Each CANopen device has a unique node identifier that identifies the device on a CAN bus. More... | |
long | LCB_IsSimulated (dev_hdl DeviceHandle) |
Checks if the given DeviceHandle is a simulated device. More... | |
long | LCB_Log (const char *pLogMsg) |
Write one message into log file. More... | |
long | LCB_MakeTime (unsigned short Year, unsigned char Month, unsigned short Day, unsigned char Hour, unsigned char Minute, unsigned char Second, unsigned long *pTime) |
Converts splitted time parameters into a C like time value. More... | |
long | LCB_Open (const char *pDeviceConfigPath, const char *PluginSearchPath) |
Initialize LabCanBus instance. More... | |
long | LCB_ReadDevParam (dev_hdl DeviceHandle, unsigned long DevParamId, void *pReadBuf, unsigned long BufSize, unsigned char AdjustEndian) |
Read certain parameter from device. More... | |
long | LCB_ReadEvent (long *pEventId, long *pData1, long *pData2, long *pData3) |
Try to read one event from the lab event queue. More... | |
long | LCB_ReadEventEx (long *pEventId, dev_hdl *pDeviceHandle, long *pData1, long *pData2, char *pEventString, int EventStringSize) |
Try to read one event from the lab event queue. More... | |
long | LCB_ReadLastDevErr (dev_hdl DeviceHandle, unsigned long *pDevErr) |
Read last device error from a specific device. More... | |
long | LCB_SetCommState (dev_hdl DeviceHandle, unsigned char CommState) |
Set device in a configurable state. More... | |
long | LCB_SetDeviceProperty (dev_hdl DeviceHandle, int PropertyId, double Value) |
Function for setting a device specific property. More... | |
long | LCB_SplitTime (unsigned long Time, unsigned short *pYear, unsigned char *pMonth, unsigned short *pDay, unsigned char *pHour, unsigned char *pMinute, unsigned char *pSecond) |
Splits a time value into its single components. More... | |
long | LCB_Start () |
Start network communication. More... | |
long | LCB_Stop () |
Stop network communication. More... | |
long | LCB_TimeToStr (unsigned long Time, char *pTimeStrBuf, unsigned char BufSize) |
Converts a time value into a string YYYY-MM-DD HH:mm:ss. More... | |
long | LCB_WriteDevParam (dev_hdl DeviceHandle, unsigned long DevParamId, void *pWriteBuf, unsigned long BufSize, unsigned char AdjustEndian) |
Write certain parameter to device. More... | |
Detailed Description
labbCAN Bus Application Programming Interface
- Date
- 2015/09/09