CANopen Master Documentation
Version 6.08.00
|
The source files of the CANopen Master Protocol Stack can be used to build a shared library for Linux, macOS and Windows. The shared library provides a C code API which is defined in the header file canopen_master.h
, located in the directory source/include
.
A CMake project file for building the CANopen Master library is hosted in the directory source/application/library
.
Create a local build
directory and start the build process within this directory. Make sure to pass the correct toolchain (i.e. GNU Arm Embedded Toolchain) to the CMake process via the parameter -DCMAKE_TOOLCHAIN_FILE
.
The supported services of the CANopen Master library are configured inside the CMakeLists.txt
file. The default configuration is:
The library can be built using either the Linux socketcan driver or the CANpie Server driver. The driver is selected by the configuration symbol CANPIE_DRIVER
. Possible values are:
Symbol CANPIE_DRIVER | Selected driver |
---|---|
socketcan | Linux socketcan driver |
cpserver | CANpie Server |
Please note that the usage of the CANpie Server driver requires an installation of Qt.
The Linux socketcan driver requires that the target is build on a Linux system.
This driver is taken as default if the driver name in omitted.
Events generated by the CANopen Master protocol stack can be signalled in different ways. The event dispatcher is selected by the configuration symbol COM_EVENT_DISPATCHER
. Possible values are:
Symbol COM_EVENT_DISPATCHER | Selected dispatcher |
---|---|
csharp | Dispatcher for C# binding |
mco | Dispatcher for MCo class library, MCoEvent |
qco | Dispatcher for QCo class library, QCoEvent |
If no event dispatcher is defined during configuration the qco
is taken as default.
You must have root
rights for installation. The files are copied to the following locations:
File | Path |
---|---|
canopen_master.h | /usr/local/include |
libcanopen.* | /usr/local/lib |