SingingCat 0
application
wireless_state_machine.h
1#ifndef WIRELESS_STATE_MACHINE_H
2#define WIRELESS_STATE_MACHINE_H 1
3// automatically generated on 30/12/2020 17:16:20!
4// by StateMachine Build #26 on 14/12/2016 16:35:57 by cnw (master)@public
5// qsee http://www.conradwood.net/autobuilder/statemachine/master/latest/
6/* you must implement this */
7void wireless_callback_state_change(int newstate, int oldstate);
8
9/* the below are implemented */
10void wireless_init(void); /* call this on system boot */
11void wireless_timeout(void); /* call this when a state timesout*/
12void wireless_new_event(int myev); /* feed events to the state machine */
13void wireless_set_state(int newstate);
14int wireless_get_current_state(void);
15const char *wireless_event_to_string(int event);
16const char *wireless_state_to_string(int state);
17const int wireless_get_current_timeout();
18
19#define WIRELESS_EVENT_INITIALSTATE 1
20#define WIRELESS_EVENT_ONWIFIDISABLE 3
21#define WIRELESS_EVENT_BRIDGEEVENT 4
22#define WIRELESS_EVENT_ONRESET 6
23#define WIRELESS_EVENT_WIFIENABLED 8
24#define WIRELESS_EVENT_ONTIMEOUT 9
25#define WIRELESS_EVENT_ONROMFAILED 12
26#define WIRELESS_EVENT_ONROMCHECKED 13
27#define WIRELESS_EVENT_RESETSUCCEEDED 17
28#define WIRELESS_EVENT_GOTAP 19
29#define WIRELESS_EVENT_GOTNOAP 21
30#define WIRELESS_EVENT_GOTNEWAP 24
31#define WIRELESS_EVENT_APCONNECTED 26
32#define WIRELESS_EVENT_IPASSIGNED 28
33#define WIRELESS_EVENT_CLOUDISOK 30
34#define WIRELESS_EVENT_APFAILURE 32
35#define WIRELESS_EVENT_IPISOK 33
36#define WIRELESS_EVENT_CLOUDDISCONNECTED 35
37#define WIRELESS_EVENT_ONRESETDETECTED 36
38#define WIRELESS_EVENT_ONNOMOREAPS 38
39
40#define WIRELESS_STATE_DISABLED 2
41#define WIRELESS_STATE_BRIDGED 5
42#define WIRELESS_STATE_IDLE 7
43#define WIRELESS_STATE_ROMCHECK 10
44#define WIRELESS_STATE_ROMFAILED 11
45#define WIRELESS_STATE_INIT 14
46#define WIRELESS_STATE_RESETTING 15
47#define WIRELESS_STATE_RESETFAILED 16
48#define WIRELESS_STATE_READY 18
49#define WIRELESS_STATE_CONNECTINGAP 20
50#define WIRELESS_STATE_DEFAULTSOFTAP 22
51#define WIRELESS_STATE_TRIGGERDEFAULTSOFTAP 23
52#define WIRELESS_STATE_APFAILED 25
53#define WIRELESS_STATE_CONNECTINGIP 27
54#define WIRELESS_STATE_CONNECTINGCLOUD 29
55#define WIRELESS_STATE_CONNECTED 31
56#define WIRELESS_STATE_NEXTAPONLY 34
57#define WIRELESS_STATE_NEXTAP 37
58
59#endif