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 | */ |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [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 | // EthernetFrameExtendedPm64BitClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Ethernet frame extended PM 64-bit |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const EthernetFrameExtendedPm64BitClassID = ClassID(425) // 0x01a9 |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var ethernetframeextendedpm64bitBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // EthernetFrameExtendedPm64Bit (Class ID: #425 / 0x01a9) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // This ME collects some of the PM data at a point where an Ethernet flow can be observed. It is |
| 36 | // based on the Etherstats group of [IETF RFC 2819] and [IETF RFC 2863]. Instances of this ME are |
| 37 | // created and deleted by the OLT. References to received frames are to be interpreted as the |
| 38 | // number of frames entering the monitoring point in the direction specified by the control block. |
| 39 | // |
| 40 | // For a complete discussion of generic PM architecture, refer to clause I.4. |
| 41 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 42 | // Relationships |
| 43 | // An instance of this ME may be associated with an instance of an ME at any Ethernet interface |
| 44 | // within the ONU. The specific ME is identified in the control block attribute. |
| 45 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 46 | // Attributes |
| 47 | // Managed Entity Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 48 | // This attribute uniquely identifies each instance of this ME. To facilitate discovery, it is |
| 49 | // encouraged to identify instances sequentially starting with 1. (R, set-by-create) (mandatory) (2 |
| 50 | // bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 51 | // |
| 52 | // Interval End Time |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 53 | // This attribute identifies the most recently finished 15-min interval. If continuous accumulation |
| 54 | // is enabled in the control block, this attribute is not used and has the fixed value 0. (R) |
| 55 | // (mandatory) (1 byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 56 | // |
| 57 | // Control Block |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 58 | // This attribute contains fields defined as follows. |
| 59 | // |
| 60 | // Threshold data 64-bit ID: (2 bytes). This attribute points to an instance of the threshold data |
| 61 | // 64-bit ME that contains PM threshold values. When PM is collected on a continuously running |
| 62 | // basis, rather than in 15-min intervals, counter thresholds should not be established. There is |
| 63 | // no mechanism to clear a TCA, and any counter parameter may eventually be expected to cross any |
| 64 | // given threshold value. |
| 65 | // |
| 66 | // Parent ME class: (2 bytes). This field contains the enumerated value of the ME class of the PM |
| 67 | // ME's parent. Together with the parent ME instance field, this permits a given PM ME to be |
| 68 | // associated with any OMCI ME. The supported ME classes are as follows. |
| 69 | // |
| 70 | // 46 MAC bridge configuration data |
| 71 | // |
| 72 | // 47 MAC bridge port configuration data |
| 73 | // |
| 74 | // 11 Physical path termination point Ethernet UNI |
| 75 | // |
| 76 | // 98 Physical path termination point xDSL UNI part 1 |
| 77 | // |
| 78 | // 266 GEM IW termination point |
| 79 | // |
| 80 | // 281 Multicast GEM IW termination point |
| 81 | // |
| 82 | // 329 Virtual Ethernet interface point |
| 83 | // |
| 84 | // 162 Physical path termination point MoCA UNI |
| 85 | // |
| 86 | // Parent ME instance: (2 bytes). This field identifies the specific parent ME instance to which |
| 87 | // the PM ME is attached. |
| 88 | // |
| 89 | // Accumulation disable: (2 bytes). This bit field allows PM accumulation to be disabled; refer to |
| 90 | // Table 9.3.32-1. The default value 0 enables PM collection. If bit 15 is set to 1, no PM is |
| 91 | // collected by this ME instance. If bit 15 = 0 and any of bits 14..1 are set to 1, PM collection |
| 92 | // is inhibited for the attributes indicated by the 1 bits. Inhibiting PM collection does not |
| 93 | // change the value of a PM attribute, but if PM is accumulated in 15-min intervals, the value is |
| 94 | // lost at the next 15-min interval boundary. |
| 95 | // |
| 96 | // Bit 16 is an action bit that always reads back as 0. When written to 1, it resets all PM |
| 97 | // attributes in the ME, and clears any TCAs that may be outstanding. |
| 98 | // |
| 99 | // TCA disable: (2 bytes). Also clarified in Table 9.3.32-1, this field permits TCAs to be |
| 100 | // inhibited, either individually or for the complete ME instance. As with the accumulation disable |
| 101 | // field, the default value 0 enables TCAs, and setting the global disable bit overrides the |
| 102 | // settings of the individual thresholds. Unlike the accumulation disable field, the bits are |
| 103 | // mapped to the thresholds defined in the associated threshold data 1 and 2 ME instances. When the |
| 104 | // global or attribute-specific value changes from 0 to 1, outstanding TCAs are cleared, either for |
| 105 | // the ME instance globally or for the individual disabled threshold. These bits affect only |
| 106 | // notifications, not the underlying parameter accumulation or storage. |
| 107 | // |
| 108 | // If the threshold data 1/2 ID attribute does not contain a valid pointer, this field is not |
| 109 | // meaningful. |
| 110 | // |
| 111 | // Thresholds should be used with caution if PM attributes are accumulated continuously. |
| 112 | // |
| 113 | // Control fields: (2 bytes). This field is a bit map whose values govern the behaviour of the PM |
| 114 | // ME. Bits are assigned as follows: |
| 115 | // |
| 116 | // Bit 1 (LSB) The value 1 specifies continuous accumulation, regardless of 15-min intervals. There |
| 117 | // is no concept of current and historic accumulators; get and get current data (if supported) both |
| 118 | // return current values. The value 0 specifies 15-min accumulators exactly like those of classical |
| 119 | // PM. |
| 120 | // |
| 121 | // Bit 2 This bit indicates directionality for the collection of data. The value 0 indicates that |
| 122 | // data are to be collected for upstream traffic. The value 1 indicates that data are to be |
| 123 | // collected for downstream traffic. |
| 124 | // |
| 125 | // Bits 3..14 Reserved, should be set to 0 by the OLT and ignored by the ONU. |
| 126 | // |
| 127 | // Bit 15 When this bit is 1, the P bits of the TCI field are used to filter the PM data collected. |
| 128 | // The value 0 indicates that PM is collected without regard to P bits. |
| 129 | // |
| 130 | // Bit 16 When this bit is 1, the VID bits of the TCI field are used to filter the PM data |
| 131 | // collected. The value 0 indicates that PM is collected without regard to VID. |
| 132 | // |
| 133 | // TCI: (2 bytes). This field contains the value optionally used as a filter for the PM data |
| 134 | // collected, under the control of bits 15..16 of the control fields. This value is matched to the |
| 135 | // outer tag of a frame. Untagged frames are not counted when this field is used. |
| 136 | // |
| 137 | // Reserved: (2 bytes). Not used; should be set to 0 by the OLT and ignored by the ONU. |
| 138 | // |
| 139 | // (R, W, set-by-create) (mandatory) (16 bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 140 | // |
| 141 | // Drop Events |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 142 | // The total number of events in which frames were dropped due to lack of resources. This is not |
| 143 | // necessarily the number of frames dropped; it is the number of times this event was detected. (R) |
| 144 | // (mandatory) (8 bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 145 | // |
| 146 | // Octets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 147 | // The total number of octets received, including those in bad frames, excluding framing bits, but |
| 148 | // including FCS. (R) (mandatory) (8 bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 149 | // |
| 150 | // Frames |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 151 | // The total number of frames received, including bad frames, broadcast frames and multicast |
| 152 | // frames. (R) (mandatory) (8 bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 153 | // |
| 154 | // Broadcast Frames |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 155 | // The total number of received good frames directed to the broadcast address. This does not |
| 156 | // include multicast frames. (R) (mandatory) (8 bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 157 | // |
| 158 | // Multicast Frames |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 159 | // The total number of received good frames directed to a multicast address. This does not include |
| 160 | // broadcast frames. (R) (mandatory) (8 bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 161 | // |
| 162 | // Crc Errored Frames |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 163 | // The total number of frames received that had a length (excluding framing bits, but including FCS |
| 164 | // octets) of between 64 and 1518 octets, inclusive, but had either a bad FCS with an integral |
| 165 | // number of octets (FCS error) or a bad FCS with a non-integral number of octets (alignment |
| 166 | // error). (R) (mandatory) (8 bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 167 | // |
| 168 | // Undersize Frames |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 169 | // The total number of frames received that were less than 64 octets long, but were otherwise well |
| 170 | // formed (excluding framing bits, but including FCS octets). (R) (mandatory) (8 bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 171 | // |
| 172 | // Oversize Frames |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 173 | // The total number of frames received that were longer than 1518 octets (excluding framing bits, |
| 174 | // but including FCS octets) and were otherwise well formed. (R) (mandatory) (8 bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 175 | // |
| 176 | // Frames 64 Octets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 177 | // The total number of received frames (including bad frames) that were 64-octets long, excluding |
| 178 | // framing bits, but including FCS. (R) (mandatory) (8-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 179 | // |
| 180 | // Frames 65 To 127 Octets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 181 | // The total number of received frames (including bad frames) that were 65..127 octets long, |
| 182 | // excluding framing bits but including FCS. (R) (mandatory) (8 bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 183 | // |
| 184 | // Frames 128 To 255 Octets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 185 | // The total number of frames (including bad frames) received that were 128..255 octets long, |
| 186 | // excluding framing bits but including FCS. (R) (mandatory) (8 bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 187 | // |
| 188 | // Frames 256 To 511 Octets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 189 | // The total number of frames (including bad frames) received that were 256..511 octets long, |
| 190 | // excluding framing bits but including FCS. (R) (mandatory) (8 bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 191 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 192 | // Frames 512 To 1023 Octets |
| 193 | // The total number of frames (including bad frames) received that were 512..1023 octets long, |
| 194 | // excluding framing bits but including FCS. (R) (mandatory) (8 bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 195 | // |
| 196 | // Frames 1024 To 1518 Octets |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 197 | // The total number of frames (including bad frames) received that were 1024..1518 octets long, |
| 198 | // excluding framing bits but including FCS. (R) (mandatory) (8 bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 199 | // |
| 200 | type EthernetFrameExtendedPm64Bit struct { |
| 201 | ManagedEntityDefinition |
| 202 | Attributes AttributeValueMap |
| 203 | } |
| 204 | |
| 205 | func init() { |
| 206 | ethernetframeextendedpm64bitBME = &ManagedEntityDefinition{ |
| 207 | Name: "EthernetFrameExtendedPm64Bit", |
Chip Boling | 7a6e8d9 | 2021-07-14 15:42:21 -0500 | [diff] [blame] | 208 | ClassID: 425, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 209 | MessageTypes: mapset.NewSetWith( |
| 210 | Create, |
| 211 | Delete, |
| 212 | Get, |
| 213 | Set, |
Chip Boling | 2d51f05 | 2021-02-09 09:04:15 -0600 | [diff] [blame] | 214 | GetCurrentData, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 215 | ), |
| 216 | AllowedAttributeMask: 0xffff, |
| 217 | AttributeDefinitions: AttributeDefinitionMap{ |
| 218 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 219 | 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1), |
| 220 | 2: MultiByteField("ControlBlock", OctetsAttributeType, 0x4000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 221 | 3: Uint64Field("DropEvents", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3), |
| 222 | 4: Uint64Field("Octets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4), |
| 223 | 5: Uint64Field("Frames", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5), |
| 224 | 6: Uint64Field("BroadcastFrames", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6), |
| 225 | 7: Uint64Field("MulticastFrames", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7), |
| 226 | 8: Uint64Field("CrcErroredFrames", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8), |
| 227 | 9: Uint64Field("UndersizeFrames", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9), |
| 228 | 10: Uint64Field("OversizeFrames", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10), |
| 229 | 11: Uint64Field("Frames64Octets", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11), |
| 230 | 12: Uint64Field("Frames65To127Octets", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12), |
| 231 | 13: Uint64Field("Frames128To255Octets", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13), |
| 232 | 14: Uint64Field("Frames256To511Octets", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14), |
| 233 | 15: Uint64Field("Frames512To1023Octets", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15), |
| 234 | 16: Uint64Field("Frames1024To1518Octets", CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16), |
| 235 | }, |
| 236 | Access: CreatedByOlt, |
| 237 | Support: UnknownSupport, |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 238 | Alarms: AlarmMap{ |
| 239 | 1: "Drop events", |
| 240 | 2: "CRC errored frames", |
| 241 | 3: "Undersize frames", |
| 242 | 4: "Oversize frames", |
| 243 | }, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 244 | } |
| 245 | } |
| 246 | |
Chip Boling | 7a6e8d9 | 2021-07-14 15:42:21 -0500 | [diff] [blame] | 247 | // NewEthernetFrameExtendedPm64Bit (class ID 425) creates the basic |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 248 | // Managed Entity definition that is used to validate an ME of this type that |
| 249 | // is received from or transmitted to the OMCC. |
| 250 | func NewEthernetFrameExtendedPm64Bit(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 251 | return NewManagedEntity(*ethernetframeextendedpm64bitBME, params...) |
| 252 | } |