diff options
| author | Aditya Naik | 2020-03-24 13:53:44 -0400 |
|---|---|---|
| committer | Aditya Naik | 2020-03-24 13:53:44 -0400 |
| commit | 553d9c7d470dcf2dadbfefb409cb13314c79fd9d (patch) | |
| tree | a179223f6b4afe45427d612529e580de768eb118 /Src/handshake.proto | |
| parent | 73c032002d4fcfb52980a841f3bbe6cdb868806e (diff) | |
Initial working MDR request, now ACK
Diffstat (limited to 'Src/handshake.proto')
| -rw-r--r-- | Src/handshake.proto | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Src/handshake.proto b/Src/handshake.proto new file mode 100644 index 0000000..611e600 --- /dev/null +++ b/Src/handshake.proto @@ -0,0 +1,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; +// }
\ No newline at end of file |
