/**************************************************************************** Module T_RunSpud Private Definitions CurrentState ES_Event_t RunSpud(ES_Event_t CurrentEvent) ---------------------- // default to normal entry to new state // based on our current state: // if current state is WaitingSpud // process any events // based on the event type: // if timeout for Query_TIMER times out // set next state to SendCommand // mark that we are taking a transition // consume this event for the upper state machines // if current state is SendCommand // process any events // based on the event type: // if timeout for BYTE_TIMER times out // initialize Query_TIMER // set next state to WaitingSpud // mark that we are taking a transition // consume this event for the upper state machines // if we are making a state transition // Execute exit function for current state // Modify state variable // Execute entry function for new state void StartSpud(ES_Event_t CurrentEvent) -------------------------- // to implement entry to a history state or directly to a substate // you can modify the initialization of the CurrentState variable // otherwise just start in the entry state every time the state machine // is started // call the entry function (if any) for the ENTRY_STATE SpudState_t QuerySpud(void) ----------------------------- // return CurrentState variable static ES_Event_t DuringR_AligningWithRecycling(ES_Event_t Event) ----------- // process ES_ENTRY, ES_ENTRY_HISTORY & ES_EXIT events //initialize BYTE_TIMER // start lower service (SendCommand) // process ES_EXIT event // on exit, give the lower levels a chance to clean up first // run lower service (SendCommand) // process other events // run lower service (SendCommand) //return ReturnEvent