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

Scoringsm

This header file defines constants and data types used for a scoring state machine. It includes header files for standard data types and an events framework. It defines state enumeration values and function prototypes for initializing, posting events to, running, and getting the score from the scoring state machine.

Uploaded by

api-438010548
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)
34 views1 page

Scoringsm

This header file defines constants and data types used for a scoring state machine. It includes header files for standard data types and an events framework. It defines state enumeration values and function prototypes for initializing, posting events to, running, and getting the score from the scoring state machine.

Uploaded by

api-438010548
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

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

Header file for ScoringSM.c


based on the Gen 2 Events and Services Framework

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

#ifndef ScoringSM_H
#define ScoringSM_H

#include <stdint.h>
#include <stdbool.h>

#include "ES_Events.h"

#define START_SCORE 1000

//defining thresholds
#define T1 900
#define T2 700
#define T3 300
#define T4 150

// typedefs for the states


// State definitions for use with the query function
typedef enum
{
PseudoState_Scoring,
Uninitialized_Scoring,
GreenLED,
GreenAndYellowLED,
YellowLED,
YellowAndRedLED,
RedLED,
WaitForEnding,
}ScoringSM_States_t;

// Public Function Prototypes

bool InitScoringSM(uint8_t Priority);


bool PostScoringSM(ES_Event_t ThisEvent);
ES_Event_t RunScoringSM(ES_Event_t ThisEvent);
int GetScore(void);

#endif /* ScoringSM_H */

You might also like