Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 3 | * Copyright 2020-present Open Networking Foundation |
| 4 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [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 |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 8 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 10 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [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 | */ |
| 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 | */ |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 23 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 24 | package generated |
| 25 | |
| 26 | import "github.com/deckarep/golang-set" |
| 27 | |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 28 | // EthernetPerformanceMonitoringHistoryData3ClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Ethernet performance monitoring history data 3 |
| 30 | const EthernetPerformanceMonitoringHistoryData3ClassID ClassID = ClassID(296) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 31 | |
| 32 | var ethernetperformancemonitoringhistorydata3BME *ManagedEntityDefinition |
| 33 | |
| 34 | // EthernetPerformanceMonitoringHistoryData3 (class ID #296) |
| 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 | // |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 40 | // NOTE 1 - Several of the same counters are available from the Ethernet frame PM history data MEs, |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 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 | // |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 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. |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 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 |
| 57 | // Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an |
| 58 | // identical ID, this ME is implicitly linked to an instance of the PPTP Ethernet UNI. (R, |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 59 | // setbycreate) (mandatory) (2-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 60 | // |
| 61 | // Interval End Time |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 62 | // Interval end time: This attribute identifies the most recently finished 15-min interval. (R) |
| 63 | // (mandatory) (1-byte) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 64 | // |
| 65 | // Threshold Data 1_2 Id |
| 66 | // Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that |
| 67 | // contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 68 | // data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 69 | // |
| 70 | // Drop Events |
| 71 | // Drop events: The total number of events in which packets were dropped due to a lack of |
| 72 | // resources. This is not necessarily the number of packets dropped; it is the number of times this |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 73 | // event was detected. (R) (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 74 | // |
| 75 | // Octets |
| 76 | // Octets: The total number of octets received from the CPE, including those in bad packets, |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 77 | // excluding framing bytes, but including FCS. (R) (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 78 | // |
| 79 | // Packets |
| 80 | // Packets: The total number of packets received, including bad packets, broadcast packets and |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 81 | // multicast packets. (R) (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 82 | // |
| 83 | // Broadcast Packets |
| 84 | // Broadcast packets: The total number of received good packets directed to the broadcast address. |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 85 | // This does not include multicast packets. (R) (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 86 | // |
| 87 | // Multicast Packets |
| 88 | // Multicast packets: The total number of received good packets directed to a multicast address. |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 89 | // This does not include broadcast packets. (R) (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 90 | // |
| 91 | // Undersize Packets |
| 92 | // Undersize packets: The total number of packets received that were less than 64 octets long, but |
| 93 | // were otherwise well formed (excluding framing bits, but including FCS). (R) (mandatory) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 94 | // (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 95 | // |
| 96 | // Fragments |
| 97 | // Fragments: The total number of packets received that were less than 64 octets long, excluding |
| 98 | // framing bits but including FCS octets, and had either a bad FCS with an integral number of |
| 99 | // octets (FCS error) or a bad FCS with a non-integral number of octets (alignment error). It is |
| 100 | // entirely normal for this attribute to increment. This is because it counts both runts (which are |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 101 | // normal occurrences due to collisions) and noise hits. (R) (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 102 | // |
| 103 | // Jabbers |
| 104 | // Jabbers: The total number of packets received that were longer than 1518 octets, excluding |
| 105 | // framing bits but including FCS octets, and had either a bad FCS with an integral number of |
| 106 | // octets (FCS error) or a bad FCS with a non-integral number of octets (alignment error). The |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 107 | // range to detect jabber is between 20 ms and 150 ms. (R) (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 108 | // |
| 109 | // Packets 64 Octets |
| 110 | // Packets 64 octets: The total number of received packets (including bad packets) that were |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 111 | // 64-octets long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 112 | // |
| 113 | // Packets 65 To 127 Octets |
| 114 | // Packets 65 to 127 octets: The total number of received packets (including bad packets) that were |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 115 | // 65..127 octets long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 116 | // |
| 117 | // Packets 128 To 255 Octets |
| 118 | // Packets 128 to 255 octets: The total number of packets (including bad packets) received that |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 119 | // were 128..255 octets long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 120 | // |
| 121 | // Packets 256 To 511 Octets |
| 122 | // Packets 256 to 511 octets: The total number of packets (including bad packets) received that |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 123 | // were 256..511 octets long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 124 | // |
| 125 | // Packets 512 To 1023 Octets |
| 126 | // Packets 512 to 1023 octets: The total number of packets (including bad packets) received that |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 127 | // were 512..1023 octets long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 128 | // |
| 129 | // Packets 1024 To 1518 Octets |
| 130 | // Packets 1024 to 1518 octets: The total number of packets (including bad packets) received that |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 131 | // were 1024..1518 octets long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 132 | // |
| 133 | type EthernetPerformanceMonitoringHistoryData3 struct { |
| 134 | ManagedEntityDefinition |
| 135 | Attributes AttributeValueMap |
| 136 | } |
| 137 | |
| 138 | func init() { |
| 139 | ethernetperformancemonitoringhistorydata3BME = &ManagedEntityDefinition{ |
| 140 | Name: "EthernetPerformanceMonitoringHistoryData3", |
| 141 | ClassID: 296, |
| 142 | MessageTypes: mapset.NewSetWith( |
| 143 | Create, |
| 144 | Delete, |
| 145 | Get, |
| 146 | Set, |
Girish Gowdra | e268310 | 2021-03-05 08:24:26 -0800 | [diff] [blame] | 147 | GetCurrentData, |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 148 | ), |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 149 | AllowedAttributeMask: 0xffff, |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 150 | AttributeDefinitions: AttributeDefinitionMap{ |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 151 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 152 | 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1), |
| 153 | 2: Uint16Field("ThresholdData12Id", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 154 | 3: Uint32Field("DropEvents", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3), |
| 155 | 4: Uint32Field("Octets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4), |
| 156 | 5: Uint32Field("Packets", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5), |
| 157 | 6: Uint32Field("BroadcastPackets", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6), |
| 158 | 7: Uint32Field("MulticastPackets", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7), |
| 159 | 8: Uint32Field("UndersizePackets", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8), |
| 160 | 9: Uint32Field("Fragments", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9), |
| 161 | 10: Uint32Field("Jabbers", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10), |
| 162 | 11: Uint32Field("Packets64Octets", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11), |
| 163 | 12: Uint32Field("Packets65To127Octets", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12), |
| 164 | 13: Uint32Field("Packets128To255Octets", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13), |
| 165 | 14: Uint32Field("Packets256To511Octets", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14), |
| 166 | 15: Uint32Field("Packets512To1023Octets", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15), |
| 167 | 16: Uint32Field("Packets1024To1518Octets", CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16), |
| 168 | }, |
| 169 | Access: CreatedByOlt, |
| 170 | Support: UnknownSupport, |
| 171 | Alarms: AlarmMap{ |
| 172 | 0: "Drop events", |
| 173 | 1: "Undersize packets", |
| 174 | 2: "Fragments", |
| 175 | 3: "Jabbers", |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 176 | }, |
| 177 | } |
| 178 | } |
| 179 | |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 180 | // NewEthernetPerformanceMonitoringHistoryData3 (class ID 296) creates the basic |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 181 | // Managed Entity definition that is used to validate an ME of this type that |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 182 | // is received from or transmitted to the OMCC. |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 183 | func NewEthernetPerformanceMonitoringHistoryData3(params ...ParamData) (*ManagedEntity, OmciErrors) { |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 184 | return NewManagedEntity(*ethernetperformancemonitoringhistorydata3BME, params...) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 185 | } |