JaiaBot  1.19.0
JaiaBot micro-AUV software
arduino.proto
Go to the documentation of this file.
1 syntax = "proto2";
2 
3 package jaiabot.protobuf;
4 
5 enum ArduinoStatusCode
6 {
7  STARTUP = 0;
8  ACK = 1;
9  TIMEOUT = 2;
10  PREFIX_READ_ERROR = 3;
11  MAGIC_WRONG = 4;
12  MESSAGE_TOO_BIG = 5;
13  MESSAGE_WRONG_SIZE = 6;
14  MESSAGE_DECODE_ERROR = 7;
15  CRC_ERROR = 8;
16  SETTINGS = 9;
17 }
18 
19 message ArduinoSettings
20 {
21  required sint32 forward_start = 1;
22  required sint32 reverse_start = 2;
23 }
24 
25 message ArduinoActuators
26 {
27  // Values to control the motor, surfaces, etc.
28  required sint32 motor = 1;
29  required sint32 port_elevator = 2;
30  required sint32 stbd_elevator = 3;
31  required sint32 rudder = 4;
32  required sint32 timeout = 5;
33  required bool led_switch_on = 6;
34 }
35 
36 message ArduinoCommand
37 {
38  optional ArduinoSettings settings = 1;
39  optional ArduinoActuators actuators = 2;
40 }
41 
42 message ArduinoResponse
43 {
44  required ArduinoStatusCode status_code = 1;
45  optional float thermocouple_temperature_C = 2;
46  optional float vccvoltage = 3;
47  optional float vcccurrent = 4;
48  optional float vvcurrent = 5;
49  optional int32 motor = 6;
50  optional float thermistor_voltage = 7;
51 
52  optional uint32 crc = 50;
53  optional uint32 calculated_crc = 51;
54  required uint32 version = 52 [default = 0];
55 }
56 
57 message ArduinoDebug
58 {
59  optional bool arduino_restarted = 1 [default = false];
60  optional bool arduino_not_responding = 2 [default = false];
61 }