Goby v2
queue.proto
1 
2 // provides MessageFile
3 import "goby/common/protobuf/option_extensions.proto";
4 import "goby/acomms/protobuf/manipulator.proto";
5 
6 package goby.acomms.protobuf;
7 
8 message QueuedMessageEntry
9 {
10  required string protobuf_name = 1;
11  optional bool ack = 2 [default = true];
12  optional uint32 blackout_time = 3 [default = 0];
13  optional uint32 max_queue = 4 [default = 100];
14  optional bool newest_first = 5 [default = true];
15  optional int32 ttl = 6 [default = 1800];
16  optional double value_base = 7 [default = 1];
17 
18  repeated Manipulator manipulator = 10
19  [(goby.field).description =
20  "manipulators to modify the encoding and queuing behavior of the "
21  "specified message"];
22 
23  enum RoleType
24  {
25  SOURCE_ID = 1;
26  DESTINATION_ID = 2;
27  TIMESTAMP = 3;
28  }
29 
30  message Role
31  {
32  required RoleType type = 1;
33  enum RoleSetting
34  {
35  STATIC = 1;
36  FIELD_VALUE = 2;
37  }
38  optional RoleSetting setting = 2 [default = FIELD_VALUE];
39  optional string field = 3;
40  optional int32 static_value = 4;
41  }
42  repeated Role role = 20
43  [(goby.field).description =
44  "Set a message field or static value to various roles (source "
45  "address, destination address, etc.)"];
46 }
47 
48 message QueueManagerConfig
49 {
50  optional int32 modem_id = 1 [
51  (goby.field).description = "Unique number 1-31 to identify this node",
52  (goby.field).example = "1"
53  ];
54 
55  repeated QueuedMessageEntry message_entry = 10;
56  optional double on_demand_skew_seconds = 11 [default = 1];
57 
58  optional double minimum_ack_wait_seconds = 20 [default = 0];
59 
60  optional bool skip_decoding = 21 [
61  default = false,
62  (goby.field).description =
63  "Skip decoding of the message body upon receipt, just decode the "
64  "header (for use with the goby route module to pass messages on "
65  "without decrypting the body)"
66  ];
67 
68  repeated int32 make_network_ack_for_src_id = 30;
69 
70  repeated int32 route_for_additional_modem_id = 40 [
71  (goby.field).description =
72  "Try to route packets addressed to these modem_ids (in addition to "
73  "those addressed to this modem's actual modem_id)"
74  ];
75 
76  message DCCLEncryptRule
77  {
78  // if encoding - dest id
79  // if decoding - source id
80  optional int32 id = 1;
81  required string crypto_passphrase = 2;
82  }
83  repeated DCCLEncryptRule encrypt_rule = 50;
84 }
85 
86 message QueueSize
87 {
88  required uint32 dccl_id = 1;
89  required uint32 size = 2;
90 }
91 
92 message QueueFlush
93 {
94  required uint32 dccl_id = 1;
95 }
96 
97 message QueuedMessageMeta
98 {
99  optional uint32 non_repeated_size = 1;
100  optional bool ack_requested = 2;
101  optional int32 src = 3;
102  optional int32 dest = 4;
103  optional uint64 time = 5;
104 
105  // last time we tried to send this
106  optional uint64 last_sent_time = 10;
107 
108  optional bytes encoded_message = 20;
109 }