NMT Master
[Network Management]

Collaboration diagram for NMT Master:
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.
void 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

void 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 

Definition at line 92 of file nmtMaster.c.

References masterSendNMTnodeguard(), and struct_CO_Data::NMTable.

Here is the call graph for this function:

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.

References struct_CO_Data::canHandle, Message::cob_id, Message::len, and Message::rtr.

Referenced by masterRequestNodeState().

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.

References struct_CO_Data::canHandle, Message::cob_id, Message::data, Message::len, and Message::rtr.


Generated on Wed Feb 4 12:17:21 2009 for CanFestival by  doxygen 1.5.6