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 EthernetFramePerformanceMonitoringHistoryDataUpstreamClassId ClassID = ClassID(322) |
| 25 | |
| 26 | var ethernetframeperformancemonitoringhistorydataupstreamBME *ManagedEntityDefinition |
| 27 | |
| 28 | // EthernetFramePerformanceMonitoringHistoryDataUpstream (class ID #322) |
| 29 | // This ME collects PM data associated with upstream Ethernet frame delivery. It is based on the |
| 30 | // Etherstats group of [IETF RFC 2819]. Instances of this ME are created and deleted by the OLT. |
| 31 | // |
| 32 | // For a complete discussion of generic PM architecture, refer to clause I.4. |
| 33 | // |
| 34 | // NOTE 1 – Implementers are encouraged to consider the Ethernet frame extended PM ME defined in |
| 35 | // clause 9.3.32, which collects the same counters in a more generalized way. |
| 36 | // |
| 37 | // Relationships |
| 38 | // An instance of this ME is associated with an instance of a MAC bridge port configuration data. |
| 39 | // |
| 40 | // Attributes |
| 41 | // Managed Entity Id |
| 42 | // Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an |
| 43 | // identical ID, this ME is implicitly linked to an instance of a MAC bridge port configuration |
| 44 | // data. (R, setbycreate) (mandatory) (2 bytes) |
| 45 | // |
| 46 | // Interval End Time |
| 47 | // Interval end time: This attribute identifies the most recently finished 15 min interval. (R) |
| 48 | // (mandatory) (1 byte) |
| 49 | // |
| 50 | // Threshold Data 1_2 Id |
| 51 | // Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that |
| 52 | // contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold |
| 53 | // data 2 ME is optional. (R, W, setbycreate) (mandatory) (2 bytes) |
| 54 | // |
| 55 | // Drop Events |
| 56 | // Drop events: The total number of events in which packets were dropped due to a lack of |
| 57 | // resources. This is not necessarily the number of packets dropped; it is the number of times this |
| 58 | // event was detected. (R) (mandatory) (4 bytes) |
| 59 | // |
| 60 | // Octets |
| 61 | // Octets: The total number of upstream octets received, including those in bad packets, excluding |
| 62 | // framing bits, but including FCS. (R) (mandatory) (4 bytes) |
| 63 | // |
| 64 | // Packets |
| 65 | // Packets: The total number of upstream packets received, including bad packets, broadcast packets |
| 66 | // and multicast packets. (R) (mandatory) (4 bytes) |
| 67 | // |
| 68 | // Broadcast Packets |
| 69 | // Broadcast packets: The total number of upstream good packets received that were directed to the |
| 70 | // broadcast address. This does not include multicast packets. (R) (mandatory) (4 bytes) |
| 71 | // |
| 72 | // Multicast Packets |
| 73 | // Multicast packets: The total number of upstream good packets received that were directed to a |
| 74 | // multicast address. This does not include broadcast packets. (R) (mandatory) (4 bytes) |
| 75 | // |
| 76 | // Crc Errored Packets |
| 77 | // CRC errored packets: The total number of upstream packets received that had a length (excluding |
| 78 | // framing bits, but including FCS octets) of between 64 octets and 1518 octets, inclusive, but had |
| 79 | // either a bad FCS with an integral number of octets (FCS error) or a bad FCS with a non-integral |
| 80 | // number of octets (alignment error). (R) (mandatory) (4 bytes) |
| 81 | // |
| 82 | // Undersize Packets |
| 83 | // Undersize packets: The total number of upstream packets received that were less than 64 octets |
| 84 | // long, but were otherwise well formed (excluding framing bits, but including FCS). (R) |
| 85 | // (mandatory) (4 bytes) |
| 86 | // |
| 87 | // Oversize Packets |
| 88 | // NOTE 2 – If 2 000 byte Ethernet frames are supported, counts in this performance parameter are |
| 89 | // not necessarily errors. |
| 90 | // |
| 91 | // Packets 64 Octets |
| 92 | // Packets 64 octets: The total number of upstream received packets (including bad packets) that |
| 93 | // were 64 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes) |
| 94 | // |
| 95 | // Packets 65 To 127 Octets |
| 96 | // Packets 65 to 127 octets: The total number of upstream received packets (including bad packets) |
| 97 | // that were 65..127 octets long, excluding framing bits but including FCS. (R) (mandatory) |
| 98 | // (4 bytes) |
| 99 | // |
| 100 | // Packets 128 To 255 Octets |
| 101 | // Packets 128 to 255 octets: The total number of upstream packets (including bad packets) received |
| 102 | // that were 128..255 octets long, excluding framing bits but including FCS. (R) (mandatory) |
| 103 | // (4 bytes) |
| 104 | // |
| 105 | // Packets 256 To 511 Octets |
| 106 | // Packets 256 to 511 octets: The total number of upstream packets (including bad packets) received |
| 107 | // that were 256..511 octets long, excluding framing bits but including FCS. (R) (mandatory) |
| 108 | // (4 bytes) |
| 109 | // |
| 110 | // Packets 512 To 1023 Octets |
| 111 | // Packets 512 to 1023 octets: The total number of upstream packets (including bad packets) |
| 112 | // received that were 512..1 023 octets long, excluding framing bits but including FCS. (R) |
| 113 | // (mandatory) (4 bytes) |
| 114 | // |
| 115 | // Packets 1024 To 1518 Octets |
| 116 | // Packets 1024 to 1518 octets: The total number of upstream packets (including bad packets) |
| 117 | // received that were 1024..1518 octets long, excluding framing bits, but including FCS. (R) |
| 118 | // (mandatory) (4 bytes) |
| 119 | // |
| 120 | type EthernetFramePerformanceMonitoringHistoryDataUpstream struct { |
| 121 | ManagedEntityDefinition |
| 122 | Attributes AttributeValueMap |
| 123 | } |
| 124 | |
| 125 | func init() { |
| 126 | ethernetframeperformancemonitoringhistorydataupstreamBME = &ManagedEntityDefinition{ |
| 127 | Name: "EthernetFramePerformanceMonitoringHistoryDataUpstream", |
| 128 | ClassID: 322, |
| 129 | MessageTypes: mapset.NewSetWith( |
| 130 | Create, |
| 131 | Delete, |
| 132 | Get, |
| 133 | Set, |
| 134 | ), |
| 135 | AllowedAttributeMask: 0XFFFF, |
| 136 | AttributeDefinitions: AttributeDefinitionMap{ |
| 137 | 0: Uint16Field("ManagedEntityId", 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, false, 0), |
| 138 | 1: ByteField("IntervalEndTime", 0, mapset.NewSetWith(Read), false, false, false, false, 1), |
| 139 | 2: Uint16Field("ThresholdData12Id", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 2), |
| 140 | 3: Uint32Field("DropEvents", 0, mapset.NewSetWith(Read), false, false, false, false, 3), |
| 141 | 4: Uint32Field("Octets", 0, mapset.NewSetWith(Read), false, false, false, false, 4), |
| 142 | 5: Uint32Field("Packets", 0, mapset.NewSetWith(Read), false, false, false, false, 5), |
| 143 | 6: Uint32Field("BroadcastPackets", 0, mapset.NewSetWith(Read), false, false, false, false, 6), |
| 144 | 7: Uint32Field("MulticastPackets", 0, mapset.NewSetWith(Read), false, false, false, false, 7), |
| 145 | 8: Uint32Field("CrcErroredPackets", 0, mapset.NewSetWith(Read), false, false, false, false, 8), |
| 146 | 9: Uint32Field("UndersizePackets", 0, mapset.NewSetWith(Read), false, false, false, false, 9), |
| 147 | 10: Uint32Field("OversizePackets", 0, mapset.NewSetWith(Read), false, false, false, false, 10), |
| 148 | 11: Uint32Field("Packets64Octets", 0, mapset.NewSetWith(Read), false, false, false, false, 11), |
| 149 | 12: Uint32Field("Packets65To127Octets", 0, mapset.NewSetWith(Read), false, false, false, false, 12), |
| 150 | 13: Uint32Field("Packets128To255Octets", 0, mapset.NewSetWith(Read), false, false, false, false, 13), |
| 151 | 14: Uint32Field("Packets256To511Octets", 0, mapset.NewSetWith(Read), false, false, false, false, 14), |
| 152 | 15: Uint32Field("Packets512To1023Octets", 0, mapset.NewSetWith(Read), false, false, false, false, 15), |
| 153 | 16: Uint32Field("Packets1024To1518Octets", 0, mapset.NewSetWith(Read), false, false, false, false, 16), |
| 154 | }, |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | // NewEthernetFramePerformanceMonitoringHistoryDataUpstream (class ID 322 creates the basic |
| 159 | // Managed Entity definition that is used to validate an ME of this type that |
| 160 | // is received from the wire, about to be sent on the wire. |
| 161 | func NewEthernetFramePerformanceMonitoringHistoryDataUpstream(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 162 | return NewManagedEntity(ethernetframeperformancemonitoringhistorydataupstreamBME, params...) |
| 163 | } |