Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
| 3 | * Copyright 2020-present Open Networking Foundation |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 4 | * |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 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 |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 8 | * |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 10 | * |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 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 | */ |
Himani Chawla | ac1f5ad | 2021-02-04 21:21:54 +0530 | [diff] [blame] | 17 | /* |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 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 | // EthernetPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Ethernet performance monitoring history data |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 30 | const EthernetPerformanceMonitoringHistoryDataClassID = ClassID(24) // 0x0018 |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 31 | |
| 32 | var ethernetperformancemonitoringhistorydataBME *ManagedEntityDefinition |
| 33 | |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 34 | // EthernetPerformanceMonitoringHistoryData (Class ID: #24 / 0x0018) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 35 | // This ME collects some of the PM data for a physical Ethernet interface. Instances of this ME are |
| 36 | // 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 PPTP Ethernet UNI. |
| 42 | // |
| 43 | // Attributes |
| 44 | // Managed Entity Id |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 45 | // This attribute uniquely identifies each instance of this ME. Through an identical ID, this ME is |
| 46 | // implicitly linked to an instance of the PPTP Ethernet UNI. (R, setbycreate) (mandatory) |
| 47 | // (2-bytes) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 48 | // |
| 49 | // Interval End Time |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 50 | // This attribute identifies the most recently finished 15-min interval. (R) (mandatory) (1-byte) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 51 | // |
| 52 | // Threshold Data 1_2 Id |
| 53 | // Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs |
| 54 | // that contains PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes) |
| 55 | // |
| 56 | // Fcs Errors |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 57 | // This attribute counts frames received on a particular interface that were an integral number of |
| 58 | // octets in length but failed the FCS check. The count is incremented when the MAC service returns |
| 59 | // the frameCheckError status to the link layer control (LLC) or other MAC user. Received frames |
| 60 | // for which multiple error conditions are obtained are counted according to the error status |
| 61 | // presented to the LLC. (R) (mandatory) (4-bytes) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 62 | // |
| 63 | // Excessive Collision Counter |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 64 | // This attribute counts frames whose transmission failed due to excessive collisions.-(R) |
| 65 | // (mandatory) (4-bytes) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 66 | // |
| 67 | // Late Collision Counter |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 68 | // This attribute counts the number of times that a collision was detected later than 512 bit times |
| 69 | // into the transmission of a packet. (R) (mandatory) (4-bytes) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 70 | // |
| 71 | // Frames Too Long |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 72 | // This attribute counts received frames that exceeded the maximum permitted frame size. The count |
| 73 | // is incremented when the MAC service returns the frameTooLong status to the LLC. (R) (mandatory) |
| 74 | // (4-bytes) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 75 | // |
| 76 | // Buffer Overflows On Receive |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 77 | // This attribute counts the number of times that the receive buffer overflowed. (R) (mandatory) |
| 78 | // (4-bytes) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 79 | // |
| 80 | // Buffer Overflows On Transmit |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 81 | // This attribute counts the number of times that the transmit buffer overflowed. (R) (mandatory) |
| 82 | // (4-bytes) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 83 | // |
| 84 | // Single Collision Frame Counter |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 85 | // This attribute counts successfully transmitted frames whose transmission was delayed by exactly |
| 86 | // one collision. (R) (mandatory) (4-bytes) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 87 | // |
| 88 | // Multiple Collisions Frame Counter |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 89 | // This attribute counts successfully transmitted frames whose transmission was delayed by more |
| 90 | // than one collision. (R) (mandatory) (4-bytes) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 91 | // |
| 92 | // Sqe Counter |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 93 | // This attribute counts the number of times that the SQE test error message was generated by the |
| 94 | // PLS sublayer. (R) (mandatory) (4-bytes) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 95 | // |
| 96 | // Deferred Transmission Counter |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 97 | // This attribute counts frames whose first transmission attempt was delayed because the medium was |
| 98 | // busy. The count does not include frames involved in collisions. (R) (mandatory) (4-bytes) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 99 | // |
| 100 | // Internal Mac Transmit Error Counter |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 101 | // This attribute counts frames whose transmission failed due to an internal MAC sublayer transmit |
| 102 | // error. (R) (mandatory) (4-bytes) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 103 | // |
| 104 | // Carrier Sense Error Counter |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 105 | // This attribute counts the number of times that carrier sense was lost or never asserted when |
| 106 | // attempting to transmit a frame. (R) (mandatory) (4-bytes) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 107 | // |
| 108 | // Alignment Error Counter |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 109 | // This attribute counts received frames that were not an integral number of octets in length and |
| 110 | // did not pass the FCS check. (R) (mandatory) (4-bytes) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 111 | // |
| 112 | // Internal Mac Receive Error Counter |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 113 | // This attribute counts frames whose reception failed due to an internal MAC sublayer receive |
| 114 | // error. (R) (mandatory) (4-bytes) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 115 | // |
| 116 | type EthernetPerformanceMonitoringHistoryData struct { |
| 117 | ManagedEntityDefinition |
| 118 | Attributes AttributeValueMap |
| 119 | } |
| 120 | |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 121 | // Attribute name constants |
| 122 | |
| 123 | const EthernetPerformanceMonitoringHistoryData_IntervalEndTime = "IntervalEndTime" |
| 124 | const EthernetPerformanceMonitoringHistoryData_ThresholdData12Id = "ThresholdData12Id" |
| 125 | const EthernetPerformanceMonitoringHistoryData_FcsErrors = "FcsErrors" |
| 126 | const EthernetPerformanceMonitoringHistoryData_ExcessiveCollisionCounter = "ExcessiveCollisionCounter" |
| 127 | const EthernetPerformanceMonitoringHistoryData_LateCollisionCounter = "LateCollisionCounter" |
| 128 | const EthernetPerformanceMonitoringHistoryData_FramesTooLong = "FramesTooLong" |
| 129 | const EthernetPerformanceMonitoringHistoryData_BufferOverflowsOnReceive = "BufferOverflowsOnReceive" |
| 130 | const EthernetPerformanceMonitoringHistoryData_BufferOverflowsOnTransmit = "BufferOverflowsOnTransmit" |
| 131 | const EthernetPerformanceMonitoringHistoryData_SingleCollisionFrameCounter = "SingleCollisionFrameCounter" |
| 132 | const EthernetPerformanceMonitoringHistoryData_MultipleCollisionsFrameCounter = "MultipleCollisionsFrameCounter" |
| 133 | const EthernetPerformanceMonitoringHistoryData_SqeCounter = "SqeCounter" |
| 134 | const EthernetPerformanceMonitoringHistoryData_DeferredTransmissionCounter = "DeferredTransmissionCounter" |
| 135 | const EthernetPerformanceMonitoringHistoryData_InternalMacTransmitErrorCounter = "InternalMacTransmitErrorCounter" |
| 136 | const EthernetPerformanceMonitoringHistoryData_CarrierSenseErrorCounter = "CarrierSenseErrorCounter" |
| 137 | const EthernetPerformanceMonitoringHistoryData_AlignmentErrorCounter = "AlignmentErrorCounter" |
| 138 | const EthernetPerformanceMonitoringHistoryData_InternalMacReceiveErrorCounter = "InternalMacReceiveErrorCounter" |
| 139 | |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 140 | func init() { |
| 141 | ethernetperformancemonitoringhistorydataBME = &ManagedEntityDefinition{ |
| 142 | Name: "EthernetPerformanceMonitoringHistoryData", |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 143 | ClassID: EthernetPerformanceMonitoringHistoryDataClassID, |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 144 | MessageTypes: mapset.NewSetWith( |
| 145 | Create, |
| 146 | Delete, |
| 147 | Get, |
| 148 | Set, |
Girish Gowdra | 5c5aaf4 | 2021-02-17 19:40:50 -0800 | [diff] [blame] | 149 | GetCurrentData, |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 150 | ), |
| 151 | AllowedAttributeMask: 0xffff, |
| 152 | AttributeDefinitions: AttributeDefinitionMap{ |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 153 | 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 154 | 1: ByteField(EthernetPerformanceMonitoringHistoryData_IntervalEndTime, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1), |
| 155 | 2: Uint16Field(EthernetPerformanceMonitoringHistoryData_ThresholdData12Id, PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 156 | 3: Uint32Field(EthernetPerformanceMonitoringHistoryData_FcsErrors, CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3), |
| 157 | 4: Uint32Field(EthernetPerformanceMonitoringHistoryData_ExcessiveCollisionCounter, CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4), |
| 158 | 5: Uint32Field(EthernetPerformanceMonitoringHistoryData_LateCollisionCounter, CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5), |
| 159 | 6: Uint32Field(EthernetPerformanceMonitoringHistoryData_FramesTooLong, CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6), |
| 160 | 7: Uint32Field(EthernetPerformanceMonitoringHistoryData_BufferOverflowsOnReceive, CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7), |
| 161 | 8: Uint32Field(EthernetPerformanceMonitoringHistoryData_BufferOverflowsOnTransmit, CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8), |
| 162 | 9: Uint32Field(EthernetPerformanceMonitoringHistoryData_SingleCollisionFrameCounter, CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9), |
| 163 | 10: Uint32Field(EthernetPerformanceMonitoringHistoryData_MultipleCollisionsFrameCounter, CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10), |
| 164 | 11: Uint32Field(EthernetPerformanceMonitoringHistoryData_SqeCounter, CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11), |
| 165 | 12: Uint32Field(EthernetPerformanceMonitoringHistoryData_DeferredTransmissionCounter, CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12), |
| 166 | 13: Uint32Field(EthernetPerformanceMonitoringHistoryData_InternalMacTransmitErrorCounter, CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13), |
| 167 | 14: Uint32Field(EthernetPerformanceMonitoringHistoryData_CarrierSenseErrorCounter, CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14), |
| 168 | 15: Uint32Field(EthernetPerformanceMonitoringHistoryData_AlignmentErrorCounter, CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15), |
| 169 | 16: Uint32Field(EthernetPerformanceMonitoringHistoryData_InternalMacReceiveErrorCounter, CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16), |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 170 | }, |
| 171 | Access: CreatedByOlt, |
| 172 | Support: UnknownSupport, |
Himani Chawla | ac1f5ad | 2021-02-04 21:21:54 +0530 | [diff] [blame] | 173 | Alarms: AlarmMap{ |
| 174 | 0: "FCS errors", |
| 175 | 1: "Excessive collision counter", |
| 176 | 2: "Late collision counter", |
| 177 | 3: "Frames too long", |
| 178 | 4: "Buffer overflows on receive", |
| 179 | 5: "Buffer overflows on transmit", |
| 180 | 6: "Single collision frame counter", |
| 181 | 7: "Multiple collisions frame counter", |
| 182 | 8: "SQE counter", |
| 183 | 9: "Deferred transmission counter", |
| 184 | 10: "Internal MAC transmit error counter", |
| 185 | 11: "Carrier sense error counter", |
| 186 | 12: "Alignment error counter", |
| 187 | 13: "Internal MAC receive error counter", |
| 188 | }, |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 189 | } |
| 190 | } |
| 191 | |
| 192 | // NewEthernetPerformanceMonitoringHistoryData (class ID 24) creates the basic |
| 193 | // Managed Entity definition that is used to validate an ME of this type that |
| 194 | // is received from or transmitted to the OMCC. |
| 195 | func NewEthernetPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 196 | return NewManagedEntity(*ethernetperformancemonitoringhistorydataBME, params...) |
| 197 | } |