JaiaBot 3.0.0
JaiaBot micro-AUV software
Loading...
Searching...
No Matches
option_extensions.proto
Go to the documentation of this file.
1syntax = "proto2";
2
3import "google/protobuf/descriptor.proto";
4
5package jaia;
6
7message RestAPI
8{
9 enum Presence
10 {
11 NOT_GUARANTEED = 0;
12 GUARANTEED = 1;
13 OMITTED = 2;
14 }
15 optional Presence presence = 1 [default = NOT_GUARANTEED];
16 optional string doc = 2;
17 message Example
18 {
19 required string request = 1;
20 required string response = 2;
21 }
22 optional Example example = 3;
23}
24
25// How a NodeSettings field is asked by debconf. debian/jaiabot-embedded.templates and
26// .config are generated from these, in field declaration order.
27message DebconfField
28{
29 enum Group
30 {
31 ALL = 1;
32 BOT = 2;
33 HUB = 3;
34 }
35 enum Priority
36 {
37 LOW = 1;
38 MEDIUM = 2;
39 HIGH = 3;
40 }
41 required Group group = 1;
42 // Asked on the node but never stored in a fleet config: the fleet config tool
43 // supplies it from the node's own identity (type, ids, mode)
44 optional bool identity = 2 [default = false];
45 // MEDIUM keeps a question debconf has never asked out of an interactive
46 // "apt upgrade"; dpkg-reconfigure asks every question whatever this says
47 optional Priority priority = 3 [default = MEDIUM];
48 optional string description = 4;
49 // Lines of the extended description
50 optional string extended_description = 5;
51 message AskIf
52 {
53 required string field = 1;
54 required string equals = 2;
55 }
56 optional AskIf ask_if = 6;
57 // Set when the question is skipped (ask_if false, or the node is not in the
58 // group); a node holding this value when the question *is* asked is reset to
59 // the default
60 optional string unasked_value = 7;
61 // Choices for integer fields, in order
62 repeated string choices = 8;
63 // Asked as a string and checked against "jaia_bounds --<field>": the run of
64 // valid ids is too long to offer as Choices
65 optional bool bounded_id = 9 [default = false];
66 // Default for repeated (multiselect) fields, which have no proto default
67 optional string default = 10;
68 // Different on every node (a serial number, a VIN): asked once per bot or
69 // hub and stored in that node's override, never in the common settings
70 optional bool per_node = 11 [default = false];
71}
72
73message DebconfValue
74{
75 // debconf value; defaults to the enum value name without the enum name
76 // prefix, lowercased (BOT_TYPE_PAM -> "pam")
77 optional string value = 1;
78 // For deprecated values: the value they are normalised to
79 optional string replaced_by = 2;
80}
81
82message DebconfMessage
83{
84 required string package = 1;
85 // Field whose value (bot/hub) selects the BOT or HUB question group
86 required string node_type_field = 2;
87}
88
89message FieldOptions
90{
91 optional RestAPI rest_api = 1;
92 optional DebconfField debconf = 2;
93}
94message MessageOptions
95{
96 optional DebconfMessage debconf = 1;
97}
98message EnumValueOptions
99{
100 optional RestAPI rest_api = 1;
101 optional DebconfValue debconf = 2;
102}
103message FileOptions
104{
105 // See "Fleet configuration versioning" in page091_major_upgrade.md
106 optional uint32 fleet_config_version = 1;
107}
108
109// we can use 1252 for all extensions:
110// https://github.com/protocolbuffers/protobuf/commit/46f7879cae6a986ca0f780811dc8414ae14d18d5
111
112extend .google.protobuf.FieldOptions
113{
114 optional .jaia.FieldOptions field = 1252;
115}
116
117extend .google.protobuf.MessageOptions
118{
119 optional .jaia.MessageOptions msg = 1252;
120}
121
122extend .google.protobuf.EnumValueOptions
123{
124 optional .jaia.EnumValueOptions ev = 1252;
125}
126
127extend .google.protobuf.FileOptions
128{
129 optional .jaia.FileOptions file = 1252;
130}