-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatus.proto
More file actions
60 lines (50 loc) · 1.14 KB
/
status.proto
File metadata and controls
60 lines (50 loc) · 1.14 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
syntax = "proto3";
package synapse;
import "api/node.proto";
enum StatusCode {
kOk = 0;
kUndefinedError = 1;
kInvalidConfiguration = 2;
kFailedPrecondition = 3;
kUnimplemented = 4;
kInternalError = 5;
kPermissionDenied = 6;
kQueryFailed = 7;
}
enum DeviceState {
kUnknown = 0;
kInitializing = 1;
kStopped = 2;
kRunning = 3;
kError = 4;
}
message StorageDevice {
string name = 1;
uint32 storage_device_id = 2;
float total_gb = 3;
float used_gb = 4;
}
message DeviceStorage {
reserved 1, 2;
repeated StorageDevice storage_devices = 3;
}
message DevicePower {
float battery_level_percent = 1;
bool is_charging = 2;
}
message SignalChainStatus {
repeated NodeStatus nodes = 1;
}
message Status {
string message = 1;
StatusCode code = 2;
DeviceState state = 3;
// repeated NodeSocket sockets = 4;
reserved 4;
DevicePower power = 5;
DeviceStorage storage = 6;
SignalChainStatus signal_chain = 7;
// If the device supports a time sync server (see time.proto)
// Then the UDP echo server will be available at this port
uint32 time_sync_port = 8; // Port number (0-65535) for the UDP time sync server
}