|
| NMT (const uint8_t &node_id, const CanDevPtr &can_device) |
| NMT Construct a new NMT object to manage the NMT state of a device. More...
|
|
void | preOperational () |
| preOperational switches the device back into pre-operational state where configuration can occur More...
|
|
void | reset () |
| reset Resets the device and triggers a complete reboot More...
|
|
void | resetCommunication () |
| resetCommunication Resets the communication of a device, setting communication values to their defaults More...
|
|
void | start () |
| start Starts the device by setting the NMT state to operational More...
|
|
void | stop () |
| stop Stops the device by setting the NMT state to stopped More...
|
|
void | update (const CanMsg &msg) |
| update Updates the NMT status with newly received data More...
|
|
The NMT class provides access to NMT functions of the canOpen protocol and keeps the NMT state of canOpen nodes.
NMT is the protocol layer that handles the state of individual nodes. It can be used to set the controlled devices into operational state, shut them down etc. This class provides access to those functions, handles incoming NMT messages and keeps track of the NMT State of the individual nodes.
Definition at line 42 of file NMT.h.
void icl_hardware::canopen_schunk::NMT::update |
( |
const CanMsg & |
msg | ) |
|
update Updates the NMT status with newly received data
- Parameters
-
msg | can message that has been identified as NMT message |
This function updates the NMT State of nodes by parsing received NMT messages.
NMT: AN NMT message with the ID 0x00 is the NMT command message. This is only relevant in case we are a slave node.
NMT ERROR/HEARTBEAT: CAN-ID =1792 + Node ID = Boot Up Message from the devices when they change from initialization to pre operational (payload = 0) This transition is automatic once the device has initialized all its values. If the Heartbeat node guarding is used the device will also send the same message periodically indicating the NMT state in the lower 7 bit of the 1 byte payload. Bit 7 is always 0. The value sent is given in as eNMT_State value. In case the heartbeat time is configured, the heartbeat producer time starts immediately, in case it remains unchanged the time starts after the bootup event. The Heartbeat protocol is used if the heartbeat producer time is unequal 0.
NMT ERROR/NODE GUARDING: With Node Guarding protocol the master (we) poll the device information by sending a remote transmission request to the node The node answers wit CAN-ID = 1792 + Node-ID messages as with the heartbeat. Bit 0..6 are the status as with the heartbeat. Bit 7 is a toggle bit that needs to alternate. Requests are sent in intervals given by the node guarding time. If no response is received within the node life time = node guarding time * lifetime factor the master indicates a "node guarding event" and the device a "life guarding event". If the received status does not match the expected one a "node guarding event" is to be triggered (meaning a fault occurred).
Definition at line 37 of file NMT.cpp.