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