Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -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 | // EthernetFramePerformanceMonitoringHistoryDataUpstreamClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Ethernet frame performance monitoring history data upstream |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 30 | const EthernetFramePerformanceMonitoringHistoryDataUpstreamClassID = ClassID(322) // 0x0142 |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 31 | |
| 32 | var ethernetframeperformancemonitoringhistorydataupstreamBME *ManagedEntityDefinition |
| 33 | |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 34 | // EthernetFramePerformanceMonitoringHistoryDataUpstream (Class ID: #322 / 0x0142) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 35 | // This ME collects PM data associated with upstream Ethernet frame delivery. It is based on the |
| 36 | // Etherstats group of [IETF RFC 2819]. 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 | // NOTE 1 - Implementers are encouraged to consider the Ethernet frame extended PM ME defined in |
| 41 | // clause-9.3.32, which collects the same counters in a more generalized way. |
| 42 | // |
| 43 | // Relationships |
| 44 | // An instance of this ME is associated with an instance of a MAC bridge port configuration data. |
| 45 | // |
| 46 | // Attributes |
| 47 | // Managed Entity Id |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 48 | // This attribute uniquely identifies each instance of this ME. Through an identical ID, this ME is |
| 49 | // implicitly linked to an instance of a MAC bridge port configuration data. (R, setbycreate) |
| 50 | // (mandatory) (2-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 51 | // |
| 52 | // Interval End Time |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 53 | // This attribute identifies the most recently finished 15-min interval. (R) (mandatory) (1-byte) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 54 | // |
| 55 | // Threshold Data 1_2 Id |
| 56 | // Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that |
| 57 | // contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold |
| 58 | // data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes) |
| 59 | // |
| 60 | // Drop Events |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 61 | // The total number of events in which packets were dropped due to a lack of resources. This is not |
| 62 | // necessarily the number of packets dropped; it is the number of times this event was detected. |
| 63 | // (R) (mandatory) (4-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 64 | // |
| 65 | // Octets |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 66 | // The total number of upstream octets received, including those in bad packets, excluding framing |
| 67 | // bits, but including FCS. (R) (mandatory) (4-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 68 | // |
| 69 | // Packets |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 70 | // The total number of upstream packets received, including bad packets, broadcast packets and |
| 71 | // multicast packets. (R) (mandatory) (4-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 72 | // |
| 73 | // Broadcast Packets |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 74 | // The total number of upstream good packets received that were directed to the broadcast address. |
| 75 | // This does not include multicast packets. (R) (mandatory) (4-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 76 | // |
| 77 | // Multicast Packets |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 78 | // The total number of upstream good packets received that were directed to a multicast address. |
| 79 | // This does not include broadcast packets. (R) (mandatory) (4-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 80 | // |
| 81 | // Crc Errored Packets |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 82 | // The total number of upstream packets received that had a length (excluding framing bits, but |
| 83 | // including FCS octets) of between 64-octets and 1518-octets, inclusive, but had either a bad FCS |
| 84 | // with an integral number of octets (FCS error) or a bad FCS with a non-integral number of octets |
| 85 | // (alignment error). (R) (mandatory) (4-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 86 | // |
| 87 | // Undersize Packets |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 88 | // The total number of upstream packets received that were less than 64-octets long, but were |
| 89 | // otherwise well formed (excluding framing bits, but including FCS). (R) (mandatory) (4-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 90 | // |
| 91 | // Oversize Packets |
| 92 | // NOTE 2 - If 2-000-byte Ethernet frames are supported, counts in this performance parameter are |
| 93 | // not necessarily errors. |
| 94 | // |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 95 | // The total number of upstream packets received that were longer than 1518-octets (excluding |
| 96 | // framing bits, but including FCS) and were otherwise well formed. (R) (mandatory) (4-bytes) |
| 97 | // |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 98 | // Packets 64 Octets |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 99 | // The total number of upstream received packets (including bad packets) that were 64-octets long, |
| 100 | // excluding framing bits but including FCS. (R) (mandatory) (4-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 101 | // |
| 102 | // Packets 65 To 127 Octets |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 103 | // The total number of upstream received packets (including bad packets) that were 65..127 octets |
| 104 | // long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 105 | // |
| 106 | // Packets 128 To 255 Octets |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 107 | // The total number of upstream packets (including bad packets) received that were 128..255 octets |
| 108 | // long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 109 | // |
| 110 | // Packets 256 To 511 Octets |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 111 | // The total number of upstream packets (including bad packets) received that were 256..511 octets |
| 112 | // long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 113 | // |
| 114 | // Packets 512 To 1023 Octets |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 115 | // The total number of upstream packets (including bad packets) received that were 512..1-023 |
| 116 | // octets long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 117 | // |
| 118 | // Packets 1024 To 1518 Octets |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 119 | // The total number of upstream packets (including bad packets) received that were 1024..1518 |
| 120 | // octets long, excluding framing bits, but including FCS. (R) (mandatory) (4-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 121 | // |
| 122 | type EthernetFramePerformanceMonitoringHistoryDataUpstream struct { |
| 123 | ManagedEntityDefinition |
| 124 | Attributes AttributeValueMap |
| 125 | } |
| 126 | |
| 127 | func init() { |
| 128 | ethernetframeperformancemonitoringhistorydataupstreamBME = &ManagedEntityDefinition{ |
| 129 | Name: "EthernetFramePerformanceMonitoringHistoryDataUpstream", |
| 130 | ClassID: 322, |
| 131 | MessageTypes: mapset.NewSetWith( |
| 132 | Create, |
| 133 | Delete, |
| 134 | Get, |
| 135 | Set, |
Girish Gowdra | e268310 | 2021-03-05 08:24:26 -0800 | [diff] [blame] | 136 | GetCurrentData, |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 137 | ), |
| 138 | AllowedAttributeMask: 0xffff, |
| 139 | AttributeDefinitions: AttributeDefinitionMap{ |
| 140 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 141 | 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1), |
| 142 | 2: Uint16Field("ThresholdData12Id", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 143 | 3: Uint32Field("DropEvents", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3), |
| 144 | 4: Uint32Field("Octets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4), |
| 145 | 5: Uint32Field("Packets", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5), |
| 146 | 6: Uint32Field("BroadcastPackets", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6), |
| 147 | 7: Uint32Field("MulticastPackets", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7), |
| 148 | 8: Uint32Field("CrcErroredPackets", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8), |
| 149 | 9: Uint32Field("UndersizePackets", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9), |
| 150 | 10: Uint32Field("OversizePackets", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10), |
| 151 | 11: Uint32Field("Packets64Octets", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11), |
| 152 | 12: Uint32Field("Packets65To127Octets", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12), |
| 153 | 13: Uint32Field("Packets128To255Octets", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13), |
| 154 | 14: Uint32Field("Packets256To511Octets", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14), |
| 155 | 15: Uint32Field("Packets512To1023Octets", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15), |
| 156 | 16: Uint32Field("Packets1024To1518Octets", CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16), |
| 157 | }, |
| 158 | Access: CreatedByOlt, |
| 159 | Support: UnknownSupport, |
| 160 | Alarms: AlarmMap{ |
| 161 | 0: "Drop events", |
| 162 | 1: "CRC errored packets", |
| 163 | 2: "Undersize packets", |
| 164 | 3: "Oversize packets", |
| 165 | }, |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | // NewEthernetFramePerformanceMonitoringHistoryDataUpstream (class ID 322) creates the basic |
| 170 | // Managed Entity definition that is used to validate an ME of this type that |
| 171 | // is received from or transmitted to the OMCC. |
| 172 | func NewEthernetFramePerformanceMonitoringHistoryDataUpstream(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 173 | return NewManagedEntity(*ethernetframeperformancemonitoringhistorydataupstreamBME, params...) |
| 174 | } |