-
Notifications
You must be signed in to change notification settings - Fork 2
/
DeprecatedV1Messages.fbs
79 lines (65 loc) · 1.42 KB
/
DeprecatedV1Messages.fbs
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
include "./Types/SemVer.fbs";
include "./Types/FirmwareBootType.fbs";
include "./Types/OtaUpdateProgressTask.fbs";
include "./Types/ShockerCommandType.fbs";
include "./Types/ShockerModelType.fbs";
attribute "fs_serializer";
namespace OpenShock.Serialization.Deprecated.DoNotUse.V1;
struct ShockerCommand {
model:Types.ShockerModelType;
id:uint16;
type:Types.ShockerCommandType;
intensity:uint8;
duration:uint16;
}
table ShockerCommandList {
commands:[ShockerCommand] (required);
}
struct CaptivePortalConfig {
enabled:bool;
}
table OtaInstall {
version:Types.SemVer;
}
struct KeepAlive {
uptime:uint64;
}
table BootStatus {
boot_type:Types.FirmwareBootType;
firmware_version:Types.SemVer;
ota_update_id:int32;
}
table OtaInstallStarted {
update_id:int32;
version:Types.SemVer;
}
table OtaInstallProgress {
update_id:int32;
task:Types.OtaUpdateProgressTask;
progress:float32;
}
table OtaInstallFailed {
update_id:int32;
message:string;
fatal:bool;
}
union GatewayToHubMessagePayload {
ShockerCommandList,
CaptivePortalConfig,
OtaInstall
}
union HubToGatewayMessagePayload {
KeepAlive,
BootStatus,
OtaInstallStarted,
OtaInstallProgress,
OtaInstallFailed
}
table GatewayToHubMessage (fs_serializer) {
payload:GatewayToHubMessagePayload;
}
table HubToGatewayMessage (fs_serializer) {
payload:HubToGatewayMessagePayload;
}
root_type GatewayToHubMessage;
root_type HubToGatewayMessage;