Skip to content

Commit a761bc0

Browse files
committed
Adding Protobuf files
As agreed in issue #619
1 parent 1b7f80f commit a761bc0

1 file changed

Lines changed: 137 additions & 0 deletions

File tree

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
//
2+
// Copyright (c) 2025 Linux Foundation (LF). All rights reserved.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
16+
17+
syntax = "proto3";
18+
19+
//
20+
// This package defines message types used to represent a performance measurement record
21+
// in a TAPI stream as per the specifications in TR-548.
22+
//
23+
package tapi;
24+
25+
option java_multiple_files = true;
26+
option java_outer_classname = "TapiGnmi";
27+
option java_package = "org.linuxfoundation.onmi.tapi";
28+
29+
message StreamDetails {
30+
MeasurementDetails measurement_details = 1 [json_name = "measurement-details"];
31+
}
32+
message MeasurementDetails {
33+
uint64 time_measurement_was_sampled = 1 [json_name = "time-measurement-was-sampled"];
34+
QualifiedMeasuredValue qualified_measured_value = 2 [json_name = "qualified-measured-value"];
35+
string native_resource_id = 3 [json_name = "native-resource-id"];
36+
SampleQualifier sample_qualifier = 4 [json_name = "sample-qualifier"];
37+
RelativePosition relative_position_of_measurement = 5 [json_name = "relative-position-of-measurement"];
38+
DirectionOfMeasuredSignal direction_of_measured_signal = 6 [json_name = "direction-of-measured-signal"];
39+
uint64 sample_interval = 7 [json_name = "sample-interval"];
40+
string abstract_resource_ref = 8 [json_name = "abstract-resource-ref"];
41+
string native_measurement_type = 9 [json_name = "native-measurement-type"];
42+
NormalizedMeasurementType normalized_measurement_type = 10 [json_name = "normalized-measurement-type"];
43+
repeated QualifiedMeasurement qualified_measurement = 11 [json_name = "qualified-measurement"];
44+
string connection_end_point = 12 [json_name = "connection-end-point"];
45+
string maintenance_intermediate_point = 13 [json_name = "maintenance-intermediate-point"];
46+
string maintenance_end_point = 14 [json_name = "maintenance-end-point"];
47+
uint64 measurement_start_time = 15 [json_name = "measurement-start-time"];
48+
repeated QualifiedMeasuredValue qualified_measured_value_set = 16 [json_name = "qualified-measured-value-set"];
49+
}
50+
message QualifiedMeasurement {
51+
uint64 time_measurement_was_sampled = 1 [json_name = "time-measurement-was-sampled"];
52+
QualifiedMeasuredValue qualified_measured_value = 2 [json_name = "qualified-measured-value"];
53+
string native_resource_id = 3 [json_name = "native-resource-id"];
54+
SampleQualifier sample_qualifier = 4 [json_name = "sample-qualifier"];
55+
RelativePosition relative_position_of_measurement = 5 [json_name = "relative-position-of-measurement"];
56+
DirectionOfMeasuredSignal direction_of_measured_signal = 6 [json_name = "direction-of-measured-signal"];
57+
uint64 sample_interval = 7 [json_name = "sample-interval"];
58+
string abstract_resource_ref = 8 [json_name = "abstract-resource-ref"];
59+
string native_measurement_type = 9 [json_name = "native-measurement-type"];
60+
NormalizedMeasurementType normalized_measurement_type = 10 [json_name = "normalized-measurement-type"];
61+
uint64 list_index = 11 [json_name ="list-index"];
62+
string connection_end_point = 12 [json_name = "connection-end-point"];
63+
string maintenance_intermediate_point = 13 [json_name = "maintenance-intermediate-point"];
64+
string maintenance_end_point = 14 [json_name = "maintenance-end-point"];
65+
uint64 measurement_start_time = 15 [json_name = "measurement-start-time"];
66+
repeated QualifiedMeasuredValue qualified_measured_value_set = 16 [json_name = "qualified-measured-value-set"];
67+
}
68+
message QualifiedMeasuredValue {
69+
double value = 1 [json_name = "value"];
70+
ValueQualifier value_qualifier = 2 [json_name = "value-qualifier"];
71+
string units = 3 [json_name = "units"];
72+
string qualified_value_name = 4 [json_name = "qualified-value-name"];
73+
string qualified_location_name = 5 [json_name = "qualified-location-name"];
74+
string qualified_measurement_type = 6 [json_name = "qualified-measurement-type"];
75+
}
76+
enum ValueQualifier {
77+
OK = 0;
78+
INVALID = 1;
79+
SUSPECT = 2;
80+
MISSING = 3;
81+
PARTIAL = 4;
82+
}
83+
enum RelativePosition {
84+
NEAR_END = 0;
85+
FAR_END = 1;
86+
NOT_APPLICABLE = 2;
87+
ALL_LOCATIONS = 3;
88+
}
89+
enum DirectionOfMeasuredSignal {
90+
NO_DIRECTION = 0;
91+
RECEIVE = 1;
92+
TRANSMIT = 2;
93+
RECEIVE_AND_TRANSMIT = 3;
94+
CONTRA_RECEIVE = 4;
95+
CONTRA_TRANSMIT = 5;
96+
CONTRA_RECEIVE_AND_CONTRA_TRANSMIT = 6;
97+
}
98+
enum SampleQualifier {
99+
NORMAL = 0;
100+
DELAYED = 1;
101+
FINAL = 2;
102+
FIRST = 3;
103+
BASELINE=4;
104+
}
105+
106+
enum NormalizedMeasurementType {
107+
NO_NORMALIZED_TYPE = 0;
108+
BBE = 1;
109+
CHROM_DISP = 2;
110+
DELAY_FRAME_COUNT = 3;
111+
DIFF_GROUP_DELAY = 4;
112+
FEC_CORRECTABLE_BLOCKS = 5;
113+
FEC_CORRECTED_BITS = 6;
114+
FEC_CORRECTED_BYTES = 7;
115+
FEC_CORRECTED_CODEWORDS = 8;
116+
FEC_CORRECTED_ERRORS = 9;
117+
FEC_POST_FEC_BER = 10;
118+
FEC_PRE_FEC_BER = 11;
119+
FEC_SYMBOL_ERRORS = 12;
120+
FEC_UNCORRECTABLE_BITS = 13;
121+
FEC_UNCORRECTABLE_BLOCKS = 14;
122+
FEC_UNCORRECTABLE_BYTES = 15;
123+
FEC_UNCORRECTABLE_WORDS = 16;
124+
FEC_UNCORRECTED_CODEWORDS = 17;
125+
FREQ_OFFS = 18;
126+
OPTICAL_GAIN = 19;
127+
OPT_PWR_SPECTR_DENS_INPUT = 20;
128+
OPT_PWR_SPECTR_DENS_OUTPUT = 21;
129+
OPT_TOTAL_PWR_INPUT = 22;
130+
OPT_TOTAL_PWR_OUTPUT = 23;
131+
OPTICAL_TILT = 24;
132+
POL_MODE_DISP = 25;
133+
SES = 26;
134+
UAS = 27;
135+
VOA_INPUT = 28;
136+
VOA_OUTPUT = 29;
137+
}

0 commit comments

Comments
 (0)