blob: 8ee5afc0ad58d57ff84aa1dab56f58905584be6b [file] [log] [blame]
Chip Boling610117d2021-09-09 11:24:34 -05001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
4
5 * 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
8
9 * http://www.apache.org/licenses/LICENSE-2.0
10
11 * 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// EponDownstreamPerformanceMonitoringConfigurationClassID is the 16-bit ID for the OMCI
29// Managed entity EPON downstream performance monitoring configuration
30const EponDownstreamPerformanceMonitoringConfigurationClassID = ClassID(406) // 0x0196
31
32var epondownstreamperformancemonitoringconfigurationBME *ManagedEntityDefinition
33
34// EponDownstreamPerformanceMonitoringConfiguration (Class ID: #406 / 0x0196)
35// This ME represents window sizes and threshold values for EPON downstream PM operations which are
36// defined in [IEEE 802.3] as: errored symbol period, errored frame, errored frame period and
37// errored frame seconds summary.
38//
39// The EPON ONU automatically instantiates an instance of this ME for each ANI-E.
40//
41// Relationships
42// An instance of this ME is associated with an ANI-E.
43//
44// Attributes
45// Managed Entity Id
46// This attribute uniquely identifies each instance of this ME. Through an identical ID, this ME is
47// implicitly linked to an instance of the ANI-E. (R, set-by-create) (mandatory) (2-bytes)
48//
49// Errored Symbol Period Window
50// This attribute specifies the number of symbols in the measurement period, as defined in clause
51// 57.5.3.1 of [IEEE 802.3]. (R, W) (optional) (8-bytes)
52//
53// Errored Symbol Period Threshold
54// This attribute specifies the threshold of errored symbols for generating an event report, as
55// defined in clause 57.5.3.1 of [IEEE 802.3]. (R, W) (optional) (8-bytes)
56//
57// Errored Frame Window
58// This attribute specifies the duration in units of 100-ms of the measurement period, as defined
59// in clause 57.5.3.2 of [IEEE 802.3]. (R, W) (optional) (2-bytes)
60//
61// Errored Frame Threshold
62// This attribute specifies the threshold of errored frames for generating an event report, as
63// defined in clause 57.5.3.2 of [IEEE 802.3]. (R, W) (optional) (4-bytes)
64//
65// Errored Frame Period Window
66// This attribute specifies the duration in terms of frames of the measurement period, as defined
67// in clause 57.5.3.3 of [IEEE 802.3]. (R, W) (optional) (4-bytes)
68//
69// Errored Frame Period Threshold
70// This attribute specifies the threshold of errored frames for generating an event report, as
71// defined in clause 57.5.3.3 of [IEEE 802.3]. (R, W) (optional) (4-bytes)
72//
73// Errored Frame Seconds Summary Window
74// This attribute specifies the duration in units of 100ms of the measurement period, as defined in
75// clause-57.5.3.4 of [IEEE-802.3]. (R, W) (optional) (2-bytes)
76//
77// Errored Frame Seconds Summary Threshold
78// This attribute specifies the threshold of errored frame seconds for generating an event report,
79// as defined in clause 57.5.3.4 of [IEEE 802.3]. (R, W) (optional) (2-bytes)
80//
81type EponDownstreamPerformanceMonitoringConfiguration struct {
82 ManagedEntityDefinition
83 Attributes AttributeValueMap
84}
85
86func init() {
87 epondownstreamperformancemonitoringconfigurationBME = &ManagedEntityDefinition{
88 Name: "EponDownstreamPerformanceMonitoringConfiguration",
89 ClassID: 406,
90 MessageTypes: mapset.NewSetWith(
91 Get,
92 Set,
93 ),
94 AllowedAttributeMask: 0xff00,
95 AttributeDefinitions: AttributeDefinitionMap{
96 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
97 1: Uint64Field("ErroredSymbolPeriodWindow", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, true, false, 1),
98 2: Uint64Field("ErroredSymbolPeriodThreshold", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, true, false, 2),
99 3: Uint16Field("ErroredFrameWindow", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, true, false, 3),
100 4: Uint32Field("ErroredFrameThreshold", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
101 5: Uint32Field("ErroredFramePeriodWindow", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5),
102 6: Uint32Field("ErroredFramePeriodThreshold", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, true, false, 6),
103 7: Uint16Field("ErroredFrameSecondsSummaryWindow", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, true, false, 7),
104 8: Uint16Field("ErroredFrameSecondsSummaryThreshold", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8),
105 },
106 Access: CreatedByOnu,
107 Support: UnknownSupport,
108 }
109}
110
111// NewEponDownstreamPerformanceMonitoringConfiguration (class ID 406) creates the basic
112// Managed Entity definition that is used to validate an ME of this type that
113// is received from or transmitted to the OMCC.
114func NewEponDownstreamPerformanceMonitoringConfiguration(params ...ParamData) (*ManagedEntity, OmciErrors) {
115 return NewManagedEntity(*epondownstreamperformancemonitoringconfigurationBME, params...)
116}