JaiaBot  1.19.0
JaiaBot micro-AUV software
feather.proto
Go to the documentation of this file.
1 syntax = "proto2";
2 
3 package jaiabot.protobuf;
4 
5 message LoRaMessage
6 {
7  required int32 src = 1;
8  required int32 dest = 2;
9  optional bytes data = 3;
10  enum MessageType
11  {
12  LORA_DATA = 1; // bidirectional
13  SET_PARAMETERS = 2; // control -> feather
14  PARAMETERS_ACCEPTED = 3; // feather -> control
15  PARAMETERS_REJECTED = 4; // feather -> control
16  FEATHER_READY = 5; // feather -> control
17  TRANSMIT_RESULT = 6; // feather -> control
18 
19  LOW_CONTROL = 50; // control -> feather
20 
21  DEBUG_MESSAGE = 100; // feather -> control
22  }
23  required MessageType type = 4 [default = LORA_DATA];
24  optional int32 id = 5;
25  optional int32 flags = 6;
26  optional sint32 rssi = 7;
27 
28  optional bool transmit_successful = 10;
29 
30  // configuration
31  // Maps directly onto RadioHead's enumeration:
32  // https://www.airspayce.com/mikem/arduino/RadioHead/classRH__RF95.html#ab9605810c11c025758ea91b2813666e3
33  // Bw125Cr45Sf128 Bw = 125 kHz, Cr = 4/5, Sf = 128chips/symbol, CRC on.
34  // Default medium range.
35  //
36  // Bw500Cr45Sf128 Bw = 500 kHz, Cr = 4/5, Sf =
37  // 128chips/symbol, CRC on. Fast+short range.
38  //
39  // Bw31_25Cr48Sf512 Bw = 31.25
40  // kHz, Cr = 4/8, Sf = 512chips/symbol, CRC on. Slow+long range.
41  //
42  // Bw125Cr48Sf4096 Bw = 125 kHz, Cr = 4/8, Sf = 4096chips/symbol, low data
43  // rate, CRC on. Slow+long range.
44  //
45  // Bw125Cr45Sf2048 Bw = 125 kHz, Cr = 4/5, Sf
46  // = 2048chips/symbol, CRC on. Slow+long range.
47 
48  enum ModemConfigChoice
49  {
50  Bw125Cr45Sf128 = 1;
51  Bw500Cr45Sf128 = 2;
52  Bw31_25Cr48Sf512 = 3;
53  Bw125Cr48Sf4096 = 4;
54  Bw125Cr45Sf2048 = 5;
55  }
56 
57  optional ModemConfigChoice modem_config = 20 [default = Bw125Cr45Sf128];
58 
59  // +5-+23 dBm
60  optional int32 tx_power = 21 [default = 13];
61 
62  message ControlSurfaces
63  {
64  required sint32 motor = 1;
65  required sint32 port_elevator = 2;
66  required sint32 stbd_elevator = 3;
67  required sint32 rudder = 4;
68  }
69 
70 
71 
72  optional ControlSurfaces control = 30;
73 }