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