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