CANopen Bootloader Documentation
Version 4.10.00
Loading...
Searching...
No Matches
cbl_nmt.h File Reference

Detailed Description

The CANopen Network Management (NMT) is used to change the state of a CANopen slave node. In addition, the network state can be monitored via the Network Management Error Control (NMT-EC) service. This module provides the following functionality:

  • NMT state change
  • NMT Error Control (heartbeat)
  • Send boot-up message
  • Callbacks for NMT state change
+ Include dependency graph for cbl_nmt.h:

Macros

#define NODE_STATE_BOOTUP   0x00
 
#define NODE_STATE_STOPPED   0x04
 
#define NODE_STATE_OPERATIONAL   0x05
 
#define NODE_STATE_PREOPERATIONAL   0x7F
 
#define NODE_STATE_BUS_OFF   0xFF
 

Functions

uint8_t CblNmtGetNodeState (void)
 
void CblNmtEventStart (void)
 
void CblNmtEventStop (void)
 
void CblNmtEventPreOperational (void)
 
void CblNmtSetHeartbeatProd (uint16_t uwTimeV)
 

Function Documentation

◆ CblNmtEventPreOperational()

void CblNmtEventPreOperational ( void  )
Note
Adopt this function to the application if required. The function implementation is located in the file cbl_user.c.

This service routine is called when the NMT state machine changes into NMT pre-operational state (NODE_STATE_PREOPERATIONAL). It can be used to perform device specific routines after reception of the NMT command.

◆ CblNmtEventStart()

void CblNmtEventStart ( void  )
Note
Adopt this function to the application if required. The function implementation is located in the file cbl_user.c.

This service routine is called when the NMT state machine changes into NMT operational state (NODE_STATE_OPERATIONAL). It can be used to perform device specific routines after reception of the NMT command.

◆ CblNmtEventStop()

void CblNmtEventStop ( void  )
Note
Adopt this function to the application if required. The function implementation is located in the file cbl_user.c.

This service routine is called when the NMT state machine changes into NMT stopped state (NODE_STATE_STOPPED). It can be used to perform device specific routines after reception of the NMT command.

◆ CblNmtGetNodeState()

uint8_t CblNmtGetNodeState ( void  )
Returns
NMT node state

This function returns the current NMT state of the node. Possible return values are defined by NMT node state.

◆ CblNmtSetHeartbeatProd()

void CblNmtSetHeartbeatProd ( uint16_t  uwTimeV)
Parameters
[in]uwTimeVheartbeat cycle time

This function sets the heartbeat producer time. The parameter uwTimeV denotes the time in milli-seconds. By default, the heartbeat producer time is set to 0 during initialization.