-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathSelfTest.h
More file actions
35 lines (29 loc) · 773 Bytes
/
SelfTest.h
File metadata and controls
35 lines (29 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef _SELF_TEST_H
#define _SELF_TEST_H
#include "StateMachine.h"
/// @brief SelfTest is a subclass state machine for other self tests to
/// inherit from. The class has common states for all derived classes to
/// share.
class SelfTest : public StateMachine
{
public:
SelfTest(INT maxStates);
virtual void Start() = 0;
void Cancel();
protected:
// State enumeration order must match the order of state method entries
// in the state map.
enum States
{
ST_IDLE,
ST_COMPLETED,
ST_FAILED,
ST_MAX_STATES
};
// Define the state machine states
STATE_DECLARE(SelfTest, Idle, NoEventData)
ENTRY_DECLARE(SelfTest, EntryIdle, NoEventData)
STATE_DECLARE(SelfTest, Completed, NoEventData)
STATE_DECLARE(SelfTest, Failed, NoEventData)
};
#endif