15 /** Type describing a tri-state boolean */
16 typedef enum _TristateBoolean {
17 TRISTATE_BOOLEAN_UNKNOWN = 0,
18 TRISTATE_BOOLEAN_UNSET = 1,
19 TRISTATE_BOOLEAN_SET = 2
22 #define TristateBooleanToString(s) ((s == TRISTATE_BOOLEAN_SET) ? "set" : \
23 (s == TRISTATE_BOOLEAN_UNSET) ? "unset" : \
26 /** Type describing movement state */
27 typedef enum _MovementState {
28 MOVEMENT_STATE_STATIONARY = 0,
29 MOVEMENT_STATE_MOVING = 1
32 #define MovementStateToString(s) ((s == MOVEMENT_STATE_MOVING) ? "moving" : \
35 /** Type describing substate indexes */
36 typedef enum _SubStateIndex {
37 SUBSTATE_POSITION = 0,
47 void destroyState(void);
48 MovementState getExternalState(void);
49 MovementState getInternalState(SubStateIndex subStateIndex);
50 void determineStateWithHysteresis(SubStateIndex subStateIndex, TristateBoolean movingNow, MovementState * externalState,
51 bool * externalStateChange, bool * subStateExternalStateChange);
53 #endif /* _PUD_STATE_H_ */