blob: 215ebc156889d99f91e99a77907f89ed78bf2f62 [file] [log] [blame]
mpagenko836a1fd2021-11-01 16:12:42 +00001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00004 *
mpagenko836a1fd2021-11-01 16:12:42 +00005 * 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
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00008 *
mpagenko836a1fd2021-11-01 16:12:42 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
mpagenko836a1fd2021-11-01 16:12:42 +000011 * 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 */
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
30const EthernetFrameExtendedPmClassID = ClassID(334) // 0x014e
31
32var ethernetframeextendedpmBME *ManagedEntityDefinition
33
34// EthernetFrameExtendedPm (Class ID: #334 / 0x014e)
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// 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)
51//
52// Interval End Time
53// 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)
56//
57// Control Block
58// 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//
140// (R, W, setbycreate) (mandatory) (16 bytes)
141//
142// Drop Events
143// 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)
145// (mandatory) (4 bytes)
146//
147// 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//
177// Frames 64 Octets
178// 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)
180//
181// Frames 65 To 127 Octets
182// 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)
184//
185// Frames 128 To 255 Octets
186// 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)
188//
189// Frames 256 To 511 Octets
190// 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)
192//
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
198// 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)
200//
201type EthernetFrameExtendedPm struct {
202 ManagedEntityDefinition
203 Attributes AttributeValueMap
204}
205
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000206// Attribute name constants
207
208const EthernetFrameExtendedPm_IntervalEndTime = "IntervalEndTime"
209const EthernetFrameExtendedPm_ControlBlock = "ControlBlock"
210const EthernetFrameExtendedPm_DropEvents = "DropEvents"
211const EthernetFrameExtendedPm_Octets = "Octets"
212const EthernetFrameExtendedPm_Frames = "Frames"
213const EthernetFrameExtendedPm_BroadcastFrames = "BroadcastFrames"
214const EthernetFrameExtendedPm_MulticastFrames = "MulticastFrames"
215const EthernetFrameExtendedPm_CrcErroredFrames = "CrcErroredFrames"
216const EthernetFrameExtendedPm_UndersizeFrames = "UndersizeFrames"
217const EthernetFrameExtendedPm_OversizeFrames = "OversizeFrames"
218const EthernetFrameExtendedPm_Frames64Octets = "Frames64Octets"
219const EthernetFrameExtendedPm_Frames65To127Octets = "Frames65To127Octets"
220const EthernetFrameExtendedPm_Frames128To255Octets = "Frames128To255Octets"
221const EthernetFrameExtendedPm_Frames256To511Octets = "Frames256To511Octets"
222const EthernetFrameExtendedPm_Frames512To1023Octets = "Frames512To1023Octets"
223const EthernetFrameExtendedPm_Frames1024To1518Octets = "Frames1024To1518Octets"
224
mpagenko836a1fd2021-11-01 16:12:42 +0000225func init() {
226 ethernetframeextendedpmBME = &ManagedEntityDefinition{
227 Name: "EthernetFrameExtendedPm",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000228 ClassID: EthernetFrameExtendedPmClassID,
mpagenko836a1fd2021-11-01 16:12:42 +0000229 MessageTypes: mapset.NewSetWith(
230 Create,
231 Delete,
232 Get,
233 Set,
234 GetCurrentData,
235 ),
236 AllowedAttributeMask: 0xffff,
237 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000238 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
239 1: ByteField(EthernetFrameExtendedPm_IntervalEndTime, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
240 2: MultiByteField(EthernetFrameExtendedPm_ControlBlock, OctetsAttributeType, 0x4000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
241 3: Uint32Field(EthernetFrameExtendedPm_DropEvents, CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
242 4: Uint32Field(EthernetFrameExtendedPm_Octets, CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
243 5: Uint32Field(EthernetFrameExtendedPm_Frames, CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
244 6: Uint32Field(EthernetFrameExtendedPm_BroadcastFrames, CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
245 7: Uint32Field(EthernetFrameExtendedPm_MulticastFrames, CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
246 8: Uint32Field(EthernetFrameExtendedPm_CrcErroredFrames, CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
247 9: Uint32Field(EthernetFrameExtendedPm_UndersizeFrames, CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
248 10: Uint32Field(EthernetFrameExtendedPm_OversizeFrames, CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
249 11: Uint32Field(EthernetFrameExtendedPm_Frames64Octets, CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
250 12: Uint32Field(EthernetFrameExtendedPm_Frames65To127Octets, CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
251 13: Uint32Field(EthernetFrameExtendedPm_Frames128To255Octets, CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
252 14: Uint32Field(EthernetFrameExtendedPm_Frames256To511Octets, CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
253 15: Uint32Field(EthernetFrameExtendedPm_Frames512To1023Octets, CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
254 16: Uint32Field(EthernetFrameExtendedPm_Frames1024To1518Octets, CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
mpagenko836a1fd2021-11-01 16:12:42 +0000255 },
256 Access: CreatedByOlt,
257 Support: UnknownSupport,
258 Alarms: AlarmMap{
259 1: "Drop events",
260 2: "CRC errored frames",
261 3: "Undersize frames",
262 4: "Oversize frames",
263 },
264 }
265}
266
267// NewEthernetFrameExtendedPm (class ID 334) creates the basic
268// Managed Entity definition that is used to validate an ME of this type that
269// is received from or transmitted to the OMCC.
270func NewEthernetFrameExtendedPm(params ...ParamData) (*ManagedEntity, OmciErrors) {
271 return NewManagedEntity(*ethernetframeextendedpmBME, params...)
272}