Goby v2
header.proto
1 
2 import "goby/common/protobuf/option_extensions.proto";
3 import "dccl/option_extensions.proto";
4 
5 // required fields will be filled in for you by ApplicationBase
6 // if you choose not to do so yourself
7 message Header
8 {
9  //
10  // time
11  //
12 
13  // result of goby::util::as<std::string>(goby_time())
14  // e.g. "2002-01-20 23:59:59.000"
15  required string time = 10
16  [(dccl.field).codec = "_time", (dccl.field).in_head = true];
17 
18  //
19  // source
20  //
21  required string source_platform = 11 [
22  (dccl.field).codec = "_platform<->modem_id",
23  (dccl.field).in_head = true
24  ];
25  optional string source_app = 12 [(dccl.field).omit = true];
26 
27  //
28  // destination
29  //
30  enum PublishDestination
31  {
32  PUBLISH_SELF = 1;
33  PUBLISH_OTHER = 2;
34  PUBLISH_ALL = 3;
35  }
36  optional PublishDestination dest_type = 13
37  [default = PUBLISH_SELF, (dccl.field).in_head = true];
38 
39  optional string dest_platform = 14 [
40  (dccl.field).codec = "_platform<->modem_id",
41  (dccl.field).in_head = true
42  ]; // required if dest_type == other
43 }