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  // micro-seconds since unix
14  required uint64 time = 10
15  [(dccl.field).codec = "_time", (dccl.field).in_head = true];
16 
17  //
18  // source
19  //
20  required uint32 source_platform = 11 [
21  (dccl.field).min = 0,
22  (dccl.field).max = 31,
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 uint32 dest_platform = 14 [
40  (dccl.field).min = 0,
41  (dccl.field).max = 31,
42  (dccl.field).in_head = true
43  ]; // required if dest_type == other
44 }