blob: 625818a7d63ac7ca13b3cca6bd7ec8471b0bbb75 [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// EthernetFrameExtendedPm64BitClassID is the 16-bit ID for the OMCI
29// Managed entity Ethernet frame extended PM 64-bit
30const EthernetFrameExtendedPm64BitClassID ClassID = ClassID(426)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
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
Matteo Scandolof9d43412021-01-12 11:11:34 -080049// Interval end time: This attribute identifies the most recently finished 15-min interval. If
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070050// 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
Matteo Scandolof9d43412021-01-12 11:11:34 -080094// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070096//
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
Matteo Scandolof9d43412021-01-12 11:11:34 -0800110// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700112//
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,
131 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800132 AllowedAttributeMask: 0xffff,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700133 AttributeDefinitions: AttributeDefinitionMap{
Matteo Scandolof9d43412021-01-12 11:11:34 -0800134 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
135 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
136 2: MultiByteField("ControlBlock", OctetsAttributeType, 0x4000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
137 3: Uint64Field("DropEvents", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
138 4: Uint64Field("Octets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
139 5: Uint64Field("Frames", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
140 6: Uint64Field("BroadcastFrames", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
141 7: Uint64Field("MulticastFrames", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
142 8: Uint64Field("CrcErroredFrames", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
143 9: Uint64Field("UndersizeFrames", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
144 10: Uint64Field("OversizeFrames", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
145 11: Uint64Field("Frames64Octets", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
146 12: Uint64Field("Frames65To127Octets", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
147 13: Uint64Field("Frames128To255Octets", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
148 14: Uint64Field("Frames256To511Octets", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
149 15: Uint64Field("Frames512To1023Octets", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
150 16: Uint64Field("Frames1024To1518Octets", CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
151 },
152 Access: CreatedByOlt,
153 Support: UnknownSupport,
154 Alarms: AlarmMap{
155 1: "Drop events",
156 2: "CRC errored frames",
157 3: "Undersize frames",
158 4: "Oversize frames",
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700159 },
160 }
161}
162
Matteo Scandolof9d43412021-01-12 11:11:34 -0800163// NewEthernetFrameExtendedPm64Bit (class ID 426) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700164// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800165// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700166func NewEthernetFrameExtendedPm64Bit(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800167 return NewManagedEntity(*ethernetframeextendedpm64bitBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700168}