Goby3  3.1.5
2024.05.14
option_extensions.proto
Go to the documentation of this file.
1 syntax = "proto2";
2 import "google/protobuf/descriptor.proto";
3 
4 package goby;
5 
6 extend .google.protobuf.FieldOptions
7 {
8  // Email from liujisi@google.com on 7.22.2011: Please use 1009 for all types
9  // of options.
10  // --------------------------------
11  // Project: Goby Underwater Autonomy Project
12  // Contact: Toby Schneider <tes@mit.edu>
13  // Web site: https://launchpad.net/goby
14  // Extensions: 1009 (all types)
15  // --------------------------------
16  optional GobyFieldOptions field = 1009;
17 }
18 
19 extend .google.protobuf.MessageOptions
20 {
21  optional GobyMessageOptions msg = 1009;
22 }
23 
24 extend .google.protobuf.EnumValueOptions
25 {
26  optional GobyEnumValueOptions ev = 1009;
27 }
28 
29 message GobyFieldOptions
30 {
31  optional string description = 100;
32  optional string example = 101;
33 
34  // used in goby_moos_app.proto
35  optional string moos_global = 102;
36 
37  message ConfigurationOptions
38  {
39  optional string cli_short = 1;
40  enum ConfigAction
41  {
42  ALWAYS = 1;
43  ADVANCED = 2;
44  DEVELOPER = 3;
45  HIDDEN = 4;
46  NEVER = 5;
47  }
48  optional ConfigAction action = 2 [default = ALWAYS];
49  message Position
50  {
51  optional bool enable = 1 [default = false];
52  optional int32 max_count = 2 [default = 1];
53  }
54  optional Position position = 3;
55  optional string env = 4;
56  }
57  optional ConfigurationOptions cfg = 200;
58 }
59 
60 message GobyMessageOptions
61 {
62  optional string convertible_from =
63  100; // tags this message as convertible from another existing message
64  // type based on field names
65 
66  message ConfigurationOptions
67  {
68  message Tool
69  {
70  optional bool is_tool = 1 [
71  default = false
72  ]; // set configuration reader parameters to be more suitable for a
73  // tool rather than a publish/subscribe app
74  optional bool has_subtools = 2
75  [default =
76  false]; // if true, reads only parameters up to the first
77  // positional parameter (assumed to be an action)
78  optional bool has_help_action = 3 [
79  default = false
80  ]; // if true, do not output "Usage" with the default
81  // --help, and do not exit after auto help
82  }
83  optional Tool tool = 1;
84  }
85  optional ConfigurationOptions cfg = 200;
86 }
87 
88 message GobyEnumValueOptions
89 {
90  message ConfigurationOptions
91  {
92  optional string external_command = 1;
93  optional string external_help_param = 2 [default = "-h"];
94  optional string short_help_msg = 3;
95  optional string full_help_msg = 4;
96  optional bool include_binary_flag = 5 [default = true];
97  }
98  optional ConfigurationOptions cfg = 200;
99 }