blob: 37e2876f8bfcd0cc81f41133e9dd7fb99a0fe0fb [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Andrea Campanella7167ebb2020-02-24 09:56:38 +01003 * Copyright 2020-present Open Networking Foundation
4
Chip Boling6e27b352020-02-14 09:10:01 -06005 * 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 Campanella7167ebb2020-02-24 09:56:38 +01008
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Andrea Campanella7167ebb2020-02-24 09:56:38 +010010
Chip Boling6e27b352020-02-14 09:10:01 -060011 * 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 Boling34ebcb62021-02-02 12:13:58 -060017/*
Chip Boling6e27b352020-02-14 09:10:01 -060018 * 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
24package generated
25
26import "github.com/deckarep/golang-set"
27
28// EthernetPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
29// Managed entity Ethernet performance monitoring history data
Chip Boling610117d2021-09-09 11:24:34 -050030const EthernetPerformanceMonitoringHistoryDataClassID = ClassID(24) // 0x0018
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var ethernetperformancemonitoringhistorydataBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// EthernetPerformanceMonitoringHistoryData (Class ID: #24 / 0x0018)
Chip Boling6e27b352020-02-14 09:10:01 -060035// This ME collects some of the PM data for a physical Ethernet interface. Instances of this ME are
36// created and deleted by the OLT.
37//
38// For a complete discussion of generic PM architecture, refer to clause I.4.
39//
40// Relationships
41// An instance of this ME is associated with an instance of the PPTP Ethernet UNI.
42//
43// Attributes
44// Managed Entity Id
Chip Boling610117d2021-09-09 11:24:34 -050045// This attribute uniquely identifies each instance of this ME. Through an identical ID, this ME is
46// implicitly linked to an instance of the PPTP Ethernet UNI. (R, setbycreate) (mandatory)
47// (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060048//
49// Interval End Time
Chip Boling610117d2021-09-09 11:24:34 -050050// This attribute identifies the most recently finished 15-min interval. (R) (mandatory) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -060051//
52// Threshold Data 1_2 Id
53// Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs
54// that contains PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes)
55//
56// Fcs Errors
Chip Boling610117d2021-09-09 11:24:34 -050057// This attribute counts frames received on a particular interface that were an integral number of
58// octets in length but failed the FCS check. The count is incremented when the MAC service returns
59// the frameCheckError status to the link layer control (LLC) or other MAC user. Received frames
60// for which multiple error conditions are obtained are counted according to the error status
61// presented to the LLC. (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060062//
63// Excessive Collision Counter
Chip Boling610117d2021-09-09 11:24:34 -050064// This attribute counts frames whose transmission failed due to excessive collisions.-(R)
65// (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060066//
67// Late Collision Counter
Chip Boling610117d2021-09-09 11:24:34 -050068// This attribute counts the number of times that a collision was detected later than 512 bit times
69// into the transmission of a packet. (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060070//
71// Frames Too Long
Chip Boling610117d2021-09-09 11:24:34 -050072// This attribute counts received frames that exceeded the maximum permitted frame size. The count
73// is incremented when the MAC service returns the frameTooLong status to the LLC. (R) (mandatory)
74// (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060075//
76// Buffer Overflows On Receive
Chip Boling610117d2021-09-09 11:24:34 -050077// This attribute counts the number of times that the receive buffer overflowed. (R) (mandatory)
78// (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060079//
80// Buffer Overflows On Transmit
Chip Boling610117d2021-09-09 11:24:34 -050081// This attribute counts the number of times that the transmit buffer overflowed. (R) (mandatory)
82// (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060083//
84// Single Collision Frame Counter
Chip Boling610117d2021-09-09 11:24:34 -050085// This attribute counts successfully transmitted frames whose transmission was delayed by exactly
86// one collision. (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060087//
88// Multiple Collisions Frame Counter
Chip Boling610117d2021-09-09 11:24:34 -050089// This attribute counts successfully transmitted frames whose transmission was delayed by more
90// than one collision. (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060091//
92// Sqe Counter
Chip Boling610117d2021-09-09 11:24:34 -050093// This attribute counts the number of times that the SQE test error message was generated by the
94// PLS sublayer. (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060095//
96// Deferred Transmission Counter
Chip Boling610117d2021-09-09 11:24:34 -050097// This attribute counts frames whose first transmission attempt was delayed because the medium was
98// busy. The count does not include frames involved in collisions. (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060099//
100// Internal Mac Transmit Error Counter
Chip Boling610117d2021-09-09 11:24:34 -0500101// This attribute counts frames whose transmission failed due to an internal MAC sublayer transmit
102// error. (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600103//
104// Carrier Sense Error Counter
Chip Boling610117d2021-09-09 11:24:34 -0500105// This attribute counts the number of times that carrier sense was lost or never asserted when
106// attempting to transmit a frame. (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600107//
108// Alignment Error Counter
Chip Boling610117d2021-09-09 11:24:34 -0500109// This attribute counts received frames that were not an integral number of octets in length and
110// did not pass the FCS check. (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600111//
112// Internal Mac Receive Error Counter
Chip Boling610117d2021-09-09 11:24:34 -0500113// This attribute counts frames whose reception failed due to an internal MAC sublayer receive
114// error. (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600115//
116type EthernetPerformanceMonitoringHistoryData struct {
117 ManagedEntityDefinition
118 Attributes AttributeValueMap
119}
120
121func init() {
122 ethernetperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
123 Name: "EthernetPerformanceMonitoringHistoryData",
124 ClassID: 24,
125 MessageTypes: mapset.NewSetWith(
126 Create,
127 Delete,
128 Get,
129 Set,
Chip Boling2d51f052021-02-09 09:04:15 -0600130 GetCurrentData,
Chip Boling6e27b352020-02-14 09:10:01 -0600131 ),
132 AllowedAttributeMask: 0xffff,
133 AttributeDefinitions: AttributeDefinitionMap{
134 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
135 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
136 2: Uint16Field("ThresholdData12Id", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
137 3: Uint32Field("FcsErrors", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
138 4: Uint32Field("ExcessiveCollisionCounter", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
139 5: Uint32Field("LateCollisionCounter", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
140 6: Uint32Field("FramesTooLong", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
141 7: Uint32Field("BufferOverflowsOnReceive", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
142 8: Uint32Field("BufferOverflowsOnTransmit", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
143 9: Uint32Field("SingleCollisionFrameCounter", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
144 10: Uint32Field("MultipleCollisionsFrameCounter", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
145 11: Uint32Field("SqeCounter", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
146 12: Uint32Field("DeferredTransmissionCounter", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
147 13: Uint32Field("InternalMacTransmitErrorCounter", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
148 14: Uint32Field("CarrierSenseErrorCounter", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
149 15: Uint32Field("AlignmentErrorCounter", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
150 16: Uint32Field("InternalMacReceiveErrorCounter", CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
151 },
152 Access: CreatedByOlt,
153 Support: UnknownSupport,
Chip Boling34ebcb62021-02-02 12:13:58 -0600154 Alarms: AlarmMap{
155 0: "FCS errors",
156 1: "Excessive collision counter",
157 2: "Late collision counter",
158 3: "Frames too long",
159 4: "Buffer overflows on receive",
160 5: "Buffer overflows on transmit",
161 6: "Single collision frame counter",
162 7: "Multiple collisions frame counter",
163 8: "SQE counter",
164 9: "Deferred transmission counter",
165 10: "Internal MAC transmit error counter",
166 11: "Carrier sense error counter",
167 12: "Alignment error counter",
168 13: "Internal MAC receive error counter",
169 },
Chip Boling6e27b352020-02-14 09:10:01 -0600170 }
171}
172
173// NewEthernetPerformanceMonitoringHistoryData (class ID 24) creates the basic
174// Managed Entity definition that is used to validate an ME of this type that
175// is received from or transmitted to the OMCC.
176func NewEthernetPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
177 return NewManagedEntity(*ethernetperformancemonitoringhistorydataBME, params...)
178}