blob: a4cfd62ef11c448e779e395c465682e23e63a7dc [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Matteo Scandolof9d43412021-01-12 11:11:34 -08003 * Copyright 2020-present Open Networking Foundation
4
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07005 * 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
Matteo Scandolof9d43412021-01-12 11:11:34 -08008
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Matteo Scandolof9d43412021-01-12 11:11:34 -080010
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070011 * 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 */
17/*
18 * 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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080023
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070024package generated
25
26import "github.com/deckarep/golang-set"
27
Matteo Scandolof9d43412021-01-12 11:11:34 -080028// EthernetFrameExtendedPmClassID is the 16-bit ID for the OMCI
29// Managed entity Ethernet frame extended PM
30const EthernetFrameExtendedPmClassID ClassID = ClassID(334)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
32var ethernetframeextendedpmBME *ManagedEntityDefinition
33
34// EthernetFrameExtendedPm (class ID #334)
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]. Instances of this ME are created and deleted
37// by the OLT. References to received frames are to be interpreted as the number of frames entering
38// 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// Relationships
43// An instance of this ME may be associated with an instance of an ME at any Ethernet interface
44// within the ONU. The specific ME is identified in the control block attribute.
45//
46// Attributes
47// Managed Entity Id
48// Managed entity ID: This attribute uniquely identifies each instance of this ME. To facilitate
49// discovery, the identification of instances sequentially starting with 1 is encouraged. (R,
50// setbycreate) (mandatory) (2 bytes)
51//
52// Interval End Time
Matteo Scandolof9d43412021-01-12 11:11:34 -080053// Interval end time: This attribute identifies the most recently finished 15-min interval. If
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070054// continuous accumulation is enabled in the control block, this attribute is not used and has the
55// fixed value 0. (R) (mandatory) (1 byte)
56//
57// Control Block
58// (R, W, setbycreate) (mandatory) (16 bytes)
59//
60// Drop Events
61// Drop events: The total number of events in which frames were dropped due to a lack of resources.
62// This is not necessarily the number of frames dropped; it is the number of times this event was
63// detected. (R) (mandatory) (4 bytes)
64//
65// Octets
66// Octets: The total number of octets received, including those in bad frames, excluding framing
67// bits, but including FCS. (R) (mandatory) (4 bytes)
68//
69// Frames
70// Frames: The total number of frames received, including bad frames, broadcast frames and
71// multicast frames. (R) (mandatory) (4 bytes)
72//
73// Broadcast Frames
74// Broadcast frames: The total number of received good frames directed to the broadcast address.
75// This does not include multicast frames. (R) (mandatory) (4 bytes)
76//
77// Multicast Frames
78// Multicast frames: The total number of received good frames directed to a multicast address. This
79// does not include broadcast frames. (R) (mandatory) (4 bytes)
80//
81// Crc Errored Frames
82// CRC errored frames: The total number of frames received that had a length (excluding framing
83// bits, but including FCS octets) of between 64 and 1518 octets, inclusive, but had either a bad
84// FCS with an integral number of octets (FCS error) or a bad FCS with a non-integral number of
85// octets (alignment error). (R) (mandatory) (4 bytes)
86//
87// Undersize Frames
88// Undersize frames: The total number of frames received that were less than 64 octets long but
89// were otherwise well formed (excluding framing bits, but including FCS octets). (R) (mandatory)
90// (4 bytes)
91//
92// Oversize Frames
93// Oversize frames: The total number of frames received that were longer than 1518 octets
94// (excluding framing bits, but including FCS octets) and were otherwise well formed. (R)
95// (mandatory) (4 bytes)
96//
97// Frames 64 Octets
Matteo Scandolof9d43412021-01-12 11:11:34 -080098// Frames 64 octets: The total number of received frames (including bad frames) that were 64-octets
99// long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700100//
101// Frames 65 To 127 Octets
102// Frames 65 to 127 octets: The total number of received frames (including bad frames) that were
103// 65..127 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
104//
105// Frames 128 To 255 Octets
106// Frames 128 to 255 octets: The total number of frames (including bad frames) received that were
107// 128..255 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
108//
109// Frames 256 To 511 Octets
110// Frames 256 to 511 octets: The total number of frames (including bad frames) received that were
111// 256..511 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
112//
113// Frames 512 To 1 023 Octets
Matteo Scandolof9d43412021-01-12 11:11:34 -0800114// Frames 512 to 1-023 octets: The total number of frames (including bad frames) received that were
115// 512..1-023 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700116//
117// Frames 1024 To 1518 Octets
118// Frames 1024 to 1518 octets: The total number of frames (including bad frames) received that were
119// 1024..1518 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
120//
121type EthernetFrameExtendedPm struct {
122 ManagedEntityDefinition
123 Attributes AttributeValueMap
124}
125
126func init() {
127 ethernetframeextendedpmBME = &ManagedEntityDefinition{
128 Name: "EthernetFrameExtendedPm",
129 ClassID: 334,
130 MessageTypes: mapset.NewSetWith(
131 Create,
132 Delete,
133 Get,
134 Set,
135 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800136 AllowedAttributeMask: 0xffff,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700137 AttributeDefinitions: AttributeDefinitionMap{
Matteo Scandolof9d43412021-01-12 11:11:34 -0800138 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
139 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
140 2: MultiByteField("ControlBlock", OctetsAttributeType, 0x4000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
141 3: Uint32Field("DropEvents", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
142 4: Uint32Field("Octets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
143 5: Uint32Field("Frames", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
144 6: Uint32Field("BroadcastFrames", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
145 7: Uint32Field("MulticastFrames", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
146 8: Uint32Field("CrcErroredFrames", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
147 9: Uint32Field("UndersizeFrames", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
148 10: Uint32Field("OversizeFrames", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
149 11: Uint32Field("Frames64Octets", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
150 12: Uint32Field("Frames65To127Octets", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
151 13: Uint32Field("Frames128To255Octets", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
152 14: Uint32Field("Frames256To511Octets", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
153 15: Uint32Field("Frames512To1023Octets", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
154 16: Uint32Field("Frames1024To1518Octets", CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
155 },
156 Access: CreatedByOlt,
157 Support: UnknownSupport,
158 Alarms: AlarmMap{
159 1: "Drop events",
160 2: "CRC errored frames",
161 3: "Undersize frames",
162 4: "Oversize frames",
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700163 },
164 }
165}
166
Matteo Scandolof9d43412021-01-12 11:11:34 -0800167// NewEthernetFrameExtendedPm (class ID 334) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700168// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800169// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700170func NewEthernetFrameExtendedPm(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800171 return NewManagedEntity(*ethernetframeextendedpmBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700172}