CONmtGetNodeId
CONmtGetNodeId
Description
This function returns the current CANopen Node-ID of the NMT module.
Prototype
CPU_INT08U CONmtGetNodeId(CO_NMT *nmt);
Parameter | Description |
---|---|
nmt | reference to NMT structure |
Returned Value
>0 The current NMT node ID
=0 An error is detected
Example
The following example shows how to get the node-ID of the CANopen node AppNode:
CPU_INT08U id; : id = CONmtGetNodeId (&(AppNode.Nmt)); if (id == 0) { /* error during reading the node-ID */ } else { /* id holds the node ID */ } :