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