|
| 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 | + repeated NameAndValue additionalInfo = 17 [json_name = "additional-info"]; |
| 50 | +} |
| 51 | +message QualifiedMeasurement { |
| 52 | + uint64 time_measurement_was_sampled = 1 [json_name = "time-measurement-was-sampled"]; |
| 53 | + QualifiedMeasuredValue qualified_measured_value = 2 [json_name = "qualified-measured-value"]; |
| 54 | + string native_resource_id = 3 [json_name = "native-resource-id"]; |
| 55 | + SampleQualifier sample_qualifier = 4 [json_name = "sample-qualifier"]; |
| 56 | + RelativePosition relative_position_of_measurement = 5 [json_name = "relative-position-of-measurement"]; |
| 57 | + DirectionOfMeasuredSignal direction_of_measured_signal = 6 [json_name = "direction-of-measured-signal"]; |
| 58 | + uint64 sample_interval = 7 [json_name = "sample-interval"]; |
| 59 | + string abstract_resource_ref = 8 [json_name = "abstract-resource-ref"]; |
| 60 | + string native_measurement_type = 9 [json_name = "native-measurement-type"]; |
| 61 | + NormalizedMeasurementType normalized_measurement_type = 10 [json_name = "normalized-measurement-type"]; |
| 62 | + uint64 list_index = 11 [json_name ="list-index"]; |
| 63 | + string connection_end_point = 12 [json_name = "connection-end-point"]; |
| 64 | + string maintenance_intermediate_point = 13 [json_name = "maintenance-intermediate-point"]; |
| 65 | + string maintenance_end_point = 14 [json_name = "maintenance-end-point"]; |
| 66 | + uint64 measurement_start_time = 15 [json_name = "measurement-start-time"]; |
| 67 | + repeated QualifiedMeasuredValue qualified_measured_value_set = 16 [json_name = "qualified-measured-value-set"]; |
| 68 | + repeated NameAndValue additionalInfo = 17 [json_name = "additional-info"]; |
| 69 | +} |
| 70 | +message QualifiedMeasuredValue { |
| 71 | + double value = 1 [json_name = "value"]; |
| 72 | + ValueQualifier value_qualifier = 2 [json_name = "value-qualifier"]; |
| 73 | + string units = 3 [json_name = "units"]; |
| 74 | + string qualified_value_name = 4 [json_name = "qualified-value-name"]; |
| 75 | + string qualified_location_name = 5 [json_name = "qualified-location-name"]; |
| 76 | + string qualified_measurement_type = 6 [json_name = "qualified-measurement-type"]; |
| 77 | +} |
| 78 | +message NameAndValue { |
| 79 | + string valueName = 1 [json_name = "value-name"]; |
| 80 | + string value = 2; |
| 81 | +} |
| 82 | +enum ValueQualifier { |
| 83 | + OK = 0; |
| 84 | + INVALID = 1; |
| 85 | + SUSPECT = 2; |
| 86 | + MISSING = 3; |
| 87 | + PARTIAL = 4; |
| 88 | +} |
| 89 | +enum RelativePosition { |
| 90 | + NEAR_END = 0; |
| 91 | + FAR_END = 1; |
| 92 | + NOT_APPLICABLE = 2; |
| 93 | + ALL_LOCATIONS = 3; |
| 94 | +} |
| 95 | +enum DirectionOfMeasuredSignal { |
| 96 | + NO_DIRECTION = 0; |
| 97 | + RECEIVE = 1; |
| 98 | + TRANSMIT = 2; |
| 99 | + RECEIVE_AND_TRANSMIT = 3; |
| 100 | + CONTRA_RECEIVE = 4; |
| 101 | + CONTRA_TRANSMIT = 5; |
| 102 | + CONTRA_RECEIVE_AND_CONTRA_TRANSMIT = 6; |
| 103 | +} |
| 104 | +enum SampleQualifier { |
| 105 | + NORMAL = 0; |
| 106 | + DELAYED = 1; |
| 107 | + FINAL = 2; |
| 108 | + FIRST = 3; |
| 109 | + BASELINE=4; |
| 110 | +} |
| 111 | + |
| 112 | +enum NormalizedMeasurementType { |
| 113 | + NO_NORMALIZED_TYPE = 0; |
| 114 | + BBE = 1; |
| 115 | + CHROM_DISP = 2; |
| 116 | + DELAY_FRAME_COUNT = 3; |
| 117 | + DIFF_GROUP_DELAY = 4; |
| 118 | + FEC_CORRECTABLE_BLOCKS = 5; |
| 119 | + FEC_CORRECTED_BITS = 6; |
| 120 | + FEC_CORRECTED_BYTES = 7; |
| 121 | + FEC_CORRECTED_CODEWORDS = 8; |
| 122 | + FEC_CORRECTED_ERRORS = 9; |
| 123 | + FEC_POST_FEC_BER = 10; |
| 124 | + FEC_PRE_FEC_BER = 11; |
| 125 | + FEC_SYMBOL_ERRORS = 12; |
| 126 | + FEC_UNCORRECTABLE_BITS = 13; |
| 127 | + FEC_UNCORRECTABLE_BLOCKS = 14; |
| 128 | + FEC_UNCORRECTABLE_BYTES = 15; |
| 129 | + FEC_UNCORRECTABLE_WORDS = 16; |
| 130 | + FEC_UNCORRECTED_CODEWORDS = 17; |
| 131 | + FREQ_OFFS = 18; |
| 132 | + OPTICAL_GAIN = 19; |
| 133 | + OPT_PWR_SPECTR_DENS_INPUT = 20; |
| 134 | + OPT_PWR_SPECTR_DENS_OUTPUT = 21; |
| 135 | + OPT_TOTAL_PWR_INPUT = 22; |
| 136 | + OPT_TOTAL_PWR_OUTPUT = 23; |
| 137 | + OPTICAL_TILT = 24; |
| 138 | + POL_MODE_DISP = 25; |
| 139 | + SES = 26; |
| 140 | + UAS = 27; |
| 141 | + VOA_INPUT = 28; |
| 142 | + VOA_OUTPUT = 29; |
| 143 | +} |
0 commit comments