nico@207: nico@207:
nico@207:#include "states.h"
#include "def.h"
#include "dcf.h"
#include "nmtSlave.h"
nico@210: Include dependency graph for states.c:
nico@207: Go to the source code of this file.
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: Definition in file states.c.
#define None | 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:
#define StartOrStop | nico@207:( | nico@207:CommType, | |||
nico@207: | nico@207: | FuncStart, | |||
nico@207: | nico@207: | FuncStop | nico@207:nico@207: | ) | nico@207:nico@207: |
nico@207: Value:
if(newCommunicationState->CommType && !d->CurrentCommunicationState.CommType){\ nico@207: MSG_WAR(0x9999,#FuncStart, 9999);\ nico@207: d->CurrentCommunicationState.CommType = 1;\ nico@207: FuncStart;\ nico@207: }else if(!newCommunicationState->CommType && d->CurrentCommunicationState.CommType){\ nico@207: MSG_WAR(0x9999,#FuncStop, 9999);\ nico@207: d->CurrentCommunicationState.CommType = 0;\ nico@207: FuncStop;\ 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:
void _initialisation | nico@207:( | nico@207:nico@207: | ) | nico@207:nico@207: |
void _operational | nico@207:( | nico@207:nico@207: | ) | nico@207:nico@207: |
void _preOperational | nico@207:( | nico@207:nico@207: | ) | nico@207:nico@207: |
void _stopped | nico@207:( | nico@207:nico@207: | ) | nico@207:nico@207: |
void canDispatch | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | Message * | nico@207:m | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
m |
nico@210: case TIME_STAMP: nico@210:
nico@210: Definition at line 65 of file states.c. nico@210:
nico@210: References proceedNMTstateChange(), proceedNODE_GUARD(), proceedPDO(), proceedSDO(), and proceedSYNC(). nico@210:
nico@210: Here is the call graph for this function:
UNS8 getNodeId | nico@207:( | nico@207:CO_Data * | nico@207:d | nico@207:) | nico@207:nico@207: |
e_nodeState getState | nico@207:( | nico@207:CO_Data * | nico@207:d | nico@207:) | nico@207:nico@207: |
void setNodeId | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:nodeId | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
nodeId |
nico@210: cob_id_client = 0x600 + nodeId;
nico@210: cob_id_server = 0x580 + nodeId;
nico@210: node Id client. As we do not know the value, we put the node Id Server
nico@210: *(UNS8*)d->objdict[offset].pSubindex[3].pObject = nodeId;
nico@210: Initialize the server(s) SDO parameters Remember that only one SDO server is allowed, defined at index 0x1200
nico@210: Initialize the client(s) SDO parameters Nothing to initialize (no default values required by the DS 401) Initialize the receive PDO communication parameters. Only for 0x1400 to 0x1403
nico@210: bDeviceNodeId is defined in the object dictionary. nico@210:
nico@210: Definition at line 235 of file states.c. nico@207:
UNS8 setState | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | e_nodeState | nico@207:newState | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
newState |
nico@210: This will force a second loop for the state switch
nico@210: call user app related state func.
nico@210: end switch case nico@210:
nico@210: Definition at line 138 of file states.c. nico@210:
nico@210: References decompo_dcf(), ptrTable, and switchCommunicationState(). nico@210:
nico@210: Referenced by proceedNMTstateChange(). nico@210:
nico@210: Here is the call graph for this function:
void switchCommunicationState | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | s_state_communication * | nico@207:newCommunicationState | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
newCommunicationState |
nico@210: Definition at line 120 of file states.c. nico@210:
nico@210: References heartbeatInit(), heartbeatStop(), None, resetSDO(), slaveSendBootUp(), StartOrStop, startSYNC(), and stopSYNC(). nico@210:
nico@210: Referenced by setState(). nico@210:
nico@210: Here is the call graph for this function:
nico@210: