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 | // EthernetFramePerformanceMonitoringHistoryDataDownstreamClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Ethernet frame performance monitoring history data downstream |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const EthernetFramePerformanceMonitoringHistoryDataDownstreamClassID = ClassID(321) // 0x0141 |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var ethernetframeperformancemonitoringhistorydatadownstreamBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // EthernetFramePerformanceMonitoringHistoryDataDownstream (Class ID: #321 / 0x0141) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // This ME is identical to the Ethernet frame PM history data upstream ME, with the exception that |
| 36 | // it monitors downstream traffic. |
| 37 | // |
| 38 | // Attributes |
| 39 | // Managed Entity Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 40 | // This attribute uniquely identifies each instance of this ME. Through an identical ID, this ME is |
| 41 | // implicitly linked to an instance of a MAC bridge port configuration data. (R, setbycreate) |
| 42 | // (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 43 | // |
| 44 | // Interval End Time |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 45 | // 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] | 46 | // |
| 47 | // Threshold Data 1_2 Id |
| 48 | // Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that |
| 49 | // contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold |
| 50 | // data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes) |
| 51 | // |
| 52 | // Drop Events |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 53 | // The total number of events in which packets were dropped due to a lack of resources. This is not |
| 54 | // necessarily the number of packets dropped; it is the number of times this event was detected. |
| 55 | // (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 56 | // |
| 57 | // Octets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 58 | // The total number of upstream octets received, including those in bad packets, excluding framing |
| 59 | // bits, but including FCS. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 60 | // |
| 61 | // Packets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 62 | // The total number of upstream packets received, including bad packets, broadcast packets and |
| 63 | // multicast packets. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 64 | // |
| 65 | // Broadcast Packets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 66 | // The total number of upstream good packets received that were directed to the broadcast address. |
| 67 | // This does not include multicast packets. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 68 | // |
| 69 | // Multicast Packets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 70 | // The total number of upstream good packets received that were directed to a multicast address. |
| 71 | // This does not include broadcast packets. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 72 | // |
| 73 | // Crc Errored Packets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 74 | // The total number of upstream packets received that had a length (excluding framing bits, but |
| 75 | // including FCS octets) of between 64-octets and 1518-octets, inclusive, but had either a bad FCS |
| 76 | // with an integral number of octets (FCS error) or a bad FCS with a non-integral number of octets |
| 77 | // (alignment error). (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 78 | // |
| 79 | // Undersize Packets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 80 | // The total number of upstream packets received that were less than 64-octets long, but were |
| 81 | // otherwise well formed (excluding framing bits, but including FCS). (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 82 | // |
| 83 | // Oversize Packets |
| 84 | // NOTE 2 - If 2-000-byte Ethernet frames are supported, counts in this performance parameter are |
| 85 | // not necessarily errors. |
| 86 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 87 | // The total number of upstream packets received that were longer than 1518-octets (excluding |
| 88 | // framing bits, but including FCS) and were otherwise well formed. (R) (mandatory) (4-bytes) |
| 89 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 90 | // Packets 64 Octets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 91 | // The total number of upstream received packets (including bad packets) that were 64-octets long, |
| 92 | // excluding framing bits but including FCS. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 93 | // |
| 94 | // Packets 65 To 127 Octets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 95 | // The total number of upstream received packets (including bad packets) that were 65..127 octets |
| 96 | // long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 97 | // |
| 98 | // Packets 128 To 255 Octets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 99 | // The total number of upstream packets (including bad packets) received that were 128..255 octets |
| 100 | // long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 101 | // |
| 102 | // Packets 256 To 511 Octets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 103 | // The total number of upstream packets (including bad packets) received that were 256..511 octets |
| 104 | // long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 105 | // |
| 106 | // Packets 512 To 1023 Octets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 107 | // The total number of upstream packets (including bad packets) received that were 512..1-023 |
| 108 | // octets long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 109 | // |
| 110 | // Packets 1024 To 1518 Octets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 111 | // The total number of upstream packets (including bad packets) received that were 1024..1518 |
| 112 | // octets long, excluding framing bits, but including FCS. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 113 | // |
| 114 | type EthernetFramePerformanceMonitoringHistoryDataDownstream struct { |
| 115 | ManagedEntityDefinition |
| 116 | Attributes AttributeValueMap |
| 117 | } |
| 118 | |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame] | 119 | // Attribute name constants |
| 120 | |
| 121 | const EthernetFramePerformanceMonitoringHistoryDataDownstream_IntervalEndTime = "IntervalEndTime" |
| 122 | const EthernetFramePerformanceMonitoringHistoryDataDownstream_ThresholdData12Id = "ThresholdData12Id" |
| 123 | const EthernetFramePerformanceMonitoringHistoryDataDownstream_DropEvents = "DropEvents" |
| 124 | const EthernetFramePerformanceMonitoringHistoryDataDownstream_Octets = "Octets" |
| 125 | const EthernetFramePerformanceMonitoringHistoryDataDownstream_Packets = "Packets" |
| 126 | const EthernetFramePerformanceMonitoringHistoryDataDownstream_BroadcastPackets = "BroadcastPackets" |
| 127 | const EthernetFramePerformanceMonitoringHistoryDataDownstream_MulticastPackets = "MulticastPackets" |
| 128 | const EthernetFramePerformanceMonitoringHistoryDataDownstream_CrcErroredPackets = "CrcErroredPackets" |
| 129 | const EthernetFramePerformanceMonitoringHistoryDataDownstream_UndersizePackets = "UndersizePackets" |
| 130 | const EthernetFramePerformanceMonitoringHistoryDataDownstream_OversizePackets = "OversizePackets" |
| 131 | const EthernetFramePerformanceMonitoringHistoryDataDownstream_Packets64Octets = "Packets64Octets" |
| 132 | const EthernetFramePerformanceMonitoringHistoryDataDownstream_Packets65To127Octets = "Packets65To127Octets" |
| 133 | const EthernetFramePerformanceMonitoringHistoryDataDownstream_Packets128To255Octets = "Packets128To255Octets" |
| 134 | const EthernetFramePerformanceMonitoringHistoryDataDownstream_Packets256To511Octets = "Packets256To511Octets" |
| 135 | const EthernetFramePerformanceMonitoringHistoryDataDownstream_Packets512To1023Octets = "Packets512To1023Octets" |
| 136 | const EthernetFramePerformanceMonitoringHistoryDataDownstream_Packets1024To1518Octets = "Packets1024To1518Octets" |
| 137 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 138 | func init() { |
| 139 | ethernetframeperformancemonitoringhistorydatadownstreamBME = &ManagedEntityDefinition{ |
| 140 | Name: "EthernetFramePerformanceMonitoringHistoryDataDownstream", |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame] | 141 | ClassID: EthernetFramePerformanceMonitoringHistoryDataDownstreamClassID, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 142 | MessageTypes: mapset.NewSetWith( |
| 143 | Create, |
| 144 | Delete, |
| 145 | Get, |
| 146 | Set, |
Chip Boling | 2d51f05 | 2021-02-09 09:04:15 -0600 | [diff] [blame] | 147 | GetCurrentData, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 148 | ), |
| 149 | AllowedAttributeMask: 0xffff, |
| 150 | AttributeDefinitions: AttributeDefinitionMap{ |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame] | 151 | 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 152 | 1: ByteField(EthernetFramePerformanceMonitoringHistoryDataDownstream_IntervalEndTime, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1), |
| 153 | 2: Uint16Field(EthernetFramePerformanceMonitoringHistoryDataDownstream_ThresholdData12Id, PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 154 | 3: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataDownstream_DropEvents, CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3), |
| 155 | 4: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataDownstream_Octets, CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4), |
| 156 | 5: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataDownstream_Packets, CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5), |
| 157 | 6: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataDownstream_BroadcastPackets, CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6), |
| 158 | 7: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataDownstream_MulticastPackets, CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7), |
| 159 | 8: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataDownstream_CrcErroredPackets, CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8), |
| 160 | 9: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataDownstream_UndersizePackets, CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9), |
| 161 | 10: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataDownstream_OversizePackets, CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10), |
| 162 | 11: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataDownstream_Packets64Octets, CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11), |
| 163 | 12: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataDownstream_Packets65To127Octets, CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12), |
| 164 | 13: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataDownstream_Packets128To255Octets, CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13), |
| 165 | 14: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataDownstream_Packets256To511Octets, CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14), |
| 166 | 15: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataDownstream_Packets512To1023Octets, CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15), |
| 167 | 16: Uint32Field(EthernetFramePerformanceMonitoringHistoryDataDownstream_Packets1024To1518Octets, CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16), |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 168 | }, |
| 169 | Access: CreatedByOlt, |
| 170 | Support: UnknownSupport, |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 171 | Alarms: AlarmMap{ |
| 172 | 0: "Drop events", |
| 173 | 1: "CRC errored packets", |
| 174 | 2: "Undersize packets", |
| 175 | 3: "Oversize packets", |
| 176 | }, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 177 | } |
| 178 | } |
| 179 | |
| 180 | // NewEthernetFramePerformanceMonitoringHistoryDataDownstream (class ID 321) creates the basic |
| 181 | // Managed Entity definition that is used to validate an ME of this type that |
| 182 | // is received from or transmitted to the OMCC. |
| 183 | func NewEthernetFramePerformanceMonitoringHistoryDataDownstream(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 184 | return NewManagedEntity(*ethernetframeperformancemonitoringhistorydatadownstreamBME, params...) |
| 185 | } |