VLCB SDK
An opinionated SDK for VLCB protocol
Loading...
Searching...
No Matches
state.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
vlcb/common/node.h
"
4
#include "
vlcb/platform/time.h
"
5
#include <stdint.h>
6
#include <
time.h
>
7
8
typedef
uint8_t
VlcbModuleState
;
9
enum
VlcbModuleState
{
10
VLCB_MODULE_STATE_UNINITIALIZED
= 0,
11
VLCB_MODULE_STATE_SETUP
,
12
VLCB_MODULE_STATE_NORMAL
,
13
};
14
15
typedef
struct
{
16
VlcbModuleState
prevState
;
17
VlcbNodeNumber
nodeAddr
;
18
clock_t
startedAt
;
19
}
VlcbModuleStateMachineSetupData
;
20
21
typedef
union
{
22
VlcbModuleStateMachineSetupData
setup
;
23
}
VlcbModuleStateMachineData
;
24
25
typedef
struct
{
26
VlcbModuleState
state
;
27
VlcbModuleStateMachineData
data
;
28
}
VlcbModuleStateMachine
;
node.h
VlcbNodeNumber
uint16_t VlcbNodeNumber
Definition
node.h:8
VlcbModuleState
VlcbModuleState
Definition
state.h:9
VLCB_MODULE_STATE_SETUP
@ VLCB_MODULE_STATE_SETUP
Definition
state.h:11
VLCB_MODULE_STATE_UNINITIALIZED
@ VLCB_MODULE_STATE_UNINITIALIZED
Definition
state.h:10
VLCB_MODULE_STATE_NORMAL
@ VLCB_MODULE_STATE_NORMAL
Definition
state.h:12
VlcbModuleStateMachineSetupData
Definition
state.h:15
VlcbModuleStateMachineSetupData::prevState
VlcbModuleState prevState
Definition
state.h:16
VlcbModuleStateMachineSetupData::startedAt
clock_t startedAt
Definition
state.h:18
VlcbModuleStateMachineSetupData::nodeAddr
VlcbNodeNumber nodeAddr
Definition
state.h:17
VlcbModuleStateMachine
Definition
state.h:25
VlcbModuleStateMachine::data
VlcbModuleStateMachineData data
Definition
state.h:27
VlcbModuleStateMachine::state
VlcbModuleState state
Definition
state.h:26
time.h
VlcbModuleStateMachineData
Definition
state.h:21
VlcbModuleStateMachineData::setup
VlcbModuleStateMachineSetupData setup
Definition
state.h:22
module
inc
vlcb
module
state.h
Generated on Mon Nov 4 2024 09:13:33 for VLCB SDK by
1.12.0