Initialisation

Overview

Initialize communication to device.

This group defines all required functions for initialisation of a proper communication to the device.

+ Collaboration diagram for Initialisation:

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 ( )
long LCB_Log ( const char *  pLogMsg)

Write one message into log file.

Parameters
[in]pLogMsgMessage to write into log file
Returns
Error code - ERR_NOERR indicates success
Examples:
capi_dynamic_controller_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, and capi_rotaxys_test.cpp.
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]pDeviceConfigPathAbsolute path to the folder that contains the device configuration files (XML config files - see
[in]PluginSearchPathAn 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_NOERRindicates success
-ERR_NOTDIRif the given config path is not a directory
-ERR_NOENTif 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.