NNP STM Generic Remote Module git-main
Loading...
Searching...
No Matches
State Machine
Collaboration diagram for State Machine:

Functions

e_nodeState getNodeState (CO_Data *d, UNS8 nodeId)
 To read the state of a node This can be used by the master after having sent a life guard request, of by any node if it is waiting for heartbeat.
 
e_nodeState getState (CO_Data *d)
 Returns the state of the node.
 
void switchCommunicationState (CO_Data *d, s_state_communication *newCommunicationState)
 <BRIEF> switchCommunicationState
 
UNS8 setState (CO_Data *d, e_nodeState newState)
 Change the state of the node.
 
UNS8 getNodeId (CO_Data *d)
 Returns the nodId.
 
void setNodeId (CO_Data *d, UNS8 nodeId)
 Define the node ID. Initialize the object dictionary.
 
void _mode_X_Manual (CO_Data *d)
 Function that user app can overload.
 
void _mode_Y_Manual (CO_Data *d)
 Function that user app can overload.
 
void _waiting (CO_Data *d)
 Function that user app can overload.
 
void _stopped (CO_Data *d)
 Function that user app can overload.
 
void _mode_Patient_Manual (CO_Data *d)
 Function that user app can overload.
 
void _mode_Patient_Control (CO_Data *d)
 Function that user app can overload.
 

Detailed Description

Function Documentation

◆ _mode_Patient_Control()

void _mode_Patient_Control ( CO_Data * d)

Function that user app can overload.

Parameters
*dPointer on a CAN object data structure

Definition at line 369 of file states.c.

◆ _mode_Patient_Manual()

void _mode_Patient_Manual ( CO_Data * d)

Function that user app can overload.

Parameters
*dPointer on a CAN object data structure

Definition at line 362 of file states.c.

◆ _mode_X_Manual()

void _mode_X_Manual ( CO_Data * d)

Function that user app can overload.

Parameters
*dPointer on a CAN object data structure

Definition at line 334 of file states.c.

◆ _mode_Y_Manual()

void _mode_Y_Manual ( CO_Data * d)

Function that user app can overload.

Parameters
*dPointer on a CAN object data structure

Definition at line 341 of file states.c.

◆ _stopped()

void _stopped ( CO_Data * d)

Function that user app can overload.

Parameters
*dPointer on a CAN object data structure

Definition at line 355 of file states.c.

◆ _waiting()

void _waiting ( CO_Data * d)

Function that user app can overload.

Parameters
*dPointer on a CAN object data structure

Definition at line 348 of file states.c.

◆ getNodeId()

UNS8 getNodeId ( CO_Data * d)

Returns the nodId.

Parameters
*dPointer on a CAN object data structure
Returns

Definition at line 250 of file states.c.

Referenced by canDispatch(), and processBOOT().

Here is the caller graph for this function:

◆ getNodeState()

e_nodeState getNodeState ( CO_Data * d,
UNS8 nodeId )

To read the state of a node This can be used by the master after having sent a life guard request, of by any node if it is waiting for heartbeat.

Parameters
*dPointer on a CAN object data structure
nodeIdId of a node
Returns
e_nodeState State of the node corresponding to the nodeId

Definition at line 33 of file lifegrd.c.

◆ getState()

e_nodeState getState ( CO_Data * d)

Returns the state of the node.

Parameters
*dPointer on a CAN object data structure
Returns
The node state

Definition at line 32 of file states.c.

Referenced by main().

Here is the caller graph for this function:

◆ setNodeId()

void setNodeId ( CO_Data * d,
UNS8 nodeId )

Define the node ID. Initialize the object dictionary.

Parameters
*dPointer on a CAN object data structure
nodeIdThe node ID to assign

Definition at line 261 of file states.c.

Referenced by initNodeIDSerialNumber().

Here is the caller graph for this function:

◆ setState()

UNS8 setState ( CO_Data * d,
e_nodeState newState )

Change the state of the node.

Note
All states other than Waiting and Stopped use the same Communication state structure
  • INTEGER8 csBoot_Up 0
  • INTEGER8 csSDO 1
  • INTEGER8 csEmergency 1
  • INTEGER8 csSYNC 1
  • INTEGER8 csHeartbeat 1
  • INTEGER8 csPDO 1
  • INTEGER8 csLSS 0
Parameters
*dPointer on a CAN object data structure
newStateThe state to assign
Returns

Definition at line 161 of file states.c.

Referenced by EnterPatientManualFunc(), EnterPatientOperationFunc(), EnterProduceXManualFunc(), EnterRecordXFunc(), EnterStopStimFunc(), EnterWaitingFunc(), EnterXManualFunc(), EnterYManualFunc(), processNMTstateChange(), setNodeStateToStopped(), start_callback(), StartNodesFunc(), and StopNodesFunc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ switchCommunicationState()

void switchCommunicationState ( CO_Data * d,
s_state_communication * newCommunicationState )

<BRIEF> switchCommunicationState

Prototypes for internals functions

Parameters
d
newCommunicationState

Definition at line 133 of file states.c.

Referenced by setState().

Here is the call graph for this function:
Here is the caller graph for this function: