summaryrefslogtreecommitdiff
path: root/handshake.proto
blob: 611e60070f8026de911585bb2ea93fe2789820a4 (plain)
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
// Protocol for handshake
// m2s: master to slave
// s2m: slave to master

syntax = "proto2";

message m2s_MDR_request {
    // Record type that is requested. Will indicate verbosity in the future
    required uint32 record_type = 1;
}

message _subscriptions {
    optional uint32 module_id = 1    [default=0];
    optional uint32 entity_id = 2    [default=0];
    optional uint32 module_class = 3 [default=0];
    optional uint32 i2c_address = 4  [default=0];
}

message s2m_MDR_response {
    required float MDR_version = 1;

    // Module unique ID
    required uint32 module_id = 2;
    // Class of this module
    required uint32 module_class = 3;
    // One of more bytes; each bit indicates whether the entity is measured by this module
    required uint32 entity_id = 4;
   
    // Entities to which this module wants to subscribe
    repeated _subscriptions subscriptions = 5;
}

// message m2s_broadcast {
//     message _slave_info {
// 	uint32 i2c_address = 1;
// 	uint32 module_id = 2;
// 	uint32 entity_id = 3;
//     }
//     repeated _slave_info slave_info = 1;
// }