blob: 54cf90f343d57a2951168bf828733f506dc31fd7 [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
Chip Boling8cdd6392022-01-27 08:43:37 -06004 *
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
Chip Boling8cdd6392022-01-27 08:43:37 -06008 *
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Chip Boling8cdd6392022-01-27 08:43:37 -060010 *
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// EthernetFramePerformanceMonitoringHistoryDataUpstreamClassID is the 16-bit ID for the OMCI
29// Managed entity Ethernet frame performance monitoring history data upstream
Chip Boling610117d2021-09-09 11:24:34 -050030const EthernetFramePerformanceMonitoringHistoryDataUpstreamClassID = ClassID(322) // 0x0142
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var ethernetframeperformancemonitoringhistorydataupstreamBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// EthernetFramePerformanceMonitoringHistoryDataUpstream (Class ID: #322 / 0x0142)
Chip Boling6e27b352020-02-14 09:10:01 -060035// This ME collects PM data associated with upstream Ethernet frame delivery. It is based on the
36// Etherstats group of [IETF RFC 2819]. Instances of this ME are created and deleted by the OLT.
37//
38// For a complete discussion of generic PM architecture, refer to clause I.4.
39//
40// NOTE 1 - Implementers are encouraged to consider the Ethernet frame extended PM ME defined in
41// clause-9.3.32, which collects the same counters in a more generalized way.
42//
43// Relationships
44// An instance of this ME is associated with an instance of a MAC bridge port configuration data.
45//
46// Attributes
47// Managed Entity Id
Chip Boling610117d2021-09-09 11:24:34 -050048// This attribute uniquely identifies each instance of this ME. Through an identical ID, this ME is
49// implicitly linked to an instance of a MAC bridge port configuration data. (R, setbycreate)
50// (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060051//
52// Interval End Time
Chip Boling610117d2021-09-09 11:24:34 -050053// This attribute identifies the most recently finished 15-min interval. (R) (mandatory) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -060054//
55// Threshold Data 1_2 Id
56// Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
57// contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
58// data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
59//
60// Drop Events
Chip Boling610117d2021-09-09 11:24:34 -050061// The total number of events in which packets were dropped due to a lack of resources. This is not
62// necessarily the number of packets dropped; it is the number of times this event was detected.
63// (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060064//
65// Octets
Chip Boling610117d2021-09-09 11:24:34 -050066// The total number of upstream octets received, including those in bad packets, excluding framing
67// bits, but including FCS. (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060068//
69// Packets
Chip Boling610117d2021-09-09 11:24:34 -050070// The total number of upstream packets received, including bad packets, broadcast packets and
71// multicast packets. (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060072//
73// Broadcast Packets
Chip Boling610117d2021-09-09 11:24:34 -050074// The total number of upstream good packets received that were directed to the broadcast address.
75// This does not include multicast packets. (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060076//
77// Multicast Packets
Chip Boling610117d2021-09-09 11:24:34 -050078// The total number of upstream good packets received that were directed to a multicast address.
79// This does not include broadcast packets. (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060080//
81// Crc Errored Packets
Chip Boling610117d2021-09-09 11:24:34 -050082// The total number of upstream packets received that had a length (excluding framing bits, but
83// including FCS octets) of between 64-octets and 1518-octets, inclusive, but had either a bad FCS
84// with an integral number of octets (FCS error) or a bad FCS with a non-integral number of octets
85// (alignment error). (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060086//
87// Undersize Packets
Chip Boling610117d2021-09-09 11:24:34 -050088// The total number of upstream packets received that were less than 64-octets long, but were
89// otherwise well formed (excluding framing bits, but including FCS). (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060090//
91// Oversize Packets
92// NOTE 2 - If 2-000-byte Ethernet frames are supported, counts in this performance parameter are
93// not necessarily errors.
94//
Chip Boling610117d2021-09-09 11:24:34 -050095// The total number of upstream packets received that were longer than 1518-octets (excluding
96// framing bits, but including FCS) and were otherwise well formed. (R) (mandatory) (4-bytes)
97//
Chip Boling6e27b352020-02-14 09:10:01 -060098// Packets 64 Octets
Chip Boling610117d2021-09-09 11:24:34 -050099// The total number of upstream received packets (including bad packets) that were 64-octets long,
100// excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600101//
102// Packets 65 To 127 Octets
Chip Boling610117d2021-09-09 11:24:34 -0500103// The total number of upstream received packets (including bad packets) that were 65..127 octets
104// long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600105//
106// Packets 128 To 255 Octets
Chip Boling610117d2021-09-09 11:24:34 -0500107// The total number of upstream packets (including bad packets) received that were 128..255 octets
108// long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600109//
110// Packets 256 To 511 Octets
Chip Boling610117d2021-09-09 11:24:34 -0500111// The total number of upstream packets (including bad packets) received that were 256..511 octets
112// long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600113//
114// Packets 512 To 1023 Octets
Chip Boling610117d2021-09-09 11:24:34 -0500115// The total number of upstream packets (including bad packets) received that were 512..1-023
116// octets long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600117//
118// Packets 1024 To 1518 Octets
Chip Boling610117d2021-09-09 11:24:34 -0500119// The total number of upstream packets (including bad packets) received that were 1024..1518
120// octets long, excluding framing bits, but including FCS. (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600121//
122type EthernetFramePerformanceMonitoringHistoryDataUpstream struct {
123 ManagedEntityDefinition
124 Attributes AttributeValueMap
125}
126
Chip Boling8cdd6392022-01-27 08:43:37 -0600127// Attribute name constants
128
129const EthernetFramePerformanceMonitoringHistoryDataUpstream_IntervalEndTime = "IntervalEndTime"
130const EthernetFramePerformanceMonitoringHistoryDataUpstream_ThresholdData12Id = "ThresholdData12Id"
131const EthernetFramePerformanceMonitoringHistoryDataUpstream_DropEvents = "DropEvents"
132const EthernetFramePerformanceMonitoringHistoryDataUpstream_Octets = "Octets"
133const EthernetFramePerformanceMonitoringHistoryDataUpstream_Packets = "Packets"
134const EthernetFramePerformanceMonitoringHistoryDataUpstream_BroadcastPackets = "BroadcastPackets"
135const EthernetFramePerformanceMonitoringHistoryDataUpstream_MulticastPackets = "MulticastPackets"
136const EthernetFramePerformanceMonitoringHistoryDataUpstream_CrcErroredPackets = "CrcErroredPackets"
137const EthernetFramePerformanceMonitoringHistoryDataUpstream_UndersizePackets = "UndersizePackets"
138const EthernetFramePerformanceMonitoringHistoryDataUpstream_OversizePackets = "OversizePackets"
139const EthernetFramePerformanceMonitoringHistoryDataUpstream_Packets64Octets = "Packets64Octets"
140const EthernetFramePerformanceMonitoringHistoryDataUpstream_Packets65To127Octets = "Packets65To127Octets"
141const EthernetFramePerformanceMonitoringHistoryDataUpstream_Packets128To255Octets = "Packets128To255Octets"
142const EthernetFramePerformanceMonitoringHistoryDataUpstream_Packets256To511Octets = "Packets256To511Octets"
143const EthernetFramePerformanceMonitoringHistoryDataUpstream_Packets512To1023Octets = "Packets512To1023Octets"
144const EthernetFramePerformanceMonitoringHistoryDataUpstream_Packets1024To1518Octets = "Packets1024To1518Octets"
145
Chip Boling6e27b352020-02-14 09:10:01 -0600146func init() {
147 ethernetframeperformancemonitoringhistorydataupstreamBME = &ManagedEntityDefinition{
148 Name: "EthernetFramePerformanceMonitoringHistoryDataUpstream",
Chip Boling8cdd6392022-01-27 08:43:37 -0600149 ClassID: EthernetFramePerformanceMonitoringHistoryDataUpstreamClassID,
Chip Boling6e27b352020-02-14 09:10:01 -0600150 MessageTypes: mapset.NewSetWith(
151 Create,
152 Delete,
153 Get,
154 Set,
Chip Boling2d51f052021-02-09 09:04:15 -0600155 GetCurrentData,
Chip Boling6e27b352020-02-14 09:10:01 -0600156 ),
157 AllowedAttributeMask: 0xffff,
158 AttributeDefinitions: AttributeDefinitionMap{
Chip Boling8cdd6392022-01-27 08:43:37 -0600159 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
160 1: ByteField(EthernetFramePerformanceMonitoringHistoryDataUpstream_IntervalEndTime, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
161 2: Uint16Field(EthernetFramePerformanceMonitoringHistoryDataUpstream_ThresholdData12Id, PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
162 3: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataUpstream_DropEvents, CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
163 4: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataUpstream_Octets, CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
164 5: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataUpstream_Packets, CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
165 6: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataUpstream_BroadcastPackets, CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
166 7: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataUpstream_MulticastPackets, CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
167 8: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataUpstream_CrcErroredPackets, CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
168 9: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataUpstream_UndersizePackets, CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
169 10: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataUpstream_OversizePackets, CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
170 11: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataUpstream_Packets64Octets, CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
171 12: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataUpstream_Packets65To127Octets, CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
172 13: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataUpstream_Packets128To255Octets, CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
173 14: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataUpstream_Packets256To511Octets, CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
174 15: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataUpstream_Packets512To1023Octets, CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
175 16: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataUpstream_Packets1024To1518Octets, CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
Chip Boling6e27b352020-02-14 09:10:01 -0600176 },
177 Access: CreatedByOlt,
178 Support: UnknownSupport,
Chip Boling34ebcb62021-02-02 12:13:58 -0600179 Alarms: AlarmMap{
180 0: "Drop events",
181 1: "CRC errored packets",
182 2: "Undersize packets",
183 3: "Oversize packets",
184 },
Chip Boling6e27b352020-02-14 09:10:01 -0600185 }
186}
187
188// NewEthernetFramePerformanceMonitoringHistoryDataUpstream (class ID 322) creates the basic
189// Managed Entity definition that is used to validate an ME of this type that
190// is received from or transmitted to the OMCC.
191func NewEthernetFramePerformanceMonitoringHistoryDataUpstream(params ...ParamData) (*ManagedEntity, OmciErrors) {
192 return NewManagedEntity(*ethernetframeperformancemonitoringhistorydataupstreamBME, params...)
193}