Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [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 | |
| 21 | package generated |
| 22 | |
| 23 | import "github.com/deckarep/golang-set" |
| 24 | |
| 25 | // EthernetFrameExtendedPm64BitClassID is the 16-bit ID for the OMCI |
| 26 | // Managed entity Ethernet frame extended PM 64-bit |
| 27 | const EthernetFrameExtendedPm64BitClassID ClassID = ClassID(426) |
| 28 | |
| 29 | var ethernetframeextendedpm64bitBME *ManagedEntityDefinition |
| 30 | |
| 31 | // EthernetFrameExtendedPm64Bit (class ID #426) |
| 32 | // This ME collects some of the PM data at a point where an Ethernet flow can be observed. It is |
| 33 | // based on the Etherstats group of [IETF RFC 2819] and [IETF RFC 2863]. Instances of this ME are |
| 34 | // created and deleted by the OLT. References to received frames are to be interpreted as the |
| 35 | // number of frames entering the monitoring point in the direction specified by the control block. |
| 36 | // |
| 37 | // For a complete discussion of generic PM architecture, refer to clause I.4. |
| 38 | // |
| 39 | // Attributes |
| 40 | // Managed Entity Id |
| 41 | // Managed entity ID: This attribute uniquely identifies each instance of this ME. To facilitate |
| 42 | // discovery, the identification of instances sequentially starting with 1 is encouraged. (R, |
| 43 | // setbycreate) (mandatory) (2 bytes) |
| 44 | // |
| 45 | // Interval End Time |
| 46 | // Interval end time: This attribute identifies the most recently finished 15-min interval. If |
| 47 | // continuous accumulation is enabled in the control block, this attribute is not used and has the |
| 48 | // fixed value 0. (R) (mandatory) (1 byte) |
| 49 | // |
| 50 | // Control Block |
| 51 | // (R, W, setbycreate) (mandatory) (16 bytes) |
| 52 | // |
| 53 | // Drop Events |
| 54 | // Drop events: The total number of events in which frames were dropped due to a lack of resources. |
| 55 | // This is not necessarily the number of frames dropped; it is the number of times this event was |
| 56 | // detected. (R) (mandatory) (4 bytes) |
| 57 | // |
| 58 | // Octets |
| 59 | // Octets: The total number of octets received, including those in bad frames, excluding framing |
| 60 | // bits, but including FCS. (R) (mandatory) (4 bytes) |
| 61 | // |
| 62 | // Frames |
| 63 | // Frames: The total number of frames received, including bad frames, broadcast frames and |
| 64 | // multicast frames. (R) (mandatory) (4 bytes) |
| 65 | // |
| 66 | // Broadcast Frames |
| 67 | // Broadcast frames: The total number of received good frames directed to the broadcast address. |
| 68 | // This does not include multicast frames. (R) (mandatory) (4 bytes) |
| 69 | // |
| 70 | // Multicast Frames |
| 71 | // Multicast frames: The total number of received good frames directed to a multicast address. This |
| 72 | // does not include broadcast frames. (R) (mandatory) (4 bytes) |
| 73 | // |
| 74 | // Crc Errored Frames |
| 75 | // CRC errored frames: The total number of frames received that had a length (excluding framing |
| 76 | // bits, but including FCS octets) of between 64 and 1518 octets, inclusive, but had either a bad |
| 77 | // FCS with an integral number of octets (FCS error) or a bad FCS with a non-integral number of |
| 78 | // octets (alignment error). (R) (mandatory) (4 bytes) |
| 79 | // |
| 80 | // Undersize Frames |
| 81 | // Undersize frames: The total number of frames received that were less than 64 octets long but |
| 82 | // were otherwise well formed (excluding framing bits, but including FCS octets). (R) (mandatory) |
| 83 | // (4 bytes) |
| 84 | // |
| 85 | // Oversize Frames |
| 86 | // Oversize frames: The total number of frames received that were longer than 1518 octets |
| 87 | // (excluding framing bits, but including FCS octets) and were otherwise well formed. (R) |
| 88 | // (mandatory) (4 bytes) |
| 89 | // |
| 90 | // Frames 64 Octets |
| 91 | // Frames 64 octets: The total number of received frames (including bad frames) that were 64-octets |
| 92 | // long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes) |
| 93 | // |
| 94 | // Frames 65 To 127 Octets |
| 95 | // Frames 65 to 127 octets: The total number of received frames (including bad frames) that were |
| 96 | // 65..127 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes) |
| 97 | // |
| 98 | // Frames 128 To 255 Octets |
| 99 | // Frames 128 to 255 octets: The total number of frames (including bad frames) received that were |
| 100 | // 128..255 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes) |
| 101 | // |
| 102 | // Frames 256 To 511 Octets |
| 103 | // Frames 256 to 511 octets: The total number of frames (including bad frames) received that were |
| 104 | // 256..511 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes) |
| 105 | // |
| 106 | // Frames 512 To 1 023 Octets |
| 107 | // Frames 512 to 1-023 octets: The total number of frames (including bad frames) received that were |
| 108 | // 512..1-023 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes) |
| 109 | // |
| 110 | // Frames 1024 To 1518 Octets |
| 111 | // Frames 1024 to 1518 octets: The total number of frames (including bad frames) received that were |
| 112 | // 1024..1518 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes) |
| 113 | // |
| 114 | type EthernetFrameExtendedPm64Bit struct { |
| 115 | ManagedEntityDefinition |
| 116 | Attributes AttributeValueMap |
| 117 | } |
| 118 | |
| 119 | func init() { |
| 120 | ethernetframeextendedpm64bitBME = &ManagedEntityDefinition{ |
| 121 | Name: "EthernetFrameExtendedPm64Bit", |
| 122 | ClassID: 426, |
| 123 | MessageTypes: mapset.NewSetWith( |
| 124 | Create, |
| 125 | Delete, |
| 126 | Get, |
| 127 | Set, |
| 128 | ), |
| 129 | AllowedAttributeMask: 0xffff, |
| 130 | AttributeDefinitions: AttributeDefinitionMap{ |
| 131 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 132 | 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1), |
| 133 | 2: MultiByteField("ControlBlock", OctetsAttributeType, 0x4000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 134 | 3: Uint64Field("DropEvents", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3), |
| 135 | 4: Uint64Field("Octets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4), |
| 136 | 5: Uint64Field("Frames", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5), |
| 137 | 6: Uint64Field("BroadcastFrames", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6), |
| 138 | 7: Uint64Field("MulticastFrames", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7), |
| 139 | 8: Uint64Field("CrcErroredFrames", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8), |
| 140 | 9: Uint64Field("UndersizeFrames", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9), |
| 141 | 10: Uint64Field("OversizeFrames", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10), |
| 142 | 11: Uint64Field("Frames64Octets", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11), |
| 143 | 12: Uint64Field("Frames65To127Octets", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12), |
| 144 | 13: Uint64Field("Frames128To255Octets", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13), |
| 145 | 14: Uint64Field("Frames256To511Octets", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14), |
| 146 | 15: Uint64Field("Frames512To1023Octets", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15), |
| 147 | 16: Uint64Field("Frames1024To1518Octets", CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16), |
| 148 | }, |
| 149 | Access: CreatedByOlt, |
| 150 | Support: UnknownSupport, |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | // NewEthernetFrameExtendedPm64Bit (class ID 426) creates the basic |
| 155 | // Managed Entity definition that is used to validate an ME of this type that |
| 156 | // is received from or transmitted to the OMCC. |
| 157 | func NewEthernetFrameExtendedPm64Bit(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 158 | return NewManagedEntity(*ethernetframeextendedpm64bitBME, params...) |
| 159 | } |