nico@207: nico@207: nico@215: CanFestival: src/states.c File Reference nico@207: nico@207: nico@207: nico@207: nico@207:
nico@207:
nico@207:
nico@207:
nico@215: nico@215:

states.c File Reference

#include "states.h"
nico@215: #include "def.h"
nico@215: #include "dcf.h"
nico@215: #include "nmtSlave.h"
nico@215: nico@215:

nico@215: Include dependency graph for states.c:

nico@215: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: nico@215: nico@210: nico@210:

nico@207: Go to the source code of this file. nico@207: nico@207: etisserant@240: etisserant@240: etisserant@240: nico@207: nico@207: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: nico@207: nico@207:

Defines

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

Functions

void switchCommunicationState (CO_Data *d, s_state_communication *newCommunicationState)
e_nodeState getState (CO_Data *d)
void canDispatch (CO_Data *d, Message *m)
UNS8 setState (CO_Data *d, e_nodeState newState)
UNS8 getNodeId (CO_Data *d)
void setNodeId (CO_Data *d, UNS8 nodeId)
void _initialisation ()
void _preOperational ()
void _operational ()
void _stopped ()
nico@210:


Detailed Description

nico@210:
Author:
Edouard TISSERANT and Francis DUPIN
nico@210:
Date:
Tue Jun 5 09:32:32 2007
nico@210: nico@210:

nico@210: Definition in file states.c.


Define Documentation

etisserant@240: nico@207:
nico@207:
nico@207: nico@207: nico@207: nico@207: nico@207:
#define None
nico@207:
nico@207:
nico@207: nico@207:

nico@207: nico@207:

nico@210: Definition at line 112 of file states.c. nico@210:

nico@210: Referenced by switchCommunicationState(). nico@207:

nico@207:

etisserant@240: nico@207:

nico@207:
nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207:
#define StartOrStop (CommType,
FuncStart,
FuncStop   ) 
nico@207:
nico@207:
nico@207: nico@207:

etisserant@240: Value:

