CANfestival - an open source CANopen framework
NMT Master
[Network Management]
NMT master provides mechanisms that control and monitor the state of nodes and their behavior in the network. More...
Functions | |
UNS8 | masterSendNMTstateChange (CO_Data *d, UNS8 nodeId, UNS8 cs) |
Transmit a NMT message on the network to the slave whose nodeId is node ID. | |
UNS8 | masterSendNMTnodeguard (CO_Data *d, UNS8 nodeId) |
Transmit a NodeGuard message on the network to the slave whose nodeId is node ID. | |
UNS8 | masterRequestNodeState (CO_Data *d, UNS8 nodeId) |
Ask the state of the slave node whose nodeId is node Id. |
Detailed Description
NMT master provides mechanisms that control and monitor the state of nodes and their behavior in the network.
Function Documentation
UNS8 masterRequestNodeState | ( | CO_Data * | d, |
UNS8 | nodeId | ||
) |
Ask the state of the slave node whose nodeId is node Id.
To ask states of all nodes on the network (NMT broadcast), nodeId must be equal to 0
- Parameters:
-
*d Pointer to a CAN object data structure nodeId Id of the slave node d nodeId
- Returns:
Definition at line 94 of file nmtMaster.c.
UNS8 masterSendNMTnodeguard | ( | CO_Data * | d, |
UNS8 | nodeId | ||
) |
Transmit a NodeGuard message on the network to the slave whose nodeId is node ID.
- Parameters:
-
*d Pointer to a CAN object data structure nodeId Id of the slave node
- Returns:
- 0 is returned if the NodeGuard message was send.
- 1 is returned if an error occurs.
- Parameters:
-
d nodeId
- Returns:
Definition at line 71 of file nmtMaster.c.
UNS8 masterSendNMTstateChange | ( | CO_Data * | d, |
UNS8 | Node_ID, | ||
UNS8 | cs | ||
) |
Transmit a NMT message on the network to the slave whose nodeId is node ID.
- Parameters:
-
*d Pointer to a CAN object data structure nodeId Id of the slave node cs The order of state changement
Allowed states :
- cs = NMT_Start_Node // Put the node in operational mode
- cs = NMT_Stop_Node // Put the node in stopped mode
- cs = NMT_Enter_PreOperational // Put the node in pre_operational mode
- cs = NMT_Reset_Node // Put the node in initialization mode
- cs = NMT_Reset_Comunication // Put the node in initialization mode
The mode is changed according to the slave state machine mode :
- initialisation ---> pre-operational (Automatic transition)
- pre-operational <--> operational
- pre-operational <--> stopped
- pre-operational, operational, stopped -> initialisation
- Returns:
- errorcode
- 0 if the NMT message was send
- 1 if an error occurs
- Parameters:
-
d Node_ID cs
- Returns:
Definition at line 46 of file nmtMaster.c.
Generated on Tue Jul 12 2022 17:24:13 by 1.7.2