blob: c3cbae7e2abcae68632ecb100bcedc51432ac59c [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// EthernetFrameExtendedPm64BitClassID is the 16-bit ID for the OMCI
29// Managed entity Ethernet frame extended PM 64-bit
30const EthernetFrameExtendedPm64BitClassID ClassID = ClassID(426)
31
32var ethernetframeextendedpm64bitBME *ManagedEntityDefinition
33
34// EthernetFrameExtendedPm64Bit (class ID #426)
35// This ME collects some of the PM data at a point where an Ethernet flow can be observed. It is
36// based on the Etherstats group of [IETF RFC 2819] and [IETF RFC 2863]. Instances of this ME are
37// created and deleted by the OLT. References to received frames are to be interpreted as the
38// number of frames entering the monitoring point in the direction specified by the control block.
39//
40// For a complete discussion of generic PM architecture, refer to clause I.4.
41//
42// Attributes
43// Managed Entity Id
44// Managed entity ID: This attribute uniquely identifies each instance of this ME. To facilitate
45// discovery, the identification of instances sequentially starting with 1 is encouraged. (R,
46// setbycreate) (mandatory) (2 bytes)
47//
48// Interval End Time
49// Interval end time: This attribute identifies the most recently finished 15-min interval. If
50// continuous accumulation is enabled in the control block, this attribute is not used and has the
51// fixed value 0. (R) (mandatory) (1 byte)
52//
53// Control Block
54// (R, W, setbycreate) (mandatory) (16 bytes)
55//
56// Drop Events
57// Drop events: The total number of events in which frames were dropped due to a lack of resources.
58// This is not necessarily the number of frames dropped; it is the number of times this event was
59// detected. (R) (mandatory) (4 bytes)
60//
61// Octets
62// Octets: The total number of octets received, including those in bad frames, excluding framing
63// bits, but including FCS. (R) (mandatory) (4 bytes)
64//
65// Frames
66// Frames: The total number of frames received, including bad frames, broadcast frames and
67// multicast frames. (R) (mandatory) (4 bytes)
68//
69// Broadcast Frames
70// Broadcast frames: The total number of received good frames directed to the broadcast address.
71// This does not include multicast frames. (R) (mandatory) (4 bytes)
72//
73// Multicast Frames
74// Multicast frames: The total number of received good frames directed to a multicast address. This
75// does not include broadcast frames. (R) (mandatory) (4 bytes)
76//
77// Crc Errored Frames
78// CRC errored frames: The total number of frames received that had a length (excluding framing
79// bits, but including FCS octets) of between 64 and 1518 octets, inclusive, but had either a bad
80// FCS with an integral number of octets (FCS error) or a bad FCS with a non-integral number of
81// octets (alignment error). (R) (mandatory) (4 bytes)
82//
83// Undersize Frames
84// Undersize frames: The total number of frames received that were less than 64 octets long but
85// were otherwise well formed (excluding framing bits, but including FCS octets). (R) (mandatory)
86// (4 bytes)
87//
88// Oversize Frames
89// Oversize frames: The total number of frames received that were longer than 1518 octets
90// (excluding framing bits, but including FCS octets) and were otherwise well formed. (R)
91// (mandatory) (4 bytes)
92//
93// Frames 64 Octets
94// Frames 64 octets: The total number of received frames (including bad frames) that were 64-octets
95// long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
96//
97// Frames 65 To 127 Octets
98// Frames 65 to 127 octets: The total number of received frames (including bad frames) that were
99// 65..127 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
100//
101// Frames 128 To 255 Octets
102// Frames 128 to 255 octets: The total number of frames (including bad frames) received that were
103// 128..255 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
104//
105// Frames 256 To 511 Octets
106// Frames 256 to 511 octets: The total number of frames (including bad frames) received that were
107// 256..511 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
108//
109// Frames 512 To 1 023 Octets
110// Frames 512 to 1-023 octets: The total number of frames (including bad frames) received that were
111// 512..1-023 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
112//
113// Frames 1024 To 1518 Octets
114// Frames 1024 to 1518 octets: The total number of frames (including bad frames) received that were
115// 1024..1518 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
116//
117type EthernetFrameExtendedPm64Bit struct {
118 ManagedEntityDefinition
119 Attributes AttributeValueMap
120}
121
122func init() {
123 ethernetframeextendedpm64bitBME = &ManagedEntityDefinition{
124 Name: "EthernetFrameExtendedPm64Bit",
125 ClassID: 426,
126 MessageTypes: mapset.NewSetWith(
127 Create,
128 Delete,
129 Get,
130 Set,
Chip Boling2d51f052021-02-09 09:04:15 -0600131 GetCurrentData,
Chip Boling6e27b352020-02-14 09:10:01 -0600132 ),
133 AllowedAttributeMask: 0xffff,
134 AttributeDefinitions: AttributeDefinitionMap{
135 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
136 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
137 2: MultiByteField("ControlBlock", OctetsAttributeType, 0x4000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
138 3: Uint64Field("DropEvents", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
139 4: Uint64Field("Octets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
140 5: Uint64Field("Frames", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
141 6: Uint64Field("BroadcastFrames", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
142 7: Uint64Field("MulticastFrames", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
143 8: Uint64Field("CrcErroredFrames", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
144 9: Uint64Field("UndersizeFrames", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
145 10: Uint64Field("OversizeFrames", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
146 11: Uint64Field("Frames64Octets", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
147 12: Uint64Field("Frames65To127Octets", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
148 13: Uint64Field("Frames128To255Octets", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
149 14: Uint64Field("Frames256To511Octets", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
150 15: Uint64Field("Frames512To1023Octets", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
151 16: Uint64Field("Frames1024To1518Octets", CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
152 },
153 Access: CreatedByOlt,
154 Support: UnknownSupport,
Chip Boling34ebcb62021-02-02 12:13:58 -0600155 Alarms: AlarmMap{
156 1: "Drop events",
157 2: "CRC errored frames",
158 3: "Undersize frames",
159 4: "Oversize frames",
160 },
Chip Boling6e27b352020-02-14 09:10:01 -0600161 }
162}
163
164// NewEthernetFrameExtendedPm64Bit (class ID 426) creates the basic
165// Managed Entity definition that is used to validate an ME of this type that
166// is received from or transmitted to the OMCC.
167func NewEthernetFrameExtendedPm64Bit(params ...ParamData) (*ManagedEntity, OmciErrors) {
168 return NewManagedEntity(*ethernetframeextendedpm64bitBME, params...)
169}