The CANopen Master node service can be used to share data between the CANopen slave device (node) and the CANopen Master protocol stack.
@ eCOM_NET_1
Definition com_defs.h:728
ComStatus_tv ComMgrNodeAdd(uint8_t ubNetV, uint8_t ubNodeIdV, ComNode_ts *ptsNodeV)
void ComNodeSetDefault(ComNode_ts *ptsNodeV)
ComStatus_tv ComNodeGetInfo(uint8_t ubNetV, uint8_t ubNodeIdV)
CANopen device parameter.
Definition com_node.h:110
◆ COM_NODE_DEVICE_NAME_SIZE
#define COM_NODE_DEVICE_NAME_SIZE 32 |
◆ ComNode_ts
CANopen device parameter.
The structure ComNode_s keeps information about a CANopen device with a specific node-ID. In fact it holds a copy of several values from a CANopen slave device.
The elements within this structure are not ordered by index, they are ordered by data type (starting with unit32_t) in order to allow better packing, thus avoiding unaligned access.
◆ ComNodeIdFlag_ts
◆ ComNodeParm_e
- See also
- ComNodeRestore(), ComNodeStore()
This enumeration defines the parameter options for storing / restoring.
Enumerator |
---|
eCOM_NODE_PARM_ALL | Store or restore all parameters
|
eCOM_NODE_PARM_COMMUNICATION | Store or restore communication parameters
|
eCOM_NODE_PARM_APPLICATION | Store or restore application parameters
|
eCOM_NODE_PARM_MANUFACTURER | Store or restore manufacturer parameters
|
◆ ComNodeGetIdFlag()
◆ ComNodeGetInfo()
ComStatus_tv ComNodeGetInfo |
( |
uint8_t | ubNetV, |
|
|
uint8_t | ubNodeIdV ) |
- Parameters
-
[in] | ubNetV | - CANopen Network channel |
[in] | ubNodeIdV | - Node-ID value |
- Returns
- Value of enumeration ComErr_e
The function reads objects 1000h, 1001h, 1008h and 1018h. The device name string (object 1008h) can have a maximum length of 32 byte. All values are copied to the members inside the associated ComNode_ts structure.
This is a non-blocking function, it returns after the SDO transfer is initiated. The user is informed about the result of the transfer via the ComObjectEventReady() function. The message marker value is set to eCOM_OBJECT_MARKER_NODE_GET_INFO.
◆ ComNodeInit()
void ComNodeInit |
( |
uint8_t | ubNetV | ) |
|
◆ ComNodeRestore()
ComStatus_tv ComNodeRestore |
( |
uint8_t | ubNetV, |
|
|
uint8_t | ubNodeIdV, |
|
|
uint8_t | ubParmSelV ) |
- Parameters
-
[in] | ubNetV | - CANopen Network channel |
[in] | ubNodeIdV | - Node-ID value |
[in] | ubParmSelV | - parameter group |
- Returns
- Value of enumeration ComErr_e
The function starts the restore of parameters for the device with the given node-ID ubNodeIdV.
This is a non-blocking function, it returns after the SDO transfer is initiated. The user is informed about the result of the transfer via the ComObjectEventReady() function. The message marker value is set to eCOM_OBJECT_MARKER_NODE_RESTORE.
◆ ComNodeSetDefault()
- Parameters
-
[in] | ptsNodeV | - Pointer to CANopen node |
Initialise CANopen node structure with default values.
◆ ComNodeSetHbProdTime()
ComStatus_tv ComNodeSetHbProdTime |
( |
uint8_t | ubNetV, |
|
|
uint8_t | ubNodeIdV, |
|
|
uint16_t | uwHeartbeatV ) |
- Parameters
-
[in] | ubNetV | - CANopen Network channel |
[in] | ubNodeIdV | - Node-ID value |
[in] | uwHeartbeatV | - Heartbeat value |
- Returns
- Value of enumeration ComErr_e
The function sets object 1017h for the device with the given node-ID ubNodeIdV.
This is a non-blocking function, it returns after the SDO transfer is initiated. The user is informed about the result of the transfer via the ComObjectEventReady() function. The message marker value is set to eCOM_OBJECT_MARKER_NODE_SET_HEARTBEAT.
◆ ComNodeSetIdFlag()
◆ ComNodeStore()
ComStatus_tv ComNodeStore |
( |
uint8_t | ubNetV, |
|
|
uint8_t | ubNodeIdV, |
|
|
uint8_t | ubParmSelV ) |
- Parameters
-
[in] | ubNetV | - CANopen Network channel |
[in] | ubNodeIdV | - Node-ID value |
[in] | ubParmSelV | - parameter group |
- Returns
- Value of enumeration ComErr_e
The function starts the saving of parameters for the device with the given node-ID ubNodeIdV.
This is a non-blocking function, it returns after the SDO transfer is initiated. The user is informed about the result of the transfer via the ComObjectEventReady() function. The message marker value is set to eCOM_OBJECT_MARKER_NODE_STORE.