blob: 28df9cb5ffaea7218d696935e60acfffa9e970f7 [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// EthernetFramePerformanceMonitoringHistoryDataUpstreamClassID is the 16-bit ID for the OMCI
29// Managed entity Ethernet frame performance monitoring history data upstream
30const EthernetFramePerformanceMonitoringHistoryDataUpstreamClassID ClassID = ClassID(322)
31
32var ethernetframeperformancemonitoringhistorydataupstreamBME *ManagedEntityDefinition
33
34// EthernetFramePerformanceMonitoringHistoryDataUpstream (class ID #322)
35// 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
48// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
49// identical ID, this ME is implicitly linked to an instance of a MAC bridge port configuration
50// data. (R, setbycreate) (mandatory) (2-bytes)
51//
52// Interval End Time
53// Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
54// (mandatory) (1-byte)
55//
56// Threshold Data 1_2 Id
57// Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
58// contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
59// data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
60//
61// Drop Events
62// Drop events: The total number of events in which packets were dropped due to a lack of
63// resources. This is not necessarily the number of packets dropped; it is the number of times this
64// event was detected. (R) (mandatory) (4-bytes)
65//
66// Octets
67// Octets: The total number of upstream octets received, including those in bad packets, excluding
68// framing bits, but including FCS. (R) (mandatory) (4-bytes)
69//
70// Packets
71// Packets: The total number of upstream packets received, including bad packets, broadcast packets
72// and multicast packets. (R) (mandatory) (4-bytes)
73//
74// Broadcast Packets
75// Broadcast packets: The total number of upstream good packets received that were directed to the
76// broadcast address. This does not include multicast packets. (R) (mandatory) (4-bytes)
77//
78// Multicast Packets
79// Multicast packets: The total number of upstream good packets received that were directed to a
80// multicast address. This does not include broadcast packets. (R) (mandatory) (4-bytes)
81//
82// Crc Errored Packets
83// CRC errored packets: The total number of upstream packets received that had a length (excluding
84// framing bits, but including FCS octets) of between 64-octets and 1518-octets, inclusive, but had
85// either a bad FCS with an integral number of octets (FCS error) or a bad FCS with a non-integral
86// number of octets (alignment error). (R) (mandatory) (4-bytes)
87//
88// Undersize Packets
89// Undersize packets: The total number of upstream packets received that were less than 64-octets
90// long, but were otherwise well formed (excluding framing bits, but including FCS). (R)
91// (mandatory) (4-bytes)
92//
93// Oversize Packets
94// NOTE 2 - If 2-000-byte Ethernet frames are supported, counts in this performance parameter are
95// not necessarily errors.
96//
97// Packets 64 Octets
98// Packets 64 octets: The total number of upstream received packets (including bad packets) that
99// were 64-octets long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
100//
101// Packets 65 To 127 Octets
102// Packets 65 to 127 octets: The total number of upstream received packets (including bad packets)
103// that were 65..127 octets long, excluding framing bits but including FCS. (R) (mandatory)
104// (4-bytes)
105//
106// Packets 128 To 255 Octets
107// Packets 128 to 255 octets: The total number of upstream packets (including bad packets) received
108// that were 128..255 octets long, excluding framing bits but including FCS. (R) (mandatory)
109// (4-bytes)
110//
111// Packets 256 To 511 Octets
112// Packets 256 to 511 octets: The total number of upstream packets (including bad packets) received
113// that were 256..511 octets long, excluding framing bits but including FCS. (R) (mandatory)
114// (4-bytes)
115//
116// Packets 512 To 1023 Octets
117// Packets 512 to 1023 octets: The total number of upstream packets (including bad packets)
118// received that were 512..1-023 octets long, excluding framing bits but including FCS. (R)
119// (mandatory) (4-bytes)
120//
121// Packets 1024 To 1518 Octets
122// Packets 1024 to 1518 octets: The total number of upstream packets (including bad packets)
123// received that were 1024..1518 octets long, excluding framing bits, but including FCS. (R)
124// (mandatory) (4-bytes)
125//
126type EthernetFramePerformanceMonitoringHistoryDataUpstream struct {
127 ManagedEntityDefinition
128 Attributes AttributeValueMap
129}
130
131func init() {
132 ethernetframeperformancemonitoringhistorydataupstreamBME = &ManagedEntityDefinition{
133 Name: "EthernetFramePerformanceMonitoringHistoryDataUpstream",
134 ClassID: 322,
135 MessageTypes: mapset.NewSetWith(
136 Create,
137 Delete,
138 Get,
139 Set,
140 ),
141 AllowedAttributeMask: 0xffff,
142 AttributeDefinitions: AttributeDefinitionMap{
143 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
144 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
145 2: Uint16Field("ThresholdData12Id", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
146 3: Uint32Field("DropEvents", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
147 4: Uint32Field("Octets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
148 5: Uint32Field("Packets", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
149 6: Uint32Field("BroadcastPackets", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
150 7: Uint32Field("MulticastPackets", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
151 8: Uint32Field("CrcErroredPackets", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
152 9: Uint32Field("UndersizePackets", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
153 10: Uint32Field("OversizePackets", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
154 11: Uint32Field("Packets64Octets", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
155 12: Uint32Field("Packets65To127Octets", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
156 13: Uint32Field("Packets128To255Octets", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
157 14: Uint32Field("Packets256To511Octets", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
158 15: Uint32Field("Packets512To1023Octets", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
159 16: Uint32Field("Packets1024To1518Octets", CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
160 },
161 Access: CreatedByOlt,
162 Support: UnknownSupport,
Chip Boling34ebcb62021-02-02 12:13:58 -0600163 Alarms: AlarmMap{
164 0: "Drop events",
165 1: "CRC errored packets",
166 2: "Undersize packets",
167 3: "Oversize packets",
168 },
Chip Boling6e27b352020-02-14 09:10:01 -0600169 }
170}
171
172// NewEthernetFramePerformanceMonitoringHistoryDataUpstream (class ID 322) creates the basic
173// Managed Entity definition that is used to validate an ME of this type that
174// is received from or transmitted to the OMCC.
175func NewEthernetFramePerformanceMonitoringHistoryDataUpstream(params ...ParamData) (*ManagedEntity, OmciErrors) {
176 return NewManagedEntity(*ethernetframeperformancemonitoringhistorydataupstreamBME, params...)
177}