coTfsNmtGetCurrentState (Level 1)
Valid for: CANoe DE • CANoe:lite DE • CANoe4SW DE NoteBefore using this function you have to call coTfsSetNodeId to set the internal node ID.
Function Syntax
Description
This function returns the current device status of the DUT (Device Under Test). The current state is checked with heartbeat and guarding mechanisms. For this, there is first an attempt to configure a heartbeat producer in the DUT (object 0x1017). The heartbeat message contains the current device status. If the DUT should not make a heartbeat producer available, a remote guarding frame is sent to the DUT. The DUT responds with the corresponding guarding response. The procedure is repeated again. The second response is evaluated and contains the device status. The CANopen® specification provides that a CANopen® device supports at least one of the two modes. NoteIf the heartbeat producer is already active, it will be restored at the end.
Parameters
- nmtState: Current device status (data field)
- 0: boot-up
- 4: stopped
- 5: operational
- 127: pre-operational