Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | * Unless required by applicable law or agreed to in writing, software |
| 9 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | * See the License for the specific language governing permissions and |
| 12 | * limitations under the License. |
| 13 | */ |
| 14 | /* |
| 15 | * NOTE: This file was generated, manual edits will be overwritten! |
| 16 | * |
| 17 | * Generated by 'goCodeGenerator.py': |
| 18 | * https://github.com/cboling/OMCI-parser/README.md |
| 19 | */ |
| 20 | package generated |
| 21 | |
| 22 | import "github.com/deckarep/golang-set" |
| 23 | |
| 24 | const EthernetPerformanceMonitoringHistoryData3ClassId ClassID = ClassID(296) |
| 25 | |
| 26 | var ethernetperformancemonitoringhistorydata3BME *ManagedEntityDefinition |
| 27 | |
| 28 | // EthernetPerformanceMonitoringHistoryData3 (class ID #296) |
| 29 | // This ME collects PM data associated with an Ethernet interface. It includes parameters defined |
| 30 | // in the Ethernet statistics group of [IETF RFC 2819] that are not already covered by previously |
| 31 | // defined Ethernet monitoring MEs. The received direction is from the CPE towards the network |
| 32 | // (upstream). |
| 33 | // |
| 34 | // NOTE 1 – Several of the same counters are available from the Ethernet frame PM history data MEs, |
| 35 | // which are associated with MAC bridge ports. MAC bridge port association allows those MEs to be |
| 36 | // used for any Ethernet flow, in both upstream and downstream directions, while the Ethernet PM |
| 37 | // history data 3 ME can only be used on a physical IEEE 802.3 port. |
| 38 | // |
| 39 | // Instances of this ME are created and deleted by the OLT. |
| 40 | // |
| 41 | // For a complete discussion of generic PM architecture, refer to clause I.4. |
| 42 | // |
| 43 | // NOTE 2 – Implementers are encouraged to consider the Ethernet frame extended PM ME defined in |
| 44 | // clause 9.3.32, which collects the same counters in a more generalized way. |
| 45 | // |
| 46 | // Relationships |
| 47 | // An instance of this ME is associated with an instance of the PPTP Ethernet UNI. |
| 48 | // |
| 49 | // Attributes |
| 50 | // Managed Entity Id |
| 51 | // Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an |
| 52 | // identical ID, this ME is implicitly linked to an instance of the PPTP Ethernet UNI. (R, |
| 53 | // setbycreate) (mandatory) (2 bytes) |
| 54 | // |
| 55 | // Interval End Time |
| 56 | // Interval end time: This attribute identifies the most recently finished 15 min interval. (R) |
| 57 | // (mandatory) (1 byte) |
| 58 | // |
| 59 | // Threshold Data 1_2 Id |
| 60 | // Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that |
| 61 | // contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold |
| 62 | // data 2 ME is optional. (R, W, setbycreate) (mandatory) (2 bytes) |
| 63 | // |
| 64 | // Drop Events |
| 65 | // Drop events: The total number of events in which packets were dropped due to a lack of |
| 66 | // resources. This is not necessarily the number of packets dropped; it is the number of times this |
| 67 | // event was detected. (R) (mandatory) (4 bytes) |
| 68 | // |
| 69 | // Octets |
| 70 | // Octets: The total number of octets received from the CPE, including those in bad packets, |
| 71 | // excluding framing bytes, but including FCS. (R) (mandatory) (4 bytes) |
| 72 | // |
| 73 | // Packets |
| 74 | // Packets: The total number of packets received, including bad packets, broadcast packets and |
| 75 | // multicast packets. (R) (mandatory) (4 bytes) |
| 76 | // |
| 77 | // Broadcast Packets |
| 78 | // Broadcast packets: The total number of received good packets directed to the broadcast address. |
| 79 | // This does not include multicast packets. (R) (mandatory) (4 bytes) |
| 80 | // |
| 81 | // Multicast Packets |
| 82 | // Multicast packets: The total number of received good packets directed to a multicast address. |
| 83 | // This does not include broadcast packets. (R) (mandatory) (4 bytes) |
| 84 | // |
| 85 | // Undersize Packets |
| 86 | // Undersize packets: The total number of packets received that were less than 64 octets long, but |
| 87 | // were otherwise well formed (excluding framing bits, but including FCS). (R) (mandatory) |
| 88 | // (4 bytes) |
| 89 | // |
| 90 | // Fragments |
| 91 | // Fragments: The total number of packets received that were less than 64 octets long, excluding |
| 92 | // framing bits but including FCS octets, and had either a bad FCS with an integral number of |
| 93 | // octets (FCS error) or a bad FCS with a non-integral number of octets (alignment error). It is |
| 94 | // entirely normal for this attribute to increment. This is because it counts both runts (which are |
| 95 | // normal occurrences due to collisions) and noise hits. (R) (mandatory) (4 bytes) |
| 96 | // |
| 97 | // Jabbers |
| 98 | // Jabbers: The total number of packets received that were longer than 1518 octets, excluding |
| 99 | // framing bits but including FCS octets, and had either a bad FCS with an integral number of |
| 100 | // octets (FCS error) or a bad FCS with a non-integral number of octets (alignment error). The |
| 101 | // range to detect jabber is between 20 ms and 150 ms. (R) (mandatory) (4 bytes) |
| 102 | // |
| 103 | // Packets 64 Octets |
| 104 | // Packets 64 octets: The total number of received packets (including bad packets) that were |
| 105 | // 64 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes) |
| 106 | // |
| 107 | // Packets 65 To 127 Octets |
| 108 | // Packets 65 to 127 octets: The total number of received packets (including bad packets) that were |
| 109 | // 65..127 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes) |
| 110 | // |
| 111 | // Packets 128 To 255 Octets |
| 112 | // Packets 128 to 255 octets: The total number of packets (including bad packets) received that |
| 113 | // were 128..255 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes) |
| 114 | // |
| 115 | // Packets 256 To 511 Octets |
| 116 | // Packets 256 to 511 octets: The total number of packets (including bad packets) received that |
| 117 | // were 256..511 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes) |
| 118 | // |
| 119 | // Packets 512 To 1023 Octets |
| 120 | // Packets 512 to 1023 octets: The total number of packets (including bad packets) received that |
| 121 | // were 512..1023 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes) |
| 122 | // |
| 123 | // Packets 1024 To 1518 Octets |
| 124 | // Packets 1024 to 1518 octets: The total number of packets (including bad packets) received that |
| 125 | // were 1024..1518 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes) |
| 126 | // |
| 127 | type EthernetPerformanceMonitoringHistoryData3 struct { |
| 128 | ManagedEntityDefinition |
| 129 | Attributes AttributeValueMap |
| 130 | } |
| 131 | |
| 132 | func init() { |
| 133 | ethernetperformancemonitoringhistorydata3BME = &ManagedEntityDefinition{ |
| 134 | Name: "EthernetPerformanceMonitoringHistoryData3", |
| 135 | ClassID: 296, |
| 136 | MessageTypes: mapset.NewSetWith( |
| 137 | Create, |
| 138 | Delete, |
| 139 | Get, |
| 140 | Set, |
| 141 | ), |
| 142 | AllowedAttributeMask: 0XFFFF, |
| 143 | AttributeDefinitions: AttributeDefinitionMap{ |
| 144 | 0: Uint16Field("ManagedEntityId", 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, false, 0), |
| 145 | 1: ByteField("IntervalEndTime", 0, mapset.NewSetWith(Read), false, false, false, false, 1), |
| 146 | 2: Uint16Field("ThresholdData12Id", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 2), |
| 147 | 3: Uint32Field("DropEvents", 0, mapset.NewSetWith(Read), false, false, false, false, 3), |
| 148 | 4: Uint32Field("Octets", 0, mapset.NewSetWith(Read), false, false, false, false, 4), |
| 149 | 5: Uint32Field("Packets", 0, mapset.NewSetWith(Read), false, false, false, false, 5), |
| 150 | 6: Uint32Field("BroadcastPackets", 0, mapset.NewSetWith(Read), false, false, false, false, 6), |
| 151 | 7: Uint32Field("MulticastPackets", 0, mapset.NewSetWith(Read), false, false, false, false, 7), |
| 152 | 8: Uint32Field("UndersizePackets", 0, mapset.NewSetWith(Read), false, false, false, false, 8), |
| 153 | 9: Uint32Field("Fragments", 0, mapset.NewSetWith(Read), false, false, false, false, 9), |
| 154 | 10: Uint32Field("Jabbers", 0, mapset.NewSetWith(Read), false, false, false, false, 10), |
| 155 | 11: Uint32Field("Packets64Octets", 0, mapset.NewSetWith(Read), false, false, false, false, 11), |
| 156 | 12: Uint32Field("Packets65To127Octets", 0, mapset.NewSetWith(Read), false, false, false, false, 12), |
| 157 | 13: Uint32Field("Packets128To255Octets", 0, mapset.NewSetWith(Read), false, false, false, false, 13), |
| 158 | 14: Uint32Field("Packets256To511Octets", 0, mapset.NewSetWith(Read), false, false, false, false, 14), |
| 159 | 15: Uint32Field("Packets512To1023Octets", 0, mapset.NewSetWith(Read), false, false, false, false, 15), |
| 160 | 16: Uint32Field("Packets1024To1518Octets", 0, mapset.NewSetWith(Read), false, false, false, false, 16), |
| 161 | }, |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | // NewEthernetPerformanceMonitoringHistoryData3 (class ID 296 creates the basic |
| 166 | // Managed Entity definition that is used to validate an ME of this type that |
| 167 | // is received from the wire, about to be sent on the wire. |
| 168 | func NewEthernetPerformanceMonitoringHistoryData3(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 169 | return NewManagedEntity(ethernetperformancemonitoringhistorydata3BME, params...) |
| 170 | } |