Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 3 | * Copyright 2020-present Open Networking Foundation |
| 4 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [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 |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 8 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 10 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [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 | */ |
| 17 | /* |
| 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 | */ |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 23 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 24 | package generated |
| 25 | |
| 26 | import "github.com/deckarep/golang-set" |
| 27 | |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 28 | // PseudowirePerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Pseudowire performance monitoring history data |
| 30 | const PseudowirePerformanceMonitoringHistoryDataClassID ClassID = ClassID(285) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 31 | |
| 32 | var pseudowireperformancemonitoringhistorydataBME *ManagedEntityDefinition |
| 33 | |
| 34 | // PseudowirePerformanceMonitoringHistoryData (class ID #285) |
| 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 | // |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 39 | // NOTE - The pseudowire PM history data ME collects data similar, but not identical, to that |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 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 |
| 52 | // Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an |
| 53 | // identical ID, this ME is implicitly linked to an instance of the pseudowire TP. (R, setbycreate) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 54 | // (mandatory) (2-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 55 | // |
| 56 | // Interval End Time |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 57 | // Interval end time: This attribute identifies the most recently finished 15-min interval. (R) |
| 58 | // (mandatory) (1-byte) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 59 | // |
| 60 | // Threshold Data 1_2 Id |
| 61 | // Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 62 | // that contains PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 63 | // |
| 64 | // Received Packets |
| 65 | // Received packets: This attribute counts the total number of packets, both payload and |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 66 | // signalling, received in the PSN to the TDM direction. (R) (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 67 | // |
| 68 | // Transmitted Packets |
| 69 | // Transmitted packets: This attribute counts the total number of packets, both payload and |
| 70 | // signalling, transmitted in the TDM to the PSN direction. The count includes packets whose L bit |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 71 | // is set and which may therefore not contain a payload. (R) (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 72 | // |
| 73 | // Missing Packets |
| 74 | // Missing packets: This attribute counts the number of lost packets, as indicated by gaps in the |
| 75 | // control word numbering sequence. Both payload and signalling packets, if any, contribute to this |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 76 | // count. (R) (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 77 | // |
| 78 | // Misordered Packets, Usable |
| 79 | // Misordered packets, usable: This attribute counts the number of packets received out of order, |
| 80 | // but which were able to be successfully re-ordered and played out. Both payload and signalling |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 81 | // packets, if any, contribute to this count. (R) (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 82 | // |
| 83 | // Misordered Packets Dropped |
| 84 | // Misordered packets dropped: This attribute counts the number of packets received out of sequence |
| 85 | // that were discarded, either because the ONU did not support reordering or because it was too |
| 86 | // late to reorder them. Both payload and signalling packets, if any, contribute to this count. (R) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 87 | // (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 88 | // |
| 89 | // Playout Buffer Underruns_Overruns |
| 90 | // Playout buffer underruns/overruns: This attribute counts the number of packets that were |
| 91 | // discarded because they arrived too late or too early to be played out. Both payload and |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 92 | // signalling packets, if any, contribute to this count. (R) (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 93 | // |
| 94 | // Malformed Packets |
| 95 | // Malformed packets: This attribute counts the number of malformed packets, e.g., because the |
| 96 | // packet length was not as expected or because of an unexpected RTP payload type. Both payload and |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 97 | // signalling packets, if any, contribute to this count. (R) (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 98 | // |
| 99 | // Stray Packets |
| 100 | // Stray packets: This attribute counts the number of packets whose ECID or RTP SSRC failed to |
| 101 | // match the expected value, or which are otherwise known to have been misdelivered. Stray packets |
| 102 | // are discarded without affecting any of the other PM counters. Both payload and signalling |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 103 | // packets, if any, contribute to this count. (R) (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 104 | // |
| 105 | // Remote Packet Loss |
| 106 | // Remote packet loss: This attribute counts received packets whose R bit is set, indicating the |
| 107 | // loss of packets at the far end. Both payload and signalling packets, if any, contribute to this |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 108 | // count. (R) (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 109 | // |
| 110 | // Tdm L_Bit Packets Transmitted |
| 111 | // TDM L-bit packets transmitted: This attribute counts the number of packets transmitted with the |
| 112 | // L bit set, indicating a near-end TDM fault. Both payload and signalling packets, if any, |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 113 | // contribute to this count. (R) (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 114 | // |
| 115 | // Es |
| 116 | // ES: This attribute counts errored seconds. Any discarded, lost, malformed or unusable packet |
| 117 | // received from the PSN during a given second causes this counter to increment. Both payload and |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 118 | // signalling packets, if any, contribute to this count. (R) (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 119 | // |
| 120 | // Ses |
| 121 | // SES: This attribute counts severely errored seconds. The criterion for an SES may be configured |
| 122 | // through the pseudowire maintenance profile ME. Both payload and signalling packets, if any, |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 123 | // contribute to this count. (R) (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 124 | // |
| 125 | // Uas |
| 126 | // UAS: This attribute counts unavailable seconds. An unavailable second begins at the onset of 10 |
| 127 | // consecutive SES and ends at the onset of 10 consecutive seconds that are not severely errored. A |
| 128 | // service is unavailable if either its payload or its signalling, if any, are unavailable. During |
| 129 | // unavailable time, only UAS should be counted; other anomalies should not be counted. (R) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 130 | // (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 131 | // |
| 132 | type PseudowirePerformanceMonitoringHistoryData struct { |
| 133 | ManagedEntityDefinition |
| 134 | Attributes AttributeValueMap |
| 135 | } |
| 136 | |
| 137 | func init() { |
| 138 | pseudowireperformancemonitoringhistorydataBME = &ManagedEntityDefinition{ |
| 139 | Name: "PseudowirePerformanceMonitoringHistoryData", |
| 140 | ClassID: 285, |
| 141 | MessageTypes: mapset.NewSetWith( |
| 142 | Create, |
| 143 | Delete, |
| 144 | Get, |
| 145 | Set, |
Girish Gowdra | e268310 | 2021-03-05 08:24:26 -0800 | [diff] [blame] | 146 | GetCurrentData, |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 147 | ), |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 148 | AllowedAttributeMask: 0xfffe, |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 149 | AttributeDefinitions: AttributeDefinitionMap{ |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 150 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 151 | 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1), |
| 152 | 2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 153 | 3: Uint32Field("ReceivedPackets", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3), |
| 154 | 4: Uint32Field("TransmittedPackets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4), |
| 155 | 5: Uint32Field("MissingPackets", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5), |
| 156 | 6: Uint32Field("MisorderedPackets,Usable", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6), |
| 157 | 7: Uint32Field("MisorderedPacketsDropped", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7), |
| 158 | 8: Uint32Field("PlayoutBufferUnderrunsOverruns", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8), |
| 159 | 9: Uint32Field("MalformedPackets", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9), |
| 160 | 10: Uint32Field("StrayPackets", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10), |
| 161 | 11: Uint32Field("RemotePacketLoss", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11), |
| 162 | 12: Uint32Field("TdmLBitPacketsTransmitted", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12), |
| 163 | 13: Uint32Field("Es", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13), |
| 164 | 14: Uint32Field("Ses", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14), |
| 165 | 15: Uint32Field("Uas", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15), |
| 166 | }, |
| 167 | Access: CreatedByOlt, |
| 168 | Support: UnknownSupport, |
| 169 | Alarms: AlarmMap{ |
| 170 | 0: "Missing packets", |
| 171 | 1: "Misordered packets, usable", |
| 172 | 2: "Misordered packets dropped", |
| 173 | 3: "Playout buffer underruns/overruns", |
| 174 | 4: "Malformed packets", |
| 175 | 5: "Stray packets", |
| 176 | 6: "Remote packet loss", |
| 177 | 7: "ES", |
| 178 | 8: "SES", |
| 179 | 9: "UAS", |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 180 | }, |
| 181 | } |
| 182 | } |
| 183 | |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 184 | // NewPseudowirePerformanceMonitoringHistoryData (class ID 285) creates the basic |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 185 | // Managed Entity definition that is used to validate an ME of this type that |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 186 | // is received from or transmitted to the OMCC. |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 187 | func NewPseudowirePerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 188 | return NewManagedEntity(*pseudowireperformancemonitoringhistorydataBME, params...) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 189 | } |