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