0% found this document useful (0 votes)
35 views1 page

Spihsm

This document defines a header file template for hierarchical state machines (statecharts). It includes an enumerated type for the different master states, function prototypes for running and initializing the state machine, and functions for querying information from east, west, color, frequency, and team.

Uploaded by

api-438120791
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views1 page

Spihsm

This document defines a header file template for hierarchical state machines (statecharts). It includes an enumerated type for the different master states, function prototypes for running and initializing the state machine, and functions for querying information from east, west, color, frequency, and team.

Uploaded by

api-438120791
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

/****************************************************************************

Template header file for Hierarchical Sate Machines AKA StateCharts

****************************************************************************/

#ifndef TopHSMTemplate_H
#define TopHSMTemplate_H

// State definitions for use with the query function


typedef enum { WAITINGINSPI, REGISTERING, ACKNOWLEDGING, GETTEAMINFO, TEAMINFO,
GETGAMESTATUS, GAMESTATUS, GETSCORE, SCORE, GETRECYCLE, RECYCLE } MasterState_t;

// Public Function Prototypes

ES_Event_t RunMasterSM(ES_Event_t CurrentEvent);


void StartMasterSM(ES_Event_t CurrentEvent);
bool PostMasterSM(ES_Event_t ThisEvent);
bool InitMasterSM(uint8_t Priority);
bool QueryEast(void);
bool QueryWest(void);
uint8_t QueryColour(void);
uint32_t QueryFrequency(void);
uint8_t QueryTeam(void);

#endif /*TopHSMTemplate_H */

/*static ES_Event_t DuringStateOne(ES_Event_t Event);


static ES_Event_t DuringWaiting(ES_Event_t Event);
static ES_Event_t DuringReg(ES_Event_t Event);
static ES_Event_t DuringAck(ES_Event_t Event);
static ES_Event_t DuringGti(ES_Event_t Event);
static ES_Event_t DuringTI(ES_Event_t Event);
static ES_Event_t DuringGgs(ES_Event_t Event);
static ES_Event_t DuringGS(ES_Event_t Event);
static ES_Event_t DuringGetScore(ES_Event_t Event);
static ES_Event_t DuringScore(ES_Event_t Event);
static ES_Event_t DuringGR(ES_Event_t Event);
static ES_Event_t DuringRecycle(ES_Event_t Event);*/

You might also like