blob: c39ff6be78d4c98c4ce542cf83f218228bbec67a [file] [log] [blame]
Girish Gowdra5c5aaf42021-02-17 19:40:50 -08001/*
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 *
Girish Gowdra5c5aaf42021-02-17 19:40:50 -08005 * 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 *
Girish Gowdra5c5aaf42021-02-17 19:40:50 -08009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
Girish Gowdra5c5aaf42021-02-17 19:40:50 -080011 * 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// FecPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
29// Managed entity FEC performance monitoring history data
mpagenko836a1fd2021-11-01 16:12:42 +000030const FecPerformanceMonitoringHistoryDataClassID = ClassID(312) // 0x0138
Girish Gowdra5c5aaf42021-02-17 19:40:50 -080031
32var fecperformancemonitoringhistorydataBME *ManagedEntityDefinition
33
mpagenko836a1fd2021-11-01 16:12:42 +000034// FecPerformanceMonitoringHistoryData (Class ID: #312 / 0x0138)
Girish Gowdra5c5aaf42021-02-17 19:40:50 -080035// This ME collects PM data associated with PON downstream forward error correction (FEC) counters.
36// Instances of this ME are created and deleted by the OLT.
37//
38// For a complete discussion of generic PM architecture, refer to clause I.4.
39//
40// Relationships
41// An instance of this ME is associated with an instance of the ANI-G ME or an instance of the time
42// and wavelength division multiplexing (TWDM) channel ME.
43//
44// Attributes
45// Managed Entity Id
mpagenko836a1fd2021-11-01 16:12:42 +000046// 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-G or a TWDM channel. (R, setbycreate) (mandatory)
48// (2-bytes)
Girish Gowdra5c5aaf42021-02-17 19:40:50 -080049//
50// Interval End Time
mpagenko836a1fd2021-11-01 16:12:42 +000051// This attribute identifies the most recently finished 15-min interval. (R) (mandatory) (1-byte)
Girish Gowdra5c5aaf42021-02-17 19:40:50 -080052//
53// Threshold Data 1_2 Id
54// Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
55// contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
56// data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
57//
58// Corrected Bytes
mpagenko836a1fd2021-11-01 16:12:42 +000059// This attribute counts the number of bytes that were corrected by the FEC function. (R)
60// (mandatory) (4-bytes)
Girish Gowdra5c5aaf42021-02-17 19:40:50 -080061//
62// Corrected Code Words
mpagenko836a1fd2021-11-01 16:12:42 +000063// This attribute counts the code words that were corrected by the FEC function. (R) (mandatory)
64// (4-bytes)
Girish Gowdra5c5aaf42021-02-17 19:40:50 -080065//
66// Uncorrectable Code Words
mpagenko836a1fd2021-11-01 16:12:42 +000067// This attribute counts errored code words that could not be corrected by the FEC function. (R)
68// (mandatory) (4-bytes)
Girish Gowdra5c5aaf42021-02-17 19:40:50 -080069//
70// Total Code Words
mpagenko836a1fd2021-11-01 16:12:42 +000071// This attribute counts the total received code words. (R) (mandatory) (4-bytes)
Girish Gowdra5c5aaf42021-02-17 19:40:50 -080072//
73// Fec Seconds
mpagenko836a1fd2021-11-01 16:12:42 +000074// This attribute counts seconds during which there was an FEC anomaly. (R) (mandatory) (2-bytes)
Girish Gowdra5c5aaf42021-02-17 19:40:50 -080075//
76type FecPerformanceMonitoringHistoryData struct {
77 ManagedEntityDefinition
78 Attributes AttributeValueMap
79}
80
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000081// Attribute name constants
82
83const FecPerformanceMonitoringHistoryData_IntervalEndTime = "IntervalEndTime"
84const FecPerformanceMonitoringHistoryData_ThresholdData12Id = "ThresholdData12Id"
85const FecPerformanceMonitoringHistoryData_CorrectedBytes = "CorrectedBytes"
86const FecPerformanceMonitoringHistoryData_CorrectedCodeWords = "CorrectedCodeWords"
87const FecPerformanceMonitoringHistoryData_UncorrectableCodeWords = "UncorrectableCodeWords"
88const FecPerformanceMonitoringHistoryData_TotalCodeWords = "TotalCodeWords"
89const FecPerformanceMonitoringHistoryData_FecSeconds = "FecSeconds"
90
Girish Gowdra5c5aaf42021-02-17 19:40:50 -080091func init() {
92 fecperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
93 Name: "FecPerformanceMonitoringHistoryData",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000094 ClassID: FecPerformanceMonitoringHistoryDataClassID,
Girish Gowdra5c5aaf42021-02-17 19:40:50 -080095 MessageTypes: mapset.NewSetWith(
96 Create,
97 Delete,
98 Get,
99 Set,
100 GetCurrentData,
101 ),
102 AllowedAttributeMask: 0xfe00,
103 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000104 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
105 1: ByteField(FecPerformanceMonitoringHistoryData_IntervalEndTime, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
106 2: Uint16Field(FecPerformanceMonitoringHistoryData_ThresholdData12Id, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
107 3: Uint32Field(FecPerformanceMonitoringHistoryData_CorrectedBytes, CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
108 4: Uint32Field(FecPerformanceMonitoringHistoryData_CorrectedCodeWords, CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
109 5: Uint32Field(FecPerformanceMonitoringHistoryData_UncorrectableCodeWords, CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
110 6: Uint32Field(FecPerformanceMonitoringHistoryData_TotalCodeWords, CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
111 7: Uint16Field(FecPerformanceMonitoringHistoryData_FecSeconds, CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
Girish Gowdra5c5aaf42021-02-17 19:40:50 -0800112 },
113 Access: CreatedByOlt,
114 Support: UnknownSupport,
115 Alarms: AlarmMap{
116 0: "Corrected bytes",
117 1: "Corrected code words",
118 2: "Uncorrectable code words",
119 4: "FEC seconds",
120 },
121 }
122}
123
124// NewFecPerformanceMonitoringHistoryData (class ID 312) creates the basic
125// Managed Entity definition that is used to validate an ME of this type that
126// is received from or transmitted to the OMCC.
127func NewFecPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
128 return NewManagedEntity(*fecperformancemonitoringhistorydataBME, params...)
129}