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 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame] | 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 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame] | 8 | * |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [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 | */ |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [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 | // EthernetPerformanceMonitoringHistoryData3ClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Ethernet performance monitoring history data 3 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const EthernetPerformanceMonitoringHistoryData3ClassID = ClassID(296) // 0x0128 |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var ethernetperformancemonitoringhistorydata3BME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // EthernetPerformanceMonitoringHistoryData3 (Class ID: #296 / 0x0128) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // This ME collects PM data associated with an Ethernet interface. It includes parameters defined |
| 36 | // in the Ethernet statistics group of [IETF RFC 2819] that are not already covered by previously |
| 37 | // defined Ethernet monitoring MEs. The received direction is from the CPE towards the network |
| 38 | // (upstream). |
| 39 | // |
| 40 | // NOTE 1 - Several of the same counters are available from the Ethernet frame PM history data MEs, |
| 41 | // which are associated with MAC bridge ports. MAC bridge port association allows those MEs to be |
| 42 | // used for any Ethernet flow, in both upstream and downstream directions, while the Ethernet PM |
| 43 | // history data 3 ME can only be used on a physical IEEE 802.3 port. |
| 44 | // |
| 45 | // Instances of this ME are created and deleted by the OLT. |
| 46 | // |
| 47 | // For a complete discussion of generic PM architecture, refer to clause I.4. |
| 48 | // |
| 49 | // NOTE 2 - Implementers are encouraged to consider the Ethernet frame extended PM ME defined in |
| 50 | // clause-9.3.32, which collects the same counters in a more generalized way. |
| 51 | // |
| 52 | // Relationships |
| 53 | // An instance of this ME is associated with an instance of the PPTP Ethernet UNI. |
| 54 | // |
| 55 | // Attributes |
| 56 | // Managed Entity Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 57 | // This attribute uniquely identifies each instance of this ME. Through an identical ID, this ME is |
| 58 | // implicitly linked to an instance of the PPTP Ethernet UNI. (R, setbycreate) (mandatory) |
| 59 | // (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 60 | // |
| 61 | // Interval End Time |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 62 | // This attribute identifies the most recently finished 15-min interval. (R) (mandatory) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 63 | // |
| 64 | // Threshold Data 1_2 Id |
| 65 | // Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that |
| 66 | // contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold |
| 67 | // data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes) |
| 68 | // |
| 69 | // Drop Events |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 70 | // The total number of events in which packets were dropped due to a lack of resources. This is not |
| 71 | // necessarily the number of packets dropped; it is the number of times this event was detected. |
| 72 | // (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 73 | // |
| 74 | // Octets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 75 | // The total number of octets received from the CPE, including those in bad packets, excluding |
| 76 | // framing bytes, but including FCS. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 77 | // |
| 78 | // Packets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 79 | // The total number of packets received, including bad packets, broadcast packets and multicast |
| 80 | // packets. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 81 | // |
| 82 | // Broadcast Packets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 83 | // The total number of received good packets directed to the broadcast address. This does not |
| 84 | // include multicast packets. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 85 | // |
| 86 | // Multicast Packets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 87 | // The total number of received good packets directed to a multicast address. This does not include |
| 88 | // broadcast packets. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 89 | // |
| 90 | // Undersize Packets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 91 | // The total number of packets received that were less than 64 octets long, but were otherwise well |
| 92 | // formed (excluding framing bits, but including FCS). (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 93 | // |
| 94 | // Fragments |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 95 | // The total number of packets received that were less than 64 octets long, excluding framing bits |
| 96 | // but including FCS octets, and had either a bad FCS with an integral number of octets (FCS error) |
| 97 | // or a bad FCS with a non-integral number of octets (alignment error). It is entirely normal for |
| 98 | // this attribute to increment. This is because it counts both runts (which are normal occurrences |
| 99 | // due to collisions) and noise hits. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 100 | // |
| 101 | // Jabbers |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 102 | // The total number of packets received that were longer than 1518 octets, excluding framing bits |
| 103 | // but including FCS octets, and had either a bad FCS with an integral number of octets (FCS error) |
| 104 | // or a bad FCS with a non-integral number of octets (alignment error). The range to detect jabber |
| 105 | // is between 20 ms and 150 ms. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 106 | // |
| 107 | // Packets 64 Octets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 108 | // The total number of received packets (including bad packets) that were 64-octets long, excluding |
| 109 | // framing bits but including FCS. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 110 | // |
| 111 | // Packets 65 To 127 Octets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 112 | // The total number of received packets (including bad packets) that were 65..127 octets long, |
| 113 | // excluding framing bits but including FCS. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 114 | // |
| 115 | // Packets 128 To 255 Octets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 116 | // The total number of packets (including bad packets) received that were 128..255 octets long, |
| 117 | // excluding framing bits but including FCS. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 118 | // |
| 119 | // Packets 256 To 511 Octets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 120 | // The total number of packets (including bad packets) received that were 256..511 octets long, |
| 121 | // excluding framing bits but including FCS. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 122 | // |
| 123 | // Packets 512 To 1023 Octets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 124 | // The total number of packets (including bad packets) received that were 512..1023 octets long, |
| 125 | // excluding framing bits but including FCS. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 126 | // |
| 127 | // Packets 1024 To 1518 Octets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 128 | // The total number of packets (including bad packets) received that were 1024..1518 octets long, |
| 129 | // excluding framing bits but including FCS. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 130 | // |
| 131 | type EthernetPerformanceMonitoringHistoryData3 struct { |
| 132 | ManagedEntityDefinition |
| 133 | Attributes AttributeValueMap |
| 134 | } |
| 135 | |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame] | 136 | // Attribute name constants |
| 137 | |
| 138 | const EthernetPerformanceMonitoringHistoryData3_IntervalEndTime = "IntervalEndTime" |
| 139 | const EthernetPerformanceMonitoringHistoryData3_ThresholdData12Id = "ThresholdData12Id" |
| 140 | const EthernetPerformanceMonitoringHistoryData3_DropEvents = "DropEvents" |
| 141 | const EthernetPerformanceMonitoringHistoryData3_Octets = "Octets" |
| 142 | const EthernetPerformanceMonitoringHistoryData3_Packets = "Packets" |
| 143 | const EthernetPerformanceMonitoringHistoryData3_BroadcastPackets = "BroadcastPackets" |
| 144 | const EthernetPerformanceMonitoringHistoryData3_MulticastPackets = "MulticastPackets" |
| 145 | const EthernetPerformanceMonitoringHistoryData3_UndersizePackets = "UndersizePackets" |
| 146 | const EthernetPerformanceMonitoringHistoryData3_Fragments = "Fragments" |
| 147 | const EthernetPerformanceMonitoringHistoryData3_Jabbers = "Jabbers" |
| 148 | const EthernetPerformanceMonitoringHistoryData3_Packets64Octets = "Packets64Octets" |
| 149 | const EthernetPerformanceMonitoringHistoryData3_Packets65To127Octets = "Packets65To127Octets" |
| 150 | const EthernetPerformanceMonitoringHistoryData3_Packets128To255Octets = "Packets128To255Octets" |
| 151 | const EthernetPerformanceMonitoringHistoryData3_Packets256To511Octets = "Packets256To511Octets" |
| 152 | const EthernetPerformanceMonitoringHistoryData3_Packets512To1023Octets = "Packets512To1023Octets" |
| 153 | const EthernetPerformanceMonitoringHistoryData3_Packets1024To1518Octets = "Packets1024To1518Octets" |
| 154 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 155 | func init() { |
| 156 | ethernetperformancemonitoringhistorydata3BME = &ManagedEntityDefinition{ |
| 157 | Name: "EthernetPerformanceMonitoringHistoryData3", |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame] | 158 | ClassID: EthernetPerformanceMonitoringHistoryData3ClassID, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 159 | MessageTypes: mapset.NewSetWith( |
| 160 | Create, |
| 161 | Delete, |
| 162 | Get, |
| 163 | Set, |
Chip Boling | 2d51f05 | 2021-02-09 09:04:15 -0600 | [diff] [blame] | 164 | GetCurrentData, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 165 | ), |
| 166 | AllowedAttributeMask: 0xffff, |
| 167 | AttributeDefinitions: AttributeDefinitionMap{ |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame] | 168 | 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 169 | 1: ByteField(EthernetPerformanceMonitoringHistoryData3_IntervalEndTime, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1), |
| 170 | 2: Uint16Field(EthernetPerformanceMonitoringHistoryData3_ThresholdData12Id, PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 171 | 3: Uint32Field(EthernetPerformanceMonitoringHistoryData3_DropEvents, CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3), |
| 172 | 4: Uint32Field(EthernetPerformanceMonitoringHistoryData3_Octets, CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4), |
| 173 | 5: Uint32Field(EthernetPerformanceMonitoringHistoryData3_Packets, CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5), |
| 174 | 6: Uint32Field(EthernetPerformanceMonitoringHistoryData3_BroadcastPackets, CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6), |
| 175 | 7: Uint32Field(EthernetPerformanceMonitoringHistoryData3_MulticastPackets, CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7), |
| 176 | 8: Uint32Field(EthernetPerformanceMonitoringHistoryData3_UndersizePackets, CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8), |
| 177 | 9: Uint32Field(EthernetPerformanceMonitoringHistoryData3_Fragments, CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9), |
| 178 | 10: Uint32Field(EthernetPerformanceMonitoringHistoryData3_Jabbers, CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10), |
| 179 | 11: Uint32Field(EthernetPerformanceMonitoringHistoryData3_Packets64Octets, CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11), |
| 180 | 12: Uint32Field(EthernetPerformanceMonitoringHistoryData3_Packets65To127Octets, CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12), |
| 181 | 13: Uint32Field(EthernetPerformanceMonitoringHistoryData3_Packets128To255Octets, CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13), |
| 182 | 14: Uint32Field(EthernetPerformanceMonitoringHistoryData3_Packets256To511Octets, CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14), |
| 183 | 15: Uint32Field(EthernetPerformanceMonitoringHistoryData3_Packets512To1023Octets, CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15), |
| 184 | 16: Uint32Field(EthernetPerformanceMonitoringHistoryData3_Packets1024To1518Octets, CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16), |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 185 | }, |
| 186 | Access: CreatedByOlt, |
| 187 | Support: UnknownSupport, |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 188 | Alarms: AlarmMap{ |
| 189 | 0: "Drop events", |
| 190 | 1: "Undersize packets", |
| 191 | 2: "Fragments", |
| 192 | 3: "Jabbers", |
| 193 | }, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 194 | } |
| 195 | } |
| 196 | |
| 197 | // NewEthernetPerformanceMonitoringHistoryData3 (class ID 296) creates the basic |
| 198 | // Managed Entity definition that is used to validate an ME of this type that |
| 199 | // is received from or transmitted to the OMCC. |
| 200 | func NewEthernetPerformanceMonitoringHistoryData3(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 201 | return NewManagedEntity(*ethernetperformancemonitoringhistorydata3BME, params...) |
| 202 | } |