-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathHubToLocalMessage.fbs
More file actions
64 lines (51 loc) · 1.17 KB
/
HubToLocalMessage.fbs
File metadata and controls
64 lines (51 loc) · 1.17 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
include "./Types/WifiScanStatus.fbs";
include "./Types/WifiNetwork.fbs";
include "./Types/WifiNetworkEventType.fbs";
include "./HubConfig.fbs";
attribute "fs_serializer";
namespace OpenShock.Serialization.Local;
table ReadyMessage {
poggies:bool;
connected_wifi:Types.WifiNetwork;
account_linked:bool;
config:Configuration.HubConfig;
gpio_valid_inputs:[int8];
gpio_valid_outputs:[int8];
has_standardized_pins:bool;
}
table ErrorMessage {
message:string;
}
table WifiScanStatusMessage {
status:Types.WifiScanStatus;
}
table WifiNetworkEvent {
event_type:Types.WifiNetworkEventType;
networks:[Types.WifiNetwork];
}
table WifiGotIpEvent {
ip:string;
}
table WifiLostIpEvent {
ip:string;
}
/// Sent when the auth token status changes (set, cleared, or validated on gateway connect)
table AccountLinkStatusEvent {
linked:bool;
}
union HubToLocalMessagePayload {
// General stuff
ReadyMessage,
ErrorMessage,
// Wifi stuff
WifiScanStatusMessage,
WifiNetworkEvent,
WifiGotIpEvent,
WifiLostIpEvent,
// Account stuff
AccountLinkStatusEvent,
}
table HubToLocalMessage (fs_serializer) {
payload:HubToLocalMessagePayload;
}
root_type HubToLocalMessage;