blob: 8c40c8fde093345504f2d6cfac6770342552226a [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Matteo Scandolof9d43412021-01-12 11:11:34 -08003 * Copyright 2020-present Open Networking Foundation
Elia Battiston9bfe1102022-02-03 10:38:03 +01004 *
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07005 * 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
Elia Battiston9bfe1102022-02-03 10:38:03 +01008 *
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Elia Battiston9bfe1102022-02-03 10:38:03 +010010 *
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070011 * 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 Scandolof9d43412021-01-12 11:11:34 -080023
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070024package generated
25
26import "github.com/deckarep/golang-set"
27
Matteo Scandolof9d43412021-01-12 11:11:34 -080028// PseudowirePerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
29// Managed entity Pseudowire performance monitoring history data
Andrea Campanella10426e22021-10-15 17:58:04 +020030const PseudowirePerformanceMonitoringHistoryDataClassID = ClassID(285) // 0x011d
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
32var pseudowireperformancemonitoringhistorydataBME *ManagedEntityDefinition
33
Andrea Campanella10426e22021-10-15 17:58:04 +020034// PseudowirePerformanceMonitoringHistoryData (Class ID: #285 / 0x011d)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070035// 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 Scandolof9d43412021-01-12 11:11:34 -080039// NOTE - The pseudowire PM history data ME collects data similar, but not identical, to that
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070040// 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
Andrea Campanella10426e22021-10-15 17:58:04 +020052// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070054//
55// Interval End Time
Andrea Campanella10426e22021-10-15 17:58:04 +020056// This attribute identifies the most recently finished 15-min interval. (R) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070057//
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
Matteo Scandolof9d43412021-01-12 11:11:34 -080060// that contains PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070061//
62// Received Packets
Andrea Campanella10426e22021-10-15 17:58:04 +020063// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070065//
66// Transmitted Packets
Andrea Campanella10426e22021-10-15 17:58:04 +020067// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070070//
71// Missing Packets
Andrea Campanella10426e22021-10-15 17:58:04 +020072// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070075//
Elia Battiston9bfe1102022-02-03 10:38:03 +010076// Misordered Packets Usable
77// Misordered packets, usable: This attribute counts the number of packets received out of order,
78// but which were able to be successfully re-ordered and played out. Both payload and signalling
79// packets, if any, contribute to this count. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070080//
81// Misordered Packets Dropped
Andrea Campanella10426e22021-10-15 17:58:04 +020082// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070085//
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
Matteo Scandolof9d43412021-01-12 11:11:34 -080089// signalling packets, if any, contribute to this count. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070090//
91// Malformed Packets
Andrea Campanella10426e22021-10-15 17:58:04 +020092// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070095//
96// Stray Packets
Andrea Campanella10426e22021-10-15 17:58:04 +020097// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700101//
102// Remote Packet Loss
Andrea Campanella10426e22021-10-15 17:58:04 +0200103// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700106//
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,
Matteo Scandolof9d43412021-01-12 11:11:34 -0800110// contribute to this count. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700111//
112// Es
Andrea Campanella10426e22021-10-15 17:58:04 +0200113// This attribute counts errored seconds. Any discarded, lost, malformed or unusable packet
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700114// received from the PSN during a given second causes this counter to increment. Both payload and
Matteo Scandolof9d43412021-01-12 11:11:34 -0800115// signalling packets, if any, contribute to this count. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700116//
117// Ses
Andrea Campanella10426e22021-10-15 17:58:04 +0200118// This attribute counts severely errored seconds. The criterion for an SES may be configured
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700119// through the pseudowire maintenance profile ME. Both payload and signalling packets, if any,
Matteo Scandolof9d43412021-01-12 11:11:34 -0800120// contribute to this count. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700121//
122// Uas
Andrea Campanella10426e22021-10-15 17:58:04 +0200123// This attribute counts unavailable seconds. An unavailable second begins at the onset of 10
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700124// 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)
Matteo Scandolof9d43412021-01-12 11:11:34 -0800127// (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700128//
129type PseudowirePerformanceMonitoringHistoryData struct {
130 ManagedEntityDefinition
131 Attributes AttributeValueMap
132}
133
Elia Battiston9bfe1102022-02-03 10:38:03 +0100134// Attribute name constants
135
136const PseudowirePerformanceMonitoringHistoryData_IntervalEndTime = "IntervalEndTime"
137const PseudowirePerformanceMonitoringHistoryData_ThresholdData12Id = "ThresholdData12Id"
138const PseudowirePerformanceMonitoringHistoryData_ReceivedPackets = "ReceivedPackets"
139const PseudowirePerformanceMonitoringHistoryData_TransmittedPackets = "TransmittedPackets"
140const PseudowirePerformanceMonitoringHistoryData_MissingPackets = "MissingPackets"
141const PseudowirePerformanceMonitoringHistoryData_MisorderedPacketsUsable = "MisorderedPacketsUsable"
142const PseudowirePerformanceMonitoringHistoryData_MisorderedPacketsDropped = "MisorderedPacketsDropped"
143const PseudowirePerformanceMonitoringHistoryData_PlayoutBufferUnderrunsOverruns = "PlayoutBufferUnderrunsOverruns"
144const PseudowirePerformanceMonitoringHistoryData_MalformedPackets = "MalformedPackets"
145const PseudowirePerformanceMonitoringHistoryData_StrayPackets = "StrayPackets"
146const PseudowirePerformanceMonitoringHistoryData_RemotePacketLoss = "RemotePacketLoss"
147const PseudowirePerformanceMonitoringHistoryData_TdmLBitPacketsTransmitted = "TdmLBitPacketsTransmitted"
148const PseudowirePerformanceMonitoringHistoryData_Es = "Es"
149const PseudowirePerformanceMonitoringHistoryData_Ses = "Ses"
150const PseudowirePerformanceMonitoringHistoryData_Uas = "Uas"
151
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700152func init() {
153 pseudowireperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
154 Name: "PseudowirePerformanceMonitoringHistoryData",
Elia Battiston9bfe1102022-02-03 10:38:03 +0100155 ClassID: PseudowirePerformanceMonitoringHistoryDataClassID,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700156 MessageTypes: mapset.NewSetWith(
157 Create,
158 Delete,
159 Get,
160 Set,
Girish Gowdrae2683102021-03-05 08:24:26 -0800161 GetCurrentData,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700162 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800163 AllowedAttributeMask: 0xfffe,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700164 AttributeDefinitions: AttributeDefinitionMap{
Elia Battiston9bfe1102022-02-03 10:38:03 +0100165 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
166 1: ByteField(PseudowirePerformanceMonitoringHistoryData_IntervalEndTime, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
167 2: Uint16Field(PseudowirePerformanceMonitoringHistoryData_ThresholdData12Id, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
168 3: Uint32Field(PseudowirePerformanceMonitoringHistoryData_ReceivedPackets, CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
169 4: Uint32Field(PseudowirePerformanceMonitoringHistoryData_TransmittedPackets, CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
170 5: Uint32Field(PseudowirePerformanceMonitoringHistoryData_MissingPackets, CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
171 6: Uint32Field(PseudowirePerformanceMonitoringHistoryData_MisorderedPacketsUsable, CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
172 7: Uint32Field(PseudowirePerformanceMonitoringHistoryData_MisorderedPacketsDropped, CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
173 8: Uint32Field(PseudowirePerformanceMonitoringHistoryData_PlayoutBufferUnderrunsOverruns, CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
174 9: Uint32Field(PseudowirePerformanceMonitoringHistoryData_MalformedPackets, CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
175 10: Uint32Field(PseudowirePerformanceMonitoringHistoryData_StrayPackets, CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
176 11: Uint32Field(PseudowirePerformanceMonitoringHistoryData_RemotePacketLoss, CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
177 12: Uint32Field(PseudowirePerformanceMonitoringHistoryData_TdmLBitPacketsTransmitted, CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
178 13: Uint32Field(PseudowirePerformanceMonitoringHistoryData_Es, CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
179 14: Uint32Field(PseudowirePerformanceMonitoringHistoryData_Ses, CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
180 15: Uint32Field(PseudowirePerformanceMonitoringHistoryData_Uas, CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800181 },
182 Access: CreatedByOlt,
183 Support: UnknownSupport,
184 Alarms: AlarmMap{
185 0: "Missing packets",
186 1: "Misordered packets, usable",
187 2: "Misordered packets dropped",
188 3: "Playout buffer underruns/overruns",
189 4: "Malformed packets",
190 5: "Stray packets",
191 6: "Remote packet loss",
192 7: "ES",
193 8: "SES",
194 9: "UAS",
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700195 },
196 }
197}
198
Matteo Scandolof9d43412021-01-12 11:11:34 -0800199// NewPseudowirePerformanceMonitoringHistoryData (class ID 285) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700200// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800201// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700202func NewPseudowirePerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800203 return NewManagedEntity(*pseudowireperformancemonitoringhistorydataBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700204}