NNP STM Generic Remote Module git-main
Loading...
Searching...
No Matches
states.c File Reference
#include "data.h"
#include "sysdep.h"

Go to the source code of this file.

Macros

#define StartOrStop(CommType, FuncStart, FuncStop)
 
#define None
 

Functions

void switchCommunicationState (CO_Data *d, s_state_communication *newCommunicationState)
 <BRIEF> switchCommunicationState
 
e_nodeState getState (CO_Data *d)
 Returns the state of the node.
 
void canDispatch (CO_Data *d, Message *m)
 Called by driver/app when receiving messages.
 
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

Date
Created on: Oct 10, 2024
Author
Jerry Ukwela (jeu6@.nosp@m.case.nosp@m..edu)

Definition in file states.c.

Macro Definition Documentation

◆ None

#define None

Definition at line 125 of file states.c.

◆ StartOrStop

#define StartOrStop ( CommType,
FuncStart,
FuncStop )
Value:
if(newCommunicationState->CommType && d->CurrentCommunicationState.CommType == 0){\
MSG_WAR(0x9999,#FuncStart, 9999);\
d->CurrentCommunicationState.CommType = 1;\
FuncStart;\
}else if(!newCommunicationState->CommType && d->CurrentCommunicationState.CommType == 1){\
MSG_WAR(0x9999,#FuncStop, 9999);\
d->CurrentCommunicationState.CommType = 0;\
FuncStop;\
}

Definition at line 115 of file states.c.

Function Documentation

◆ canDispatch()

void canDispatch ( CO_Data * d,
Message * m )

Called by driver/app when receiving messages.

Parameters
*dPointer on a CAN object data structure
*mPointer on a CAN message structure

Definition at line 43 of file states.c.

Here is the call graph for this function: