DCCL v4
header.proto
1 // Copyright 2010-2023:
2 // GobySoft, LLC (2013-)
3 // Massachusetts Institute of Technology (2007-2014)
4 // Community contributors (see AUTHORS file)
5 // File authors:
6 // Toby Schneider <toby@gobysoft.org>
7 // Chris Murphy <cmurphy@aphysci.com>
8 //
9 //
10 // This file is part of the Dynamic Compact Control Language Library
11 // ("DCCL").
12 //
13 // DCCL is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU Lesser General Public License as published by
15 // the Free Software Foundation, either version 2.1 of the License, or
16 // (at your option) any later version.
17 //
18 // DCCL is distributed in the hope that it will be useful,
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU Lesser General Public License for more details.
22 //
23 // You should have received a copy of the GNU Lesser General Public License
24 // along with DCCL. If not, see <http://www.gnu.org/licenses/>.
25 syntax = "proto2";
26 import "dccl/option_extensions.proto";
27 package dccl.test;
28 
29 // required fields will be filled in for you by ApplicationBase
30 // if you choose not to do so yourself
31 message Header
32 {
33  //
34  // time
35  //
36 
37  // microseconds since Unix
38 
39  // second precision (default)
40  required uint64 time = 10 [(dccl.field).codec = "dccl.time"];
41 
42  optional int64 time_signed = 20 [(dccl.field).codec = "dccl.time"];
43  optional double time_double = 21 [(dccl.field).codec = "dccl.time"];
44  optional double pasttime_double = 22
45  [(dccl.field).codec = "dccl.time", (dccl.field).num_days = 6];
46  optional double futuretime_double = 23
47  [(dccl.field).codec = "dccl.time", (dccl.field).num_days = 6];
48 
49  // microsecond precision
50  optional int64 time_precision = 24
51  [(dccl.field).codec = "dccl.time", (dccl.field).precision = -3];
52  optional double time_double_precision = 25
53  [(dccl.field).codec = "dccl.time", (dccl.field).precision = 6];
54 
55  //
56  // source
57  //
58  required int32 source_platform = 11
59  [(dccl.field).min = 0, (dccl.field).max = 31];
60  optional string source_app = 12 [(dccl.field).omit = true];
61 
62  //
63  // destination
64  //
65  enum PublishDestination
66  {
67  PUBLISH_SELF = 1;
68  PUBLISH_OTHER = 2;
69  PUBLISH_ALL = 3;
70  }
71  optional PublishDestination dest_type = 13 [default = PUBLISH_SELF];
72 
73  optional int32 dest_platform = 14 [
74  (dccl.field).min = 0,
75  (dccl.field).max = 31
76  ]; // required if dest_type == other
77 }