blob: bad6912c75d7ca8cfd1d0cb8879a1bffd417435a [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// EthernetFrameExtendedPmClassID is the 16-bit ID for the OMCI
29// Managed entity Ethernet frame extended PM
Chip Boling610117d2021-09-09 11:24:34 -050030const EthernetFrameExtendedPmClassID = ClassID(334) // 0x014e
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var ethernetframeextendedpmBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// EthernetFrameExtendedPm (Class ID: #334 / 0x014e)
Chip Boling6e27b352020-02-14 09:10:01 -060035// 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
Chip Boling610117d2021-09-09 11:24:34 -050048// This attribute uniquely identifies each instance of this ME. To facilitate discovery, the
49// identification of instances sequentially starting with 1 is encouraged. (R, setbycreate)
50// (mandatory) (2 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060051//
52// Interval End Time
Chip Boling610117d2021-09-09 11:24:34 -050053// This attribute identifies the most recently finished 15-min interval. If continuous accumulation
54// is enabled in the control block, this attribute is not used and has the fixed value 0. (R)
55// (mandatory) (1 byte)
Chip Boling6e27b352020-02-14 09:10:01 -060056//
57// Control Block
Chip Boling610117d2021-09-09 11:24:34 -050058// This attribute contains fields defined as follows.+
59//
60// Threshold data 1/2 ID: (2 bytes) This attribute points to an instance of the threshold data 1 ME
61// that contains PM threshold values. Since no threshold value attribute number exceeds 7, a
62// threshold data 2 ME is optional. When PM is collected on a continuously running basis, rather
63// than in 15-min intervals, counter thresholds should not be established. There is no mechanism to
64// clear a TCA, and any counter parameter may eventually be expected to cross any given threshold
65// value.
66//
67// Parent ME class: (2 bytes) This field contains the enumerated value of the ME class of the PM
68// ME's parent. Together with the parent ME instance field, this permits a given PM ME to be
69// associated with any OMCI ME. The supported ME classes are as follows.
70//
71// 46 MAC bridge configuration data
72//
73// 47 MAC bridge port configuration data
74//
75// 11 Physical path termination point Ethernet UNI
76//
77// 98 Physical path termination point xDSL UNI part 1
78//
79// 266 GEM IW termination point
80//
81// 281 Multicast GEM IW termination point
82//
83// 329 Virtual Ethernet interface point
84//
85// 162 Physical path termination point MoCA UNI
86//
87// Parent ME instance: (2 bytes) This field identifies the specific parent ME instance to which the
88// PM ME is attached.
89//
90// Accumulation disable: (2 bytes) This bit field allows PM accumulation to be disabled; refer to
91// Table 9.3.32-1. The default value 0 enables PM collection. If bit 15 is set to 1, no PM is
92// collected by this ME instance. If bit 15-=-0 and any of bits 14..1 are set to 1, PM collection
93// is inhibited for the attributes indicated by the 1 bits. Inhibiting PM collection does not
94// change the value of a PM attribute, but if PM is accumulated in 15-min intervals, the value is
95// lost at the next 15-min interval boundary.
96//
97// Bit 16 is an action bit that always reads back as 0. When written to 1, it resets all PM
98// attributes in the ME, and clears any TCAs that may be outstanding.
99//
100// TCA disable: (2 bytes). Also clarified in Table 9.3.32-1, this field permits TCAs to be
101// inhibited, either individually or for the complete ME instance. As with the accumulation disable
102// field, the default value 0 enables TCAs, and setting the global disable bit overrides the
103// settings of the individual thresholds. Unlike the accumulation disable field, the bits are
104// mapped to the thresholds defined in the associated threshold data 1 and 2 ME instances. When the
105// global or attribute-specific value changes from 0 to 1, outstanding TCAs are cleared, either for
106// the ME instance globally or for the individual disabled threshold. These bits affect only
107// notifications, not the underlying parameter accumulation or storage.
108//
109// If the threshold data 1/2 ID attribute does not contain a valid pointer, this field is not
110// meaningful.
111//
112// Thresholds should be used with caution if PM attributes are accumulated continuously.
113//
114// Control fields: (2 bytes). This field is a bit map whose values govern the behaviour of the PM
115// ME. Bits are assigned as follows.
116//
117// Bit 1 (LSB) The value 1 specifies continuous accumulation, regardless of 15-min intervals. There
118// is no concept of current and historical accumulators; get and get current data (if supported)
119// both return current values. The value 0 specifies 15-min accumulators exactly like those of
120// classical PM.
121//
122// Bit 2 This bit indicates directionality for the collection of data. The value 0 indicates that
123// data are to be collected for upstream traffic. The value 1 indicates that data are to be
124// collected for downstream traffic.
125//
126// Bits 3..14 Reserved, should be set to 0 by the OLT and ignored by the ONU.
127//
128// Bit 15 When this bit is 1, the P bits of the TCI field are used to filter the PM data collected.
129// The value 0 indicates that PM is collected without regard to P bits.
130//
131// Bit 16 When this bit is 1, the VID bits of the TCI field are used to filter the PM data
132// collected. The value 0 indicates that PM is collected without regard to VID.
133//
134// TCI: (2 bytes). This field contains the value optionally used as a filter for the PM data
135// collected, under the control of bits 15..16 of the control fields. This value is matched to the
136// outer tag of a frame. Untagged frames are not counted when this field is used.
137//
138// Reserved: (2 bytes). Not used; should be set to 0 by the OLT and ignored by the ONU.
139//
Chip Boling6e27b352020-02-14 09:10:01 -0600140// (R, W, setbycreate) (mandatory) (16 bytes)
141//
142// Drop Events
Chip Boling610117d2021-09-09 11:24:34 -0500143// The total number of events in which frames were dropped due to a lack of resources. This is not
144// necessarily the number of frames dropped; it is the number of times this event was detected. (R)
Chip Boling6e27b352020-02-14 09:10:01 -0600145// (mandatory) (4 bytes)
146//
Chip Boling610117d2021-09-09 11:24:34 -0500147// Octets
148// The total number of octets received, including those in bad frames, excluding framing bits, but
149// including FCS. (R) (mandatory) (4 bytes)
150//
151// Frames
152// The total number of frames received, including bad frames, broadcast frames and multicast
153// frames. (R) (mandatory) (4 bytes)
154//
155// Broadcast Frames
156// The total number of received good frames directed to the broadcast address. This does not
157// include multicast frames. (R) (mandatory) (4 bytes)
158//
159// Multicast Frames
160// The total number of received good frames directed to a multicast address. This does not include
161// broadcast frames. (R) (mandatory) (4 bytes)
162//
163// Crc Errored Frames
164// The total number of frames received that had a length (excluding framing bits, but including FCS
165// octets) of between 64 and 1518 octets, inclusive, but had either a bad FCS with an integral
166// number of octets (FCS error) or a bad FCS with a non-integral number of octets (alignment
167// error). (R) (mandatory) (4 bytes)
168//
169// Undersize Frames
170// The total number of frames received that were less than 64 octets long but were otherwise well
171// formed (excluding framing bits, but including FCS octets). (R) (mandatory) (4 bytes)
172//
173// Oversize Frames
174// The total number of frames received that were longer than 1518 octets (excluding framing bits,
175// but including FCS octets) and were otherwise well formed. (R) (mandatory) (4 bytes)
176//
Chip Boling6e27b352020-02-14 09:10:01 -0600177// Frames 64 Octets
Chip Boling610117d2021-09-09 11:24:34 -0500178// The total number of received frames (including bad frames) that were 64-octets long, excluding
179// framing bits but including FCS. (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600180//
181// Frames 65 To 127 Octets
Chip Boling610117d2021-09-09 11:24:34 -0500182// The total number of received frames (including bad frames) that were 65..127 octets long,
183// excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600184//
185// Frames 128 To 255 Octets
Chip Boling610117d2021-09-09 11:24:34 -0500186// The total number of frames (including bad frames) received that were 128..255 octets long,
187// excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600188//
189// Frames 256 To 511 Octets
Chip Boling610117d2021-09-09 11:24:34 -0500190// The total number of frames (including bad frames) received that were 256..511 octets long,
191// excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600192//
193// Frames 512 To 1 023 Octets
194// Frames 512 to 1-023 octets: The total number of frames (including bad frames) received that were
195// 512..1-023 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
196//
197// Frames 1024 To 1518 Octets
Chip Boling610117d2021-09-09 11:24:34 -0500198// The total number of frames (including bad frames) received that were 1024..1518 octets long,
199// excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600200//
201type EthernetFrameExtendedPm struct {
202 ManagedEntityDefinition
203 Attributes AttributeValueMap
204}
205
206func init() {
207 ethernetframeextendedpmBME = &ManagedEntityDefinition{
208 Name: "EthernetFrameExtendedPm",
209 ClassID: 334,
210 MessageTypes: mapset.NewSetWith(
211 Create,
212 Delete,
213 Get,
214 Set,
Chip Boling2d51f052021-02-09 09:04:15 -0600215 GetCurrentData,
Chip Boling6e27b352020-02-14 09:10:01 -0600216 ),
217 AllowedAttributeMask: 0xffff,
218 AttributeDefinitions: AttributeDefinitionMap{
219 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
220 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
221 2: MultiByteField("ControlBlock", OctetsAttributeType, 0x4000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
222 3: Uint32Field("DropEvents", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
223 4: Uint32Field("Octets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
224 5: Uint32Field("Frames", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
225 6: Uint32Field("BroadcastFrames", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
226 7: Uint32Field("MulticastFrames", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
227 8: Uint32Field("CrcErroredFrames", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
228 9: Uint32Field("UndersizeFrames", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
229 10: Uint32Field("OversizeFrames", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
230 11: Uint32Field("Frames64Octets", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
231 12: Uint32Field("Frames65To127Octets", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
232 13: Uint32Field("Frames128To255Octets", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
233 14: Uint32Field("Frames256To511Octets", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
234 15: Uint32Field("Frames512To1023Octets", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
235 16: Uint32Field("Frames1024To1518Octets", CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
236 },
237 Access: CreatedByOlt,
238 Support: UnknownSupport,
Chip Boling34ebcb62021-02-02 12:13:58 -0600239 Alarms: AlarmMap{
240 1: "Drop events",
241 2: "CRC errored frames",
242 3: "Undersize frames",
243 4: "Oversize frames",
244 },
Chip Boling6e27b352020-02-14 09:10:01 -0600245 }
246}
247
248// NewEthernetFrameExtendedPm (class ID 334) creates the basic
249// Managed Entity definition that is used to validate an ME of this type that
250// is received from or transmitted to the OMCC.
251func NewEthernetFrameExtendedPm(params ...ParamData) (*ManagedEntity, OmciErrors) {
252 return NewManagedEntity(*ethernetframeextendedpmBME, params...)
253}