|
CANopen Master Documentation
Version 6.08.00
|
The object dictionary of the CANopen Master protocol stack can be extended with manufacturer specific objects. These objects are included into the protocol stack when the symbol COM_DICT_MAN is configured as described.
The manufacturer objects are listed inside the file com_mobj.inc which is included into the internal object dictionary. Each object entry is a structure element of type ComDicEntry_s.
The provided code for manufacturer specific objects is an example. The example code adds the following objects:
| Index | Function | Description |
|---|---|---|
| 2000h | ComMob_Idx2000() | Array of UNSIGNED16 values |
| 2001h | ComMob_Idx2001() | Visible String |
#include "com_defs.h"
Include dependency graph for com_mobj.h:Macros | |
| #define | MOB_IDX_2000_SIZE 5 |
| #define | MOB_IDX_2001_SIZE 26 |
Functions | |
| void | ComMob_ParmInit (uint8_t ubNetV) |
| uint8_t | ComMob_Idx2000 (uint8_t ubNetV, uint8_t ubSubIndexV, uint8_t ubReqCodeV) |
| uint8_t | ComMob_Idx2001 (uint8_t ubNetV, uint8_t ubSubIndexV, uint8_t ubReqCodeV) |
| #define MOB_IDX_2000_SIZE 5 |
This symbol defines the number of array elements for the object at index 2000h.
| #define MOB_IDX_2001_SIZE 26 |
This symbol defines the maximum size of the string stored at index 2001h.
| uint8_t ComMob_Idx2000 | ( | uint8_t | ubNetV, |
| uint8_t | ubSubIndexV, | ||
| uint8_t | ubReqCodeV ) |
| [in] | ubNetV | CANopen Network channel |
| ubSubIndexV | sub-index | |
| ubReqCodeV | read / write access |
This function provides an example for read/write access to an array of values (16 bit unsigned). The size of the array is defined via the constant value MOB_IDX_2000_SIZE inside the implementation file.
The function is called by the protocol stack.
| uint8_t ComMob_Idx2001 | ( | uint8_t | ubNetV, |
| uint8_t | ubSubIndexV, | ||
| uint8_t | ubReqCodeV ) |
Index 2001h - Visible string example.
| [in] | ubNetV | CANopen Network channel |
| ubSubIndexV | sub-index | |
| ubReqCodeV | read / write access |
This function provides an example for read/write a visible string with a maximum size of MOB_IDX_2001_SIZE byte.
The function is called by the protocol stack.
| void ComMob_ParmInit | ( | uint8_t | ubNetV | ) |
| [in] | ubNetV | CANopen Network channel |
This function is used to initialise manufacturer variables with default values. The function is called by the protocol stack (refer to ComMgrInit()).
|
extern |