blob: f9d02322ae41b8d68804c8fb7d865e6351127d55 [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
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 * http://www.apache.org/licenses/LICENSE-2.0
8 * Unless required by applicable law or agreed to in writing, software
9 * distributed under the License is distributed on an "AS IS" BASIS,
10 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 * See the License for the specific language governing permissions and
12 * limitations under the License.
13 */
14/*
15 * NOTE: This file was generated, manual edits will be overwritten!
16 *
17 * Generated by 'goCodeGenerator.py':
18 * https://github.com/cboling/OMCI-parser/README.md
19 */
20
21package generated
22
23import "github.com/deckarep/golang-set"
24
25// EthernetPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
26// Managed entity Ethernet performance monitoring history data
27const EthernetPerformanceMonitoringHistoryDataClassID ClassID = ClassID(24)
28
29var ethernetperformancemonitoringhistorydataBME *ManagedEntityDefinition
30
31// EthernetPerformanceMonitoringHistoryData (class ID #24)
32// This ME collects some of the PM data for a physical Ethernet interface. Instances of this ME are
33// created and deleted by the OLT.
34//
35// For a complete discussion of generic PM architecture, refer to clause I.4.
36//
37// Relationships
38// An instance of this ME is associated with an instance of the PPTP Ethernet UNI.
39//
40// Attributes
41// Managed Entity Id
42// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
43// identical ID, this ME is implicitly linked to an instance of the PPTP Ethernet UNI. (R,
44// setbycreate) (mandatory) (2-bytes)
45//
46// Interval End Time
47// Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
48// (mandatory) (1-byte)
49//
50// Threshold Data 1_2 Id
51// Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs
52// that contains PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes)
53//
54// Fcs Errors
55// FCS errors: This attribute counts frames received on a particular interface that were an
56// integral number of octets in length but failed the FCS check. The count is incremented when the
57// MAC service returns the frameCheckError status to the link layer control (LLC) or other MAC
58// user. Received frames for which multiple error conditions are obtained are counted according to
59// the error status presented to the LLC. (R) (mandatory) (4-bytes)
60//
61// Excessive Collision Counter
62// Excessive collision counter: This attribute counts frames whose transmission failed due to
63// excessive collisions.-(R) (mandatory) (4-bytes)
64//
65// Late Collision Counter
66// Late collision counter: This attribute counts the number of times that a collision was detected
67// later than 512 bit times into the transmission of a packet. (R) (mandatory) (4-bytes)
68//
69// Frames Too Long
70// Frames too long: This attribute counts received frames that exceeded the maximum permitted frame
71// size. The count is incremented when the MAC service returns the frameTooLong status to the LLC.
72// (R) (mandatory) (4-bytes)
73//
74// Buffer Overflows On Receive
75// Buffer overflows on receive: This attribute counts the number of times that the receive buffer
76// overflowed. (R) (mandatory) (4-bytes)
77//
78// Buffer Overflows On Transmit
79// Buffer overflows on transmit: This attribute counts the number of times that the transmit buffer
80// overflowed. (R) (mandatory) (4-bytes)
81//
82// Single Collision Frame Counter
83// Single collision frame counter: This attribute counts successfully transmitted frames whose
84// transmission was delayed by exactly one collision. (R) (mandatory) (4-bytes)
85//
86// Multiple Collisions Frame Counter
87// Multiple collisions frame counter: This attribute counts successfully transmitted frames whose
88// transmission was delayed by more than one collision. (R) (mandatory) (4-bytes)
89//
90// Sqe Counter
91// SQE counter: This attribute counts the number of times that the SQE test error message was
92// generated by the PLS sublayer. (R) (mandatory) (4-bytes)
93//
94// Deferred Transmission Counter
95// Deferred transmission counter: This attribute counts frames whose first transmission attempt was
96// delayed because the medium was busy. The count does not include frames involved in collisions.
97// (R) (mandatory) (4-bytes)
98//
99// Internal Mac Transmit Error Counter
100// Internal MAC transmit error counter: This attribute counts frames whose transmission failed due
101// to an internal MAC sublayer transmit error. (R) (mandatory) (4-bytes)
102//
103// Carrier Sense Error Counter
104// Carrier sense error counter: This attribute counts the number of times that carrier sense was
105// lost or never asserted when attempting to transmit a frame. (R) (mandatory) (4-bytes)
106//
107// Alignment Error Counter
108// Alignment error counter: This attribute counts received frames that were not an integral number
109// of octets in length and did not pass the FCS check. (R) (mandatory) (4-bytes)
110//
111// Internal Mac Receive Error Counter
112// Internal MAC receive error counter: This attribute counts frames whose reception failed due to
113// an internal MAC sublayer receive error. (R) (mandatory) (4-bytes)
114//
115type EthernetPerformanceMonitoringHistoryData struct {
116 ManagedEntityDefinition
117 Attributes AttributeValueMap
118}
119
120func init() {
121 ethernetperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
122 Name: "EthernetPerformanceMonitoringHistoryData",
123 ClassID: 24,
124 MessageTypes: mapset.NewSetWith(
125 Create,
126 Delete,
127 Get,
128 Set,
129 ),
130 AllowedAttributeMask: 0xffff,
131 AttributeDefinitions: AttributeDefinitionMap{
132 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
133 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
134 2: Uint16Field("ThresholdData12Id", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
135 3: Uint32Field("FcsErrors", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
136 4: Uint32Field("ExcessiveCollisionCounter", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
137 5: Uint32Field("LateCollisionCounter", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
138 6: Uint32Field("FramesTooLong", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
139 7: Uint32Field("BufferOverflowsOnReceive", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
140 8: Uint32Field("BufferOverflowsOnTransmit", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
141 9: Uint32Field("SingleCollisionFrameCounter", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
142 10: Uint32Field("MultipleCollisionsFrameCounter", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
143 11: Uint32Field("SqeCounter", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
144 12: Uint32Field("DeferredTransmissionCounter", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
145 13: Uint32Field("InternalMacTransmitErrorCounter", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
146 14: Uint32Field("CarrierSenseErrorCounter", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
147 15: Uint32Field("AlignmentErrorCounter", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
148 16: Uint32Field("InternalMacReceiveErrorCounter", CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
149 },
150 Access: CreatedByOlt,
151 Support: UnknownSupport,
152 }
153}
154
155// NewEthernetPerformanceMonitoringHistoryData (class ID 24) creates the basic
156// Managed Entity definition that is used to validate an ME of this type that
157// is received from or transmitted to the OMCC.
158func NewEthernetPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
159 return NewManagedEntity(*ethernetperformancemonitoringhistorydataBME, params...)
160}