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
41  [(dccl.field).codec = "_time", (dccl.field).in_head = true];
42 
43  optional int64 time_signed = 20
44  [(dccl.field).codec = "_time", (dccl.field).in_head = true];
45  optional double time_double = 21
46  [(dccl.field).codec = "_time", (dccl.field).in_head = true];
47  optional double pasttime_double = 22 [
48  (dccl.field).codec = "_time",
49  (dccl.field).num_days = 6,
50  (dccl.field).in_head = true
51  ];
52  optional double futuretime_double = 23 [
53  (dccl.field).codec = "_time",
54  (dccl.field).num_days = 6,
55  (dccl.field).in_head = true
56  ];
57 
58  // microsecond precision
59  optional int64 time_precision = 24 [
60  (dccl.field).codec = "_time",
61  (dccl.field).in_head = true,
62  (dccl.field).precision = -3
63  ];
64  optional double time_double_precision = 25 [
65  (dccl.field).codec = "_time",
66  (dccl.field).in_head = true,
67  (dccl.field).precision = 6
68  ];
69 
70  //
71  // source
72  //
73  required int32 source_platform = 11 [
74  (dccl.field).min = 0,
75  (dccl.field).max = 31,
76  (dccl.field).in_head = true
77  ];
78  optional string source_app = 12 [(dccl.field).omit = true];
79 
80  //
81  // destination
82  //
83  enum PublishDestination
84  {
85  PUBLISH_SELF = 1;
86  PUBLISH_OTHER = 2;
87  PUBLISH_ALL = 3;
88  }
89  optional PublishDestination dest_type = 13
90  [default = PUBLISH_SELF, (dccl.field).in_head = true];
91 
92  optional int32 dest_platform = 14 [
93  (dccl.field).min = 0,
94  (dccl.field).max = 31,
95  (dccl.field).in_head = true
96  ]; // required if dest_type == other
97 }