if(newCommunicationState->CommType && !d->CurrentCommunicationState.CommType){\
etisserant@240:                 MSG_WAR(0x9999,#FuncStart, 9999);\
etisserant@240:                 d->CurrentCommunicationState.CommType = 1;\
nico@207:                 FuncStart;\
etisserant@240:         }else if(!newCommunicationState->CommType && d->CurrentCommunicationState.CommType){\
etisserant@240:                 MSG_WAR(0x9999,#FuncStop, 9999);\
etisserant@240:                 d->CurrentCommunicationState.CommType = 0;\
nico@207:                 FuncStop;\
nico@207:         }
nico@207: 
nico@207:

nico@210: Definition at line 102 of file states.c. nico@210:

nico@210: Referenced by switchCommunicationState(). nico@207:

nico@207:

nico@207:


Function Documentation

etisserant@240: nico@207:
nico@207:
nico@207: nico@207: nico@207: nico@207: nico@215: nico@207: nico@207: nico@207: nico@207: nico@207:
void _initialisation (void   ) 
nico@207:
nico@207:
nico@207: nico@207:

nico@207: nico@207:

nico@210: Definition at line 285 of file states.c. nico@207:

nico@207:

etisserant@240: nico@207:

nico@207:
nico@207: nico@207: nico@207: nico@207: nico@215: nico@207: nico@207: nico@207: nico@207: nico@207:
void _operational (void   ) 
nico@207:
nico@207:
nico@207: nico@207:

nico@207: nico@207:

nico@210: Definition at line 287 of file states.c. nico@207:

nico@207:

etisserant@240: nico@207:

nico@207:
nico@207: nico@207: nico@207: nico@207: nico@215: nico@207: nico@207: nico@207: nico@207: nico@207:
void _preOperational (void   ) 
nico@207:
nico@207:
nico@207: nico@207:

nico@207: nico@207:

nico@210: Definition at line 286 of file states.c. nico@207:

nico@207:

etisserant@240: nico@207:

nico@207:
nico@207: nico@207: nico@207: nico@207: nico@215: nico@207: nico@207: nico@207: nico@207: nico@207:
void _stopped (void   ) 
nico@207:
nico@207:
nico@207: nico@207:

nico@207: nico@207:

nico@210: Definition at line 288 of file states.c. nico@207:

nico@207:

etisserant@240: nico@207:

nico@207:
nico@207: nico@207: nico@207: nico@207: nico@215: nico@207: nico@207: nico@207: nico@207: nico@207: nico@215: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207:
void canDispatch (CO_Data d,
Message m 
)
nico@207:
nico@207:
nico@207: nico@207:

nico@210:

Parameters:
nico@210: nico@210: nico@210: nico@210:
d 
m 
nico@210:
nico@210: nico@210:

nico@210: Definition at line 65 of file states.c. nico@210:

etisserant@240: References Message::cob_id, s_state_communication::csHeartbeat, s_state_communication::csPDO, s_state_communication::csSDO, s_state_communication::csSYNC, struct_CO_Data::CurrentCommunicationState, struct_s_timer_entry::d, struct_CO_Data::iam_a_slave, NMT, NODE_GUARD, PDO1rx, PDO1tx, PDO2rx, PDO2tx, PDO3rx, PDO3tx, PDO4rx, PDO4tx, proceedNMTstateChange(), proceedNODE_GUARD(), proceedPDO(), proceedSDO(), proceedSYNC(), SDOrx, SDOtx, SYNC, and SHORT_CAN::w. nico@215:

nico@215: Referenced by canReceiveLoop(), and main(). nico@210:

etisserant@240: Here is the call graph for this function:

etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: nico@210: nico@210: nico@207:
nico@207:

etisserant@240: nico@207:

nico@207:
nico@207: nico@207: nico@207: nico@207: nico@215: nico@207: nico@207: nico@207: nico@207: nico@207:
UNS8 getNodeId (CO_Data d  ) 
nico@207:
nico@207:
nico@207: nico@207:

nico@210:

Parameters:
nico@210: nico@210: nico@210:
d 
nico@210:
nico@210:
Returns:
nico@210: nico@210:

nico@210: Definition at line 224 of file states.c. nico@215:

nico@215: References struct_CO_Data::bDeviceNodeId, and struct_s_timer_entry::d. nico@215:

nico@215: Referenced by initSensor(). nico@207:

nico@207:

etisserant@240: etisserant@240:

etisserant@240:
etisserant@240: etisserant@240: etisserant@240: nico@215: nico@215: nico@207: nico@207: nico@207: nico@207: nico@207:
e_nodeState getState (CO_Data d  ) 
nico@207:
nico@207:
nico@207: nico@207:

nico@210:

Parameters:
nico@210: nico@210: nico@210:
d 
nico@210:
nico@210:
Returns:
nico@210: nico@210:

nico@210: Definition at line 54 of file states.c. nico@215:

nico@215: References struct_s_timer_entry::d, and struct_CO_Data::nodeState. nico@207:

nico@207:

etisserant@240: nico@207:

nico@207:
nico@207: nico@207: nico@207: nico@207: nico@215: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207:
void setNodeId (CO_Data d,
UNS8  nodeId 
)
nico@207:
nico@207:
nico@207: nico@207:

nico@210:

Parameters:
nico@210: nico@210: nico@210: nico@210:
d 
nodeId 
nico@210:
nico@210: nico@210:

nico@210: Definition at line 235 of file states.c. nico@215:

etisserant@240: References struct_CO_Data::bDeviceNodeId, struct_s_timer_entry::d, struct_CO_Data::firstIndex, struct_CO_Data::lastIndex, struct_CO_Data::objdict, s_quick_index::PDO_RCV, s_quick_index::PDO_TRS, td_subindex::pObject, td_indextable::pSubindex, s_quick_index::SDO_SVR, UNS16, UNS32, and UNS8. nico@215:

nico@215: Referenced by InitNodes(), initSensor(), and main(). nico@207:

nico@207:

etisserant@240: nico@207:

nico@207:
nico@207: nico@207: nico@207: nico@207: nico@215: nico@207: nico@207: nico@207: nico@207: nico@207: etisserant@240: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207:
UNS8 setState (CO_Data d,
e_nodeState  newState 
)
nico@207:
nico@207:
nico@207: nico@207:

nico@210:

Parameters:
nico@210: nico@210: nico@210: nico@210:
d 
newState 
nico@210:
nico@210:
Returns:
nico@210: nico@210:

nico@210: Definition at line 138 of file states.c. nico@210:

etisserant@240: References struct_s_timer_entry::d, decompo_dcf(), struct_CO_Data::iam_a_slave, Initialisation, struct_CO_Data::initialisation, struct_CO_Data::nodeState, OD_SUCCESSFUL, Operational, struct_CO_Data::operational, Pre_operational, struct_CO_Data::preOperational, ptrTable, struct_CO_Data::scanIndexOD, Stopped, struct_CO_Data::stopped, switchCommunicationState(), UNS16, and UNS32. nico@215:

nico@215: Referenced by InitNodes(), main(), and proceedNMTstateChange(). nico@210:

etisserant@240: Here is the call graph for this function:

etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: nico@210: nico@210: nico@207:
nico@207:

etisserant@240: nico@207:

nico@207:
nico@207: nico@207: nico@207: nico@207: nico@215: nico@207: nico@207: nico@207: nico@207: nico@207: nico@215: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207:
void switchCommunicationState (CO_Data d,
s_state_communication newCommunicationState 
)
nico@207:
nico@207:
nico@207: nico@207:

nico@210:

Parameters:
nico@210: nico@210: nico@210: nico@210:
d 
newCommunicationState 
nico@210:
nico@210: nico@210:

nico@210: Definition at line 120 of file states.c. nico@210:

etisserant@240: References struct_s_timer_entry::d, heartbeatInit(), heartbeatStop(), None, PDOInit(), PDOStop(), resetSDO(), slaveSendBootUp(), StartOrStop, startSYNC(), and stopSYNC(). nico@210:

nico@210: Referenced by setState(). nico@210:

etisserant@240: Here is the call graph for this function:

etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: nico@210: nico@210: nico@210:
nico@210:

etisserant@240:


Generated on Mon Jul 2 19:10:42 2007 for CanFestival by  nico@207: nico@207: doxygen 1.5.1
nico@207: nico@207: