forked from BrewBlox/brewblox-proto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEdgeCase.proto
55 lines (47 loc) · 1.45 KB
/
EdgeCase.proto
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
syntax = "proto3";
import "brewblox.proto";
import "nanopb.proto";
package blox.EdgeCase;
message Settings {
fixed64 address = 1 [ (brewblox.field).hexed = true ];
sint32 offset = 2
[ (brewblox.field).unit = DeltaCelsius, (brewblox.field).scale = 256 ];
}
message State {
sint32 value = 1
[ (brewblox.field).unit = Celsius, (brewblox.field).scale = 256 ];
bool connected = 2 [ (brewblox.field).readonly = true ];
}
message NestedLink {
uint32 connection = 1 [ (brewblox.field).objtype = TempSensorInterface ];
}
// This message allows testing combinations that are possible, but not likely in
// real protobuf messages.
message Block {
Settings settings = 1;
State state = 2;
uint32 link = 3 [ (brewblox.field).objtype = ActuatorAnalogInterface ];
repeated NestedLink additionalLinks = 4;
repeated float listValues = 5
[ (brewblox.field).unit = Celsius, (brewblox.field).scale = 256 ];
uint32 deltaV = 6 [
(brewblox.field).unit = DeltaCelsiusPerSecond,
(brewblox.field).scale = 256
];
uint32 logged = 7 [ (brewblox.field).logged = true ];
uint32 unLogged = 8;
uint32 drivenDevice = 9 [
(brewblox.field).objtype = DS2413,
(brewblox.field).driven = true,
(nanopb).int_size = IS_16
];
repeated uint32 strippedFields = 99 [
(brewblox.field).readonly = true,
(nanopb).int_size = IS_16,
(nanopb).max_count = 2
];
}
message SubCase {
option (brewblox.msg).subtype = 1;
uint32 subvalue = 1;
}