Girish Gowdra | e268310 | 2021-03-05 08:24:26 -0800 | [diff] [blame] | 1 | /* |
| 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 | |
| 24 | package generated |
| 25 | |
| 26 | import "github.com/deckarep/golang-set" |
| 27 | |
| 28 | // FecPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity FEC performance monitoring history data |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 30 | const FecPerformanceMonitoringHistoryDataClassID = ClassID(312) // 0x0138 |
Girish Gowdra | e268310 | 2021-03-05 08:24:26 -0800 | [diff] [blame] | 31 | |
| 32 | var fecperformancemonitoringhistorydataBME *ManagedEntityDefinition |
| 33 | |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 34 | // FecPerformanceMonitoringHistoryData (Class ID: #312 / 0x0138) |
Girish Gowdra | e268310 | 2021-03-05 08:24:26 -0800 | [diff] [blame] | 35 | // 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 |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 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-G or a TWDM channel. (R, setbycreate) (mandatory) |
| 48 | // (2-bytes) |
Girish Gowdra | e268310 | 2021-03-05 08:24:26 -0800 | [diff] [blame] | 49 | // |
| 50 | // Interval End Time |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 51 | // This attribute identifies the most recently finished 15-min interval. (R) (mandatory) (1-byte) |
Girish Gowdra | e268310 | 2021-03-05 08:24:26 -0800 | [diff] [blame] | 52 | // |
| 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 |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 59 | // This attribute counts the number of bytes that were corrected by the FEC function. (R) |
| 60 | // (mandatory) (4-bytes) |
Girish Gowdra | e268310 | 2021-03-05 08:24:26 -0800 | [diff] [blame] | 61 | // |
| 62 | // Corrected Code Words |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 63 | // This attribute counts the code words that were corrected by the FEC function. (R) (mandatory) |
| 64 | // (4-bytes) |
Girish Gowdra | e268310 | 2021-03-05 08:24:26 -0800 | [diff] [blame] | 65 | // |
| 66 | // Uncorrectable Code Words |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 67 | // This attribute counts errored code words that could not be corrected by the FEC function. (R) |
| 68 | // (mandatory) (4-bytes) |
Girish Gowdra | e268310 | 2021-03-05 08:24:26 -0800 | [diff] [blame] | 69 | // |
| 70 | // Total Code Words |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 71 | // This attribute counts the total received code words. (R) (mandatory) (4-bytes) |
Girish Gowdra | e268310 | 2021-03-05 08:24:26 -0800 | [diff] [blame] | 72 | // |
| 73 | // Fec Seconds |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 74 | // This attribute counts seconds during which there was an FEC anomaly. (R) (mandatory) (2-bytes) |
Girish Gowdra | e268310 | 2021-03-05 08:24:26 -0800 | [diff] [blame] | 75 | // |
| 76 | type FecPerformanceMonitoringHistoryData struct { |
| 77 | ManagedEntityDefinition |
| 78 | Attributes AttributeValueMap |
| 79 | } |
| 80 | |
| 81 | func init() { |
| 82 | fecperformancemonitoringhistorydataBME = &ManagedEntityDefinition{ |
| 83 | Name: "FecPerformanceMonitoringHistoryData", |
| 84 | ClassID: 312, |
| 85 | MessageTypes: mapset.NewSetWith( |
| 86 | Create, |
| 87 | Delete, |
| 88 | Get, |
| 89 | Set, |
| 90 | GetCurrentData, |
| 91 | ), |
| 92 | AllowedAttributeMask: 0xfe00, |
| 93 | AttributeDefinitions: AttributeDefinitionMap{ |
| 94 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 95 | 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1), |
| 96 | 2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 97 | 3: Uint32Field("CorrectedBytes", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3), |
| 98 | 4: Uint32Field("CorrectedCodeWords", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4), |
| 99 | 5: Uint32Field("UncorrectableCodeWords", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5), |
| 100 | 6: Uint32Field("TotalCodeWords", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6), |
| 101 | 7: Uint16Field("FecSeconds", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7), |
| 102 | }, |
| 103 | Access: CreatedByOlt, |
| 104 | Support: UnknownSupport, |
| 105 | Alarms: AlarmMap{ |
| 106 | 0: "Corrected bytes", |
| 107 | 1: "Corrected code words", |
| 108 | 2: "Uncorrectable code words", |
| 109 | 4: "FEC seconds", |
| 110 | }, |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | // NewFecPerformanceMonitoringHistoryData (class ID 312) creates the basic |
| 115 | // Managed Entity definition that is used to validate an ME of this type that |
| 116 | // is received from or transmitted to the OMCC. |
| 117 | func NewFecPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 118 | return NewManagedEntity(*fecperformancemonitoringhistorydataBME, params...) |
| 119 | } |