JaiaBot  1.19.0
JaiaBot micro-AUV software
config.proto
Go to the documentation of this file.
1 // Copyright 2024:
2 // JaiaRobotics LLC
3 // File authors:
4 // Toby Schneider <toby@gobysoft.org>
5 //
6 //
7 // This file is part of the JaiaBot Project Binaries
8 // ("The Jaia Binaries").
9 //
10 // The Jaia Binaries are free software: you can redistribute them and/or modify
11 // them under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 2 of the License, or
13 // (at your option) any later version.
14 //
15 // The Jaia Binaries are distributed in the hope that they will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with the Jaia Binaries. If not, see <http://www.gnu.org/licenses/>.
22 
23 syntax = "proto2";
24 import "goby/middleware/protobuf/app_config.proto";
25 import "goby/protobuf/option_extensions.proto";
26 
27 package jaiabot.config;
28 
29 message Tool
30 {
31  option (goby.msg).cfg.tool = {
32  is_tool: true
33  has_subtools: true
34  has_help_action: true
35  };
36 
37  optional goby.middleware.protobuf.AppConfig app = 1
38  [(goby.field) = { cfg { action: DEVELOPER } }];
39 
40  enum Action
41  {
42  help = 0 [(goby.ev).cfg = {
43  short_help_msg: "Print usage information",
44  full_help_msg: "Usage: \"jaia help [action]\"\n"
45  "Provides detailed usage information on the provided action.\n"
46  "Example: \"jaia help version\" provides help in the 'version' action"
47 
48  }];
49  // log = 1 [(goby.ev).cfg = {
50  // short_help_msg: "Manage Jaia (goby) log files",
51  // }];
52  status = 2 [(goby.ev).cfg = {
53  short_help_msg: "Status of Jaia services",
54  external_command: "jaiabot-status"
55  full_help_msg: "Runs jaiabot-status to display status of Jaiabot services"
56  }];
57  ctl = 3 [(goby.ev).cfg = {
58  short_help_msg: "Control Jaia services",
59  full_help_msg: "This action is a wrapper for 'systemctl [<service>: defaults to jaiabot.service]': use jaia ctl --help for full details\n"
60  "\n"
61  "Common commands:\n"
62  " jaia ctl restart: Restart all jaiabot services\n"
63  " jaia ctl stop: Stop all jaiabot services\n"
64  " jaia ctl start: Start all jaiabot services\n"
65  " jaia ctl <command> <service>: Run command on a specific service, e.g.,\n"
66  " jaia ctl restart jaiabot_goby_gps: Restart GPS service"
67  }];
68  version = 4 [(goby.ev).cfg = {
69  short_help_msg: "Jaia version (metadata)",
70  }];
71  ip = 5 [(goby.ev).cfg = {
72  short_help_msg: "Output the address or network for a given Jaia Hub or Bot for a given real or VPN network",
73  full_help_msg: "Runs the jaia-ip.py script to determine a given address for a bot or hub using shorthand codes.\n"
74  "Example commands:\n"
75  " jaia ip b4f10: IP address for bot4 on fleet10\n"
76  " jaia ip h1f2: IP address for hub1 on fleet2\n"
77  " jaia ip b5sf3: IP address for bot5 fleet3 on the service vpn\n"
78  " jaia ip b5vf3: IP address for bot5 fleet3 on the VirtualFleet vpn\n"
79  }];
80  ssh = 6 [(goby.ev).cfg = {
81  short_help_msg: "Use SSH to login to jaiabots and hubs",
82  full_help_msg: "This action is a wrapper for 'ssh' that can take shortcut names for jaia hosts\n"
83  "Command line options before the host name are processed by 'jaia ssh', and command line options after the host name are passed unmodified to ssh"
84  "\n"
85  "Example commands:\n"
86  " jaia ssh b4f10: SSH into bot4 on fleet10\n"
87  " jaia ssh h1f2: SSH into hub1 on fleet2\n"
88  " jaia ssh b5sf3: SSH into bot5 fleet3 over service vpn\n"
89  " jaia ssh b5vf3 -A -v: SSH into bot5 fleet3 over VirtualFleet vpn using 'ssh -A -v'\n"
90  }];
91  ping = 7 [(goby.ev).cfg = {
92  short_help_msg: "Use ping to test connectivity to jaiabots and hubs",
93  full_help_msg: "This action is a wrapper for 'ping' that can take shortcut names for jaia hosts\n"
94  "Command line options before the host name are processed by 'jaia ping', and command line options after the host name are passed unmodified to ping"
95  "\n"
96  "Example commands:\n"
97  " jaia ping b4f10: ping bot4 on fleet10\n"
98  " jaia ping h1f2: ping hub1 on fleet2\n"
99  " jaia ping b5f3: ping bot5 fleet3 over service vpn\n"
100  " jaia ping b5vf3 -i 10: ping bot5 fleet3 over VirtualFleet vpn using 'ping -i 10'\n"
101  }];
102  admin = 8 [
103  (goby.ev).cfg = { short_help_msg: "System administration commands" }
104  ];
105  doc = 9 [(goby.ev).cfg = {
106  short_help_msg: "Documentation output and generation",
107  external_command: "jaia-doc.py"
108  full_help_msg: "Command line interface to the jaiabot documentation (Markdown). Run with no arguments to show a list of all available pages, or provide a page name to display the output to the terminal window."
109  }];
110  }
111  optional Action action = 2 [
112  default = help,
113  (goby.field) = {
114  description: "The action this tool should take [can omit --action if 1st parameter]",
115  cfg { position { enable: true }, cli_short: "A", action: HIDDEN }
116  }
117  ];
118 }