Overview
Initialize communication to device.
This group defines all required functions for initialisation of a proper communication to the device.
Functions | |
long | LCB_Close () |
Close LabCanBus instance. More... | |
long | LCB_Log (const char *pLogMsg) |
Write one message into log file. More... | |
long | LCB_Open (const char *pDeviceConfigPath, const char *PluginSearchPath) |
Initialize LabCanBus instance. More... | |
long | LCB_Start () |
Start network communication. More... | |
long | LCB_Stop () |
Stop network communication. More... | |
Function Documentation
long LCB_Close | ( | ) |
Close LabCanBus instance.
This call deletes all internal data structures and frees all allocated resources
- Returns
- Error code - ERR_NOERR indicates success
- Examples:
- capi_contiflow_test.cpp, capi_dynamic_controller_test.cpp, capi_event_queue_test.cpp, capi_nemaxys_test.cpp, capi_nemesys4_test.cpp, capi_nemesys_forcemon_test.cpp, capi_nemesys_test.cpp, capi_nemesys_valve_test.cpp, capi_pressure_control_test.cpp, capi_qmixqplus_test.cpp, capi_rotaxys_test.cpp, and labbCAN_CAPI_Close.cpp.
long LCB_Log | ( | const char * | pLogMsg | ) |
Write one message into log file.
- Parameters
-
[in] pLogMsg Message to write into log file
- Returns
- Error code - ERR_NOERR indicates success
long LCB_Open | ( | const char * | pDeviceConfigPath, |
const char * | PluginSearchPath | ||
) |
Initialize LabCanBus instance.
Initializes resources for a LabCanBus instance, connects to LabCanBus and scans for connected devices.
- Parameters
-
[in] pDeviceConfigPath Absolute path to the folder that contains the device configuration files (XML config files - see [in] PluginSearchPath An additional search path, where the QmixSDK searches for device plugins. Normally the SDK searches in the plugins/labbcan folder that is a direct child of your application folder. If your plugins folder is located on a different location, then you should provide a valid path here. See Device Configuration Files for a detailed description of device configuration.
- Return values
-
ERR_NOERR indicates success -ERR_NOTDIR if the given config path is not a directory -ERR_NOENT if no device_properties.xml file exists in the given device configuration directory
- Examples:
- capi_contiflow_test.cpp, capi_dynamic_controller_test.cpp, capi_event_queue_test.cpp, capi_nemaxys_test.cpp, capi_nemesys4_test.cpp, capi_nemesys_forcemon_test.cpp, capi_nemesys_test.cpp, capi_nemesys_valve_test.cpp, capi_pressure_control_test.cpp, capi_qmixqplus_test.cpp, capi_rotaxys_test.cpp, and labbCAN_CAPI_Init.cpp.
long LCB_Start | ( | ) |
Start network communication.
This function sets all connected devices into state operational and enabled. After a call to this function it is possible to access the connected devices.
- Returns
- Error code - ERR_NOERR indicates success
- Examples:
- capi_contiflow_test.cpp, capi_dynamic_controller_test.cpp, capi_event_queue_test.cpp, capi_nemaxys_test.cpp, capi_nemesys4_test.cpp, capi_nemesys_forcemon_test.cpp, capi_nemesys_test.cpp, capi_nemesys_valve_test.cpp, capi_pressure_control_test.cpp, capi_qmixqplus_test.cpp, capi_rotaxys_test.cpp, and labbCAN_CAPI_Init.cpp.
long LCB_Stop | ( | ) |
Stop network communication.
This function stops network communication and closes the CAN device driver. The function should be called by application before LCB_Close();
- Returns
- Error code - ERR_NOERR indicates success
- Examples:
- capi_contiflow_test.cpp, capi_dynamic_controller_test.cpp, capi_event_queue_test.cpp, capi_nemaxys_test.cpp, capi_nemesys4_test.cpp, capi_nemesys_forcemon_test.cpp, capi_nemesys_test.cpp, capi_nemesys_valve_test.cpp, capi_pressure_control_test.cpp, capi_qmixqplus_test.cpp, capi_rotaxys_test.cpp, and labbCAN_CAPI_Close.cpp.