Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 3 | * Copyright 2020-present Open Networking Foundation |
| 4 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 8 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 10 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | */ |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 17 | /* |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 18 | * NOTE: This file was generated, manual edits will be overwritten! |
| 19 | * |
| 20 | * Generated by 'goCodeGenerator.py': |
| 21 | * https://github.com/cboling/OMCI-parser/README.md |
| 22 | */ |
| 23 | |
| 24 | package generated |
| 25 | |
| 26 | import "github.com/deckarep/golang-set" |
| 27 | |
| 28 | // PseudowirePerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Pseudowire performance monitoring history data |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 30 | const PseudowirePerformanceMonitoringHistoryDataClassID = ClassID(285) // 0x011d |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var pseudowireperformancemonitoringhistorydataBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 34 | // PseudowirePerformanceMonitoringHistoryData (Class ID: #285 / 0x011d) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // This ME collects PM for a pseudowire TP. Most of the attributes monitor packets received from |
| 36 | // the PSN, and may therefore be considered egress PM. For the most part, ingress PM is collected |
| 37 | // at the CES PPTP ME. |
| 38 | // |
| 39 | // NOTE - The pseudowire PM history data ME collects data similar, but not identical, to that |
| 40 | // available from the MAC bridge port PM history data ME associated with a MAC bridge. When the |
| 41 | // pseudowire is bridge-based, it may not be necessary to collect both. |
| 42 | // |
| 43 | // Instances of this ME are created and deleted by the OLT. |
| 44 | // |
| 45 | // For a complete discussion of generic PM architecture, refer to clause I.4. |
| 46 | // |
| 47 | // Relationships |
| 48 | // An instance of this ME is associated with an instance of the pseudowire TP. |
| 49 | // |
| 50 | // Attributes |
| 51 | // Managed Entity Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 52 | // This attribute uniquely identifies each instance of this ME. Through an identical ID, this ME is |
| 53 | // implicitly linked to an instance of the pseudowire TP. (R, setbycreate) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 54 | // |
| 55 | // Interval End Time |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 56 | // This attribute identifies the most recently finished 15-min interval. (R) (mandatory) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 57 | // |
| 58 | // Threshold Data 1_2 Id |
| 59 | // Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs |
| 60 | // that contains PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes) |
| 61 | // |
| 62 | // Received Packets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 63 | // This attribute counts the total number of packets, both payload and signalling, received in the |
| 64 | // PSN to the TDM direction. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 65 | // |
| 66 | // Transmitted Packets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 67 | // This attribute counts the total number of packets, both payload and signalling, transmitted in |
| 68 | // the TDM to the PSN direction. The count includes packets whose L bit is set and which may |
| 69 | // therefore not contain a payload. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 70 | // |
| 71 | // Missing Packets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 72 | // This attribute counts the number of lost packets, as indicated by gaps in the control word |
| 73 | // numbering sequence. Both payload and signalling packets, if any, contribute to this count. (R) |
| 74 | // (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 75 | // |
| 76 | // Misordered Packets, Usable |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 77 | // This attribute counts the number of packets received out of order, but which were able to be |
| 78 | // successfully re-ordered and played out. Both payload and signalling packets, if any, contribute |
| 79 | // to this count. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 80 | // |
| 81 | // Misordered Packets Dropped |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 82 | // This attribute counts the number of packets received out of sequence that were discarded, either |
| 83 | // because the ONU did not support reordering or because it was too late to reorder them. Both |
| 84 | // payload and signalling packets, if any, contribute to this count. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 85 | // |
| 86 | // Playout Buffer Underruns_Overruns |
| 87 | // Playout buffer underruns/overruns: This attribute counts the number of packets that were |
| 88 | // discarded because they arrived too late or too early to be played out. Both payload and |
| 89 | // signalling packets, if any, contribute to this count. (R) (mandatory) (4-bytes) |
| 90 | // |
| 91 | // Malformed Packets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 92 | // This attribute counts the number of malformed packets, e.g., because the packet length was not |
| 93 | // as expected or because of an unexpected RTP payload type. Both payload and signalling packets, |
| 94 | // if any, contribute to this count. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 95 | // |
| 96 | // Stray Packets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 97 | // This attribute counts the number of packets whose ECID or RTP SSRC failed to match the expected |
| 98 | // value, or which are otherwise known to have been misdelivered. Stray packets are discarded |
| 99 | // without affecting any of the other PM counters. Both payload and signalling packets, if any, |
| 100 | // contribute to this count. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 101 | // |
| 102 | // Remote Packet Loss |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 103 | // This attribute counts received packets whose R bit is set, indicating the loss of packets at the |
| 104 | // far end. Both payload and signalling packets, if any, contribute to this count. (R) (mandatory) |
| 105 | // (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 106 | // |
| 107 | // Tdm L_Bit Packets Transmitted |
| 108 | // TDM L-bit packets transmitted: This attribute counts the number of packets transmitted with the |
| 109 | // L bit set, indicating a near-end TDM fault. Both payload and signalling packets, if any, |
| 110 | // contribute to this count. (R) (mandatory) (4-bytes) |
| 111 | // |
| 112 | // Es |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 113 | // This attribute counts errored seconds. Any discarded, lost, malformed or unusable packet |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 114 | // received from the PSN during a given second causes this counter to increment. Both payload and |
| 115 | // signalling packets, if any, contribute to this count. (R) (mandatory) (4-bytes) |
| 116 | // |
| 117 | // Ses |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 118 | // This attribute counts severely errored seconds. The criterion for an SES may be configured |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 119 | // through the pseudowire maintenance profile ME. Both payload and signalling packets, if any, |
| 120 | // contribute to this count. (R) (mandatory) (4-bytes) |
| 121 | // |
| 122 | // Uas |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 123 | // This attribute counts unavailable seconds. An unavailable second begins at the onset of 10 |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 124 | // consecutive SES and ends at the onset of 10 consecutive seconds that are not severely errored. A |
| 125 | // service is unavailable if either its payload or its signalling, if any, are unavailable. During |
| 126 | // unavailable time, only UAS should be counted; other anomalies should not be counted. (R) |
| 127 | // (mandatory) (4-bytes) |
| 128 | // |
| 129 | type PseudowirePerformanceMonitoringHistoryData struct { |
| 130 | ManagedEntityDefinition |
| 131 | Attributes AttributeValueMap |
| 132 | } |
| 133 | |
| 134 | func init() { |
| 135 | pseudowireperformancemonitoringhistorydataBME = &ManagedEntityDefinition{ |
| 136 | Name: "PseudowirePerformanceMonitoringHistoryData", |
| 137 | ClassID: 285, |
| 138 | MessageTypes: mapset.NewSetWith( |
| 139 | Create, |
| 140 | Delete, |
| 141 | Get, |
| 142 | Set, |
Chip Boling | 2d51f05 | 2021-02-09 09:04:15 -0600 | [diff] [blame] | 143 | GetCurrentData, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 144 | ), |
| 145 | AllowedAttributeMask: 0xfffe, |
| 146 | AttributeDefinitions: AttributeDefinitionMap{ |
| 147 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 148 | 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1), |
| 149 | 2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 150 | 3: Uint32Field("ReceivedPackets", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3), |
| 151 | 4: Uint32Field("TransmittedPackets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4), |
| 152 | 5: Uint32Field("MissingPackets", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5), |
| 153 | 6: Uint32Field("MisorderedPackets,Usable", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6), |
| 154 | 7: Uint32Field("MisorderedPacketsDropped", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7), |
| 155 | 8: Uint32Field("PlayoutBufferUnderrunsOverruns", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8), |
| 156 | 9: Uint32Field("MalformedPackets", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9), |
| 157 | 10: Uint32Field("StrayPackets", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10), |
| 158 | 11: Uint32Field("RemotePacketLoss", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11), |
| 159 | 12: Uint32Field("TdmLBitPacketsTransmitted", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12), |
| 160 | 13: Uint32Field("Es", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13), |
| 161 | 14: Uint32Field("Ses", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14), |
| 162 | 15: Uint32Field("Uas", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15), |
| 163 | }, |
| 164 | Access: CreatedByOlt, |
| 165 | Support: UnknownSupport, |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 166 | Alarms: AlarmMap{ |
| 167 | 0: "Missing packets", |
| 168 | 1: "Misordered packets, usable", |
| 169 | 2: "Misordered packets dropped", |
| 170 | 3: "Playout buffer underruns/overruns", |
| 171 | 4: "Malformed packets", |
| 172 | 5: "Stray packets", |
| 173 | 6: "Remote packet loss", |
| 174 | 7: "ES", |
| 175 | 8: "SES", |
| 176 | 9: "UAS", |
| 177 | }, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 178 | } |
| 179 | } |
| 180 | |
| 181 | // NewPseudowirePerformanceMonitoringHistoryData (class ID 285) creates the basic |
| 182 | // Managed Entity definition that is used to validate an ME of this type that |
| 183 | // is received from or transmitted to the OMCC. |
| 184 | func NewPseudowirePerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 185 | return NewManagedEntity(*pseudowireperformancemonitoringhistorydataBME, params...) |
| 186 | } |