-
Notifications
You must be signed in to change notification settings - Fork 125
/
osi_version.proto.in
59 lines (51 loc) · 1.84 KB
/
osi_version.proto.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
syntax = "proto2";
option optimize_for = SPEED;
import "google/protobuf/descriptor.proto";
package osi3;
//
// \brief The interface version number.
//
// The field denoting the version number. This needs to be set by the
// sender to the actual OSI version that is to be sent. Code wanting to
// access the version number of the OSI code base can access a FileOptions,
// which has the proper values, like this:
//
// \code
// auto currentInterfaceVersion =
// InterfaceVersion::descriptor()->file()->options().GetExtension(current_interface_version);
// \endcode
//
// If a message with all components set to the default value 0 is
// received, this indicates that either that the message was sent by
// a version 2.2.0 or earlier release, or that the sender did not
// properly set the version components prior to sending.
//
// Increments will happen as part of changes to the whole interface.
// The meaning of different InterfaceVersions is defined in [1].
//
// \par Reference:
// [1] Open Simulation Interface. (2020, January 25). <em>README</em>. Retrieved January 25, 2020, from https://opensimulationinterface.github.io/osi-documentation/open-simulation-interface/README.html
//
message InterfaceVersion
{
// Major version number.
//
optional uint32 version_major = 1;
// Minor version number.
//
optional uint32 version_minor = 2;
// Patch version number.
//
optional uint32 version_patch = 3;
}
//
// \brief Extension of \c FileOptions for OSI
//
extend google.protobuf.FileOptions {
// Extend \c FileOptions with current interface version of OSI
//
optional InterfaceVersion current_interface_version = 81000;
}
option (current_interface_version).version_major = @VERSION_MAJOR@;
option (current_interface_version).version_minor = @VERSION_MINOR@;
option (current_interface_version).version_patch = @VERSION_PATCH@;