blob: b4d333f90a73e420112bca3642a11d9a932a893b [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
Chip Boling8cdd6392022-01-27 08:43:37 -06004 *
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
Chip Boling8cdd6392022-01-27 08:43:37 -06008 *
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Chip Boling8cdd6392022-01-27 08:43:37 -060010 *
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// EthernetFrameExtendedPm64BitClassID is the 16-bit ID for the OMCI
29// Managed entity Ethernet frame extended PM 64-bit
Chip Boling610117d2021-09-09 11:24:34 -050030const EthernetFrameExtendedPm64BitClassID = ClassID(425) // 0x01a9
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var ethernetframeextendedpm64bitBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// EthernetFrameExtendedPm64Bit (Class ID: #425 / 0x01a9)
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] 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//
Chip Boling610117d2021-09-09 11:24:34 -050042// 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//
Chip Boling6e27b352020-02-14 09:10:01 -060046// 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, it is
49// encouraged to identify instances sequentially starting with 1. (R, set-by-create) (mandatory) (2
50// 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 64-bit ID: (2 bytes). This attribute points to an instance of the threshold data
61// 64-bit ME that contains PM threshold values. When PM is collected on a continuously running
62// basis, rather than in 15-min intervals, counter thresholds should not be established. There is
63// no mechanism to clear a TCA, and any counter parameter may eventually be expected to cross any
64// given threshold value.
65//
66// Parent ME class: (2 bytes). This field contains the enumerated value of the ME class of the PM
67// ME's parent. Together with the parent ME instance field, this permits a given PM ME to be
68// associated with any OMCI ME. The supported ME classes are as follows.
69//
70// 46 MAC bridge configuration data
71//
72// 47 MAC bridge port configuration data
73//
74// 11 Physical path termination point Ethernet UNI
75//
76// 98 Physical path termination point xDSL UNI part 1
77//
78// 266 GEM IW termination point
79//
80// 281 Multicast GEM IW termination point
81//
82// 329 Virtual Ethernet interface point
83//
84// 162 Physical path termination point MoCA UNI
85//
86// Parent ME instance: (2 bytes). This field identifies the specific parent ME instance to which
87// the PM ME is attached.
88//
89// Accumulation disable: (2 bytes). This bit field allows PM accumulation to be disabled; refer to
90// Table 9.3.32-1. The default value 0 enables PM collection. If bit 15 is set to 1, no PM is
91// collected by this ME instance. If bit 15 = 0 and any of bits 14..1 are set to 1, PM collection
92// is inhibited for the attributes indicated by the 1 bits. Inhibiting PM collection does not
93// change the value of a PM attribute, but if PM is accumulated in 15-min intervals, the value is
94// lost at the next 15-min interval boundary.
95//
96// Bit 16 is an action bit that always reads back as 0. When written to 1, it resets all PM
97// attributes in the ME, and clears any TCAs that may be outstanding.
98//
99// TCA disable: (2 bytes). Also clarified in Table 9.3.32-1, this field permits TCAs to be
100// inhibited, either individually or for the complete ME instance. As with the accumulation disable
101// field, the default value 0 enables TCAs, and setting the global disable bit overrides the
102// settings of the individual thresholds. Unlike the accumulation disable field, the bits are
103// mapped to the thresholds defined in the associated threshold data 1 and 2 ME instances. When the
104// global or attribute-specific value changes from 0 to 1, outstanding TCAs are cleared, either for
105// the ME instance globally or for the individual disabled threshold. These bits affect only
106// notifications, not the underlying parameter accumulation or storage.
107//
108// If the threshold data 1/2 ID attribute does not contain a valid pointer, this field is not
109// meaningful.
110//
111// Thresholds should be used with caution if PM attributes are accumulated continuously.
112//
113// Control fields: (2 bytes). This field is a bit map whose values govern the behaviour of the PM
114// ME. Bits are assigned as follows:
115//
116// Bit 1 (LSB) The value 1 specifies continuous accumulation, regardless of 15-min intervals. There
117// is no concept of current and historic accumulators; get and get current data (if supported) both
118// return current values. The value 0 specifies 15-min accumulators exactly like those of classical
119// PM.
120//
121// Bit 2 This bit indicates directionality for the collection of data. The value 0 indicates that
122// data are to be collected for upstream traffic. The value 1 indicates that data are to be
123// collected for downstream traffic.
124//
125// Bits 3..14 Reserved, should be set to 0 by the OLT and ignored by the ONU.
126//
127// Bit 15 When this bit is 1, the P bits of the TCI field are used to filter the PM data collected.
128// The value 0 indicates that PM is collected without regard to P bits.
129//
130// Bit 16 When this bit is 1, the VID bits of the TCI field are used to filter the PM data
131// collected. The value 0 indicates that PM is collected without regard to VID.
132//
133// TCI: (2 bytes). This field contains the value optionally used as a filter for the PM data
134// collected, under the control of bits 15..16 of the control fields. This value is matched to the
135// outer tag of a frame. Untagged frames are not counted when this field is used.
136//
137// Reserved: (2 bytes). Not used; should be set to 0 by the OLT and ignored by the ONU.
138//
139// (R, W, set-by-create) (mandatory) (16 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600140//
141// Drop Events
Chip Boling610117d2021-09-09 11:24:34 -0500142// The total number of events in which frames were dropped due to lack of resources. This is not
143// necessarily the number of frames dropped; it is the number of times this event was detected. (R)
144// (mandatory) (8 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600145//
146// Octets
Chip Boling610117d2021-09-09 11:24:34 -0500147// The total number of octets received, including those in bad frames, excluding framing bits, but
148// including FCS. (R) (mandatory) (8 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600149//
150// Frames
Chip Boling610117d2021-09-09 11:24:34 -0500151// The total number of frames received, including bad frames, broadcast frames and multicast
152// frames. (R) (mandatory) (8 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600153//
154// Broadcast Frames
Chip Boling610117d2021-09-09 11:24:34 -0500155// The total number of received good frames directed to the broadcast address. This does not
156// include multicast frames. (R) (mandatory) (8 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600157//
158// Multicast Frames
Chip Boling610117d2021-09-09 11:24:34 -0500159// The total number of received good frames directed to a multicast address. This does not include
160// broadcast frames. (R) (mandatory) (8 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600161//
162// Crc Errored Frames
Chip Boling610117d2021-09-09 11:24:34 -0500163// The total number of frames received that had a length (excluding framing bits, but including FCS
164// octets) of between 64 and 1518 octets, inclusive, but had either a bad FCS with an integral
165// number of octets (FCS error) or a bad FCS with a non-integral number of octets (alignment
166// error). (R) (mandatory) (8 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600167//
168// Undersize Frames
Chip Boling610117d2021-09-09 11:24:34 -0500169// The total number of frames received that were less than 64 octets long, but were otherwise well
170// formed (excluding framing bits, but including FCS octets). (R) (mandatory) (8 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600171//
172// Oversize Frames
Chip Boling610117d2021-09-09 11:24:34 -0500173// The total number of frames received that were longer than 1518 octets (excluding framing bits,
174// but including FCS octets) and were otherwise well formed. (R) (mandatory) (8 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600175//
176// Frames 64 Octets
Chip Boling610117d2021-09-09 11:24:34 -0500177// The total number of received frames (including bad frames) that were 64-octets long, excluding
178// framing bits, but including FCS. (R) (mandatory) (8-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600179//
180// Frames 65 To 127 Octets
Chip Boling610117d2021-09-09 11:24:34 -0500181// The total number of received frames (including bad frames) that were 65..127 octets long,
182// excluding framing bits but including FCS. (R) (mandatory) (8 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600183//
184// Frames 128 To 255 Octets
Chip Boling610117d2021-09-09 11:24:34 -0500185// The total number of frames (including bad frames) received that were 128..255 octets long,
186// excluding framing bits but including FCS. (R) (mandatory) (8 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600187//
188// Frames 256 To 511 Octets
Chip Boling610117d2021-09-09 11:24:34 -0500189// The total number of frames (including bad frames) received that were 256..511 octets long,
190// excluding framing bits but including FCS. (R) (mandatory) (8 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600191//
Chip Boling610117d2021-09-09 11:24:34 -0500192// Frames 512 To 1023 Octets
193// The total number of frames (including bad frames) received that were 512..1023 octets long,
194// excluding framing bits but including FCS. (R) (mandatory) (8 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600195//
196// Frames 1024 To 1518 Octets
Chip Boling610117d2021-09-09 11:24:34 -0500197// The total number of frames (including bad frames) received that were 1024..1518 octets long,
198// excluding framing bits but including FCS. (R) (mandatory) (8 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600199//
200type EthernetFrameExtendedPm64Bit struct {
201 ManagedEntityDefinition
202 Attributes AttributeValueMap
203}
204
Chip Boling8cdd6392022-01-27 08:43:37 -0600205// Attribute name constants
206
207const EthernetFrameExtendedPm64Bit_IntervalEndTime = "IntervalEndTime"
208const EthernetFrameExtendedPm64Bit_ControlBlock = "ControlBlock"
209const EthernetFrameExtendedPm64Bit_DropEvents = "DropEvents"
210const EthernetFrameExtendedPm64Bit_Octets = "Octets"
211const EthernetFrameExtendedPm64Bit_Frames = "Frames"
212const EthernetFrameExtendedPm64Bit_BroadcastFrames = "BroadcastFrames"
213const EthernetFrameExtendedPm64Bit_MulticastFrames = "MulticastFrames"
214const EthernetFrameExtendedPm64Bit_CrcErroredFrames = "CrcErroredFrames"
215const EthernetFrameExtendedPm64Bit_UndersizeFrames = "UndersizeFrames"
216const EthernetFrameExtendedPm64Bit_OversizeFrames = "OversizeFrames"
217const EthernetFrameExtendedPm64Bit_Frames64Octets = "Frames64Octets"
218const EthernetFrameExtendedPm64Bit_Frames65To127Octets = "Frames65To127Octets"
219const EthernetFrameExtendedPm64Bit_Frames128To255Octets = "Frames128To255Octets"
220const EthernetFrameExtendedPm64Bit_Frames256To511Octets = "Frames256To511Octets"
221const EthernetFrameExtendedPm64Bit_Frames512To1023Octets = "Frames512To1023Octets"
222const EthernetFrameExtendedPm64Bit_Frames1024To1518Octets = "Frames1024To1518Octets"
223
Chip Boling6e27b352020-02-14 09:10:01 -0600224func init() {
225 ethernetframeextendedpm64bitBME = &ManagedEntityDefinition{
226 Name: "EthernetFrameExtendedPm64Bit",
Chip Boling8cdd6392022-01-27 08:43:37 -0600227 ClassID: EthernetFrameExtendedPm64BitClassID,
Chip Boling6e27b352020-02-14 09:10:01 -0600228 MessageTypes: mapset.NewSetWith(
229 Create,
230 Delete,
231 Get,
232 Set,
Chip Boling2d51f052021-02-09 09:04:15 -0600233 GetCurrentData,
Chip Boling6e27b352020-02-14 09:10:01 -0600234 ),
235 AllowedAttributeMask: 0xffff,
236 AttributeDefinitions: AttributeDefinitionMap{
Chip Boling8cdd6392022-01-27 08:43:37 -0600237 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
238 1: ByteField(EthernetFrameExtendedPm64Bit_IntervalEndTime, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
239 2: MultiByteField(EthernetFrameExtendedPm64Bit_ControlBlock, OctetsAttributeType, 0x4000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
240 3: Uint64Field(EthernetFrameExtendedPm64Bit_DropEvents, CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
241 4: Uint64Field(EthernetFrameExtendedPm64Bit_Octets, CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
242 5: Uint64Field(EthernetFrameExtendedPm64Bit_Frames, CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
243 6: Uint64Field(EthernetFrameExtendedPm64Bit_BroadcastFrames, CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
244 7: Uint64Field(EthernetFrameExtendedPm64Bit_MulticastFrames, CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
245 8: Uint64Field(EthernetFrameExtendedPm64Bit_CrcErroredFrames, CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
246 9: Uint64Field(EthernetFrameExtendedPm64Bit_UndersizeFrames, CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
247 10: Uint64Field(EthernetFrameExtendedPm64Bit_OversizeFrames, CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
248 11: Uint64Field(EthernetFrameExtendedPm64Bit_Frames64Octets, CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
249 12: Uint64Field(EthernetFrameExtendedPm64Bit_Frames65To127Octets, CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
250 13: Uint64Field(EthernetFrameExtendedPm64Bit_Frames128To255Octets, CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
251 14: Uint64Field(EthernetFrameExtendedPm64Bit_Frames256To511Octets, CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
252 15: Uint64Field(EthernetFrameExtendedPm64Bit_Frames512To1023Octets, CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
253 16: Uint64Field(EthernetFrameExtendedPm64Bit_Frames1024To1518Octets, CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
Chip Boling6e27b352020-02-14 09:10:01 -0600254 },
255 Access: CreatedByOlt,
256 Support: UnknownSupport,
Chip Boling34ebcb62021-02-02 12:13:58 -0600257 Alarms: AlarmMap{
258 1: "Drop events",
259 2: "CRC errored frames",
260 3: "Undersize frames",
261 4: "Oversize frames",
262 },
Chip Boling6e27b352020-02-14 09:10:01 -0600263 }
264}
265
Chip Boling7a6e8d92021-07-14 15:42:21 -0500266// NewEthernetFrameExtendedPm64Bit (class ID 425) creates the basic
Chip Boling6e27b352020-02-14 09:10:01 -0600267// Managed Entity definition that is used to validate an ME of this type that
268// is received from or transmitted to the OMCC.
269func NewEthernetFrameExtendedPm64Bit(params ...ParamData) (*ManagedEntity, OmciErrors) {
270 return NewManagedEntity(*ethernetframeextendedpm64bitBME, params...)
271}