Sam Grove / Mbed 2 deprecated canopen_masternode

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

State Machine

State Machine

Typedefs

typedef void(* initialisation_t )(CO_Data *)
 Function that user app can overload.

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.
void _initialisation (CO_Data *d)
 Function that user app can overload.
void _preOperational (CO_Data *d)
 Function that user app can overload.
void _operational (CO_Data *d)
 Function that user app can overload.
void _stopped (CO_Data *d)
 Function that user app can overload.
e_nodeState getState (CO_Data *d)
 Returns the state of the node.
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.

Typedef Documentation

typedef void(* initialisation_t)(CO_Data *)

Function that user app can overload.

Definition at line 67 of file states.h.


Function Documentation

void _initialisation ( CO_Data d )

Function that user app can overload.

Parameters:
*dPointer on a CAN object data structure

Definition at line 314 of file states.c.

void _operational ( CO_Data d )

Function that user app can overload.

Parameters:
*dPointer on a CAN object data structure

Definition at line 316 of file states.c.

void _preOperational ( CO_Data d )

Function that user app can overload.

Parameters:
*dPointer on a CAN object data structure

Definition at line 315 of file states.c.

void _stopped ( CO_Data d )

Function that user app can overload.

Parameters:
*dPointer on a CAN object data structure

Definition at line 317 of file states.c.

UNS8 getNodeId ( CO_Data d )

Returns the nodId.

Parameters:
*dPointer on a CAN object data structure
Returns:
Parameters:
d
Returns:

Definition at line 230 of file states.c.

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
Parameters:
d
nodeId
Returns:

Definition at line 57 of file lifegrd.c.

e_nodeState getState ( CO_Data d )

Returns the state of the node.

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

Definition at line 52 of file states.c.

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
d
nodeId

Definition at line 241 of file states.c.

UNS8 setState ( CO_Data d,
e_nodeState  newState 
)

Change the state of the node.

Parameters:
*dPointer on a CAN object data structure
newStateThe state to assign
Returns:
Parameters:
d
newState
Returns:

Definition at line 158 of file states.c.