blob: 8149d84aaf0dd0a5c510f2ecc173f7873fe2196f [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Matteo Scandolof9d43412021-01-12 11:11:34 -08003 * Copyright 2020-present Open Networking Foundation
4
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07005 * 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
Matteo Scandolof9d43412021-01-12 11:11:34 -08008
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Matteo Scandolof9d43412021-01-12 11:11:34 -080010
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070011 * 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 */
17/*
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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080023
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070024package generated
25
26import "github.com/deckarep/golang-set"
27
Matteo Scandolof9d43412021-01-12 11:11:34 -080028// EthernetPerformanceMonitoringHistoryData3ClassID is the 16-bit ID for the OMCI
29// Managed entity Ethernet performance monitoring history data 3
Andrea Campanella10426e22021-10-15 17:58:04 +020030const EthernetPerformanceMonitoringHistoryData3ClassID = ClassID(296) // 0x0128
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
32var ethernetperformancemonitoringhistorydata3BME *ManagedEntityDefinition
33
Andrea Campanella10426e22021-10-15 17:58:04 +020034// EthernetPerformanceMonitoringHistoryData3 (Class ID: #296 / 0x0128)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070035// This ME collects PM data associated with an Ethernet interface. It includes parameters defined
36// in the Ethernet statistics group of [IETF RFC 2819] that are not already covered by previously
37// defined Ethernet monitoring MEs. The received direction is from the CPE towards the network
38// (upstream).
39//
Matteo Scandolof9d43412021-01-12 11:11:34 -080040// NOTE 1 - Several of the same counters are available from the Ethernet frame PM history data MEs,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070041// which are associated with MAC bridge ports. MAC bridge port association allows those MEs to be
42// used for any Ethernet flow, in both upstream and downstream directions, while the Ethernet PM
43// history data 3 ME can only be used on a physical IEEE 802.3 port.
44//
45// Instances of this ME are created and deleted by the OLT.
46//
47// For a complete discussion of generic PM architecture, refer to clause I.4.
48//
Matteo Scandolof9d43412021-01-12 11:11:34 -080049// NOTE 2 - Implementers are encouraged to consider the Ethernet frame extended PM ME defined in
50// clause-9.3.32, which collects the same counters in a more generalized way.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070051//
52// Relationships
53// An instance of this ME is associated with an instance of the PPTP Ethernet UNI.
54//
55// Attributes
56// Managed Entity Id
Andrea Campanella10426e22021-10-15 17:58:04 +020057// This attribute uniquely identifies each instance of this ME. Through an identical ID, this ME is
58// implicitly linked to an instance of the PPTP Ethernet UNI. (R, setbycreate) (mandatory)
59// (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070060//
61// Interval End Time
Andrea Campanella10426e22021-10-15 17:58:04 +020062// This attribute identifies the most recently finished 15-min interval. (R) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070063//
64// Threshold Data 1_2 Id
65// Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
66// contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
Matteo Scandolof9d43412021-01-12 11:11:34 -080067// data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070068//
69// Drop Events
Andrea Campanella10426e22021-10-15 17:58:04 +020070// The total number of events in which packets were dropped due to a lack of resources. This is not
71// necessarily the number of packets dropped; it is the number of times this event was detected.
72// (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070073//
74// Octets
Andrea Campanella10426e22021-10-15 17:58:04 +020075// The total number of octets received from the CPE, including those in bad packets, excluding
76// framing bytes, but including FCS. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070077//
78// Packets
Andrea Campanella10426e22021-10-15 17:58:04 +020079// The total number of packets received, including bad packets, broadcast packets and multicast
80// packets. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070081//
82// Broadcast Packets
Andrea Campanella10426e22021-10-15 17:58:04 +020083// The total number of received good packets directed to the broadcast address. This does not
84// include multicast packets. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070085//
86// Multicast Packets
Andrea Campanella10426e22021-10-15 17:58:04 +020087// The total number of received good packets directed to a multicast address. This does not include
88// broadcast packets. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070089//
90// Undersize Packets
Andrea Campanella10426e22021-10-15 17:58:04 +020091// The total number of packets received that were less than 64 octets long, but were otherwise well
92// formed (excluding framing bits, but including FCS). (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070093//
94// Fragments
Andrea Campanella10426e22021-10-15 17:58:04 +020095// The total number of packets received that were less than 64 octets long, excluding framing bits
96// but including FCS octets, and had either a bad FCS with an integral number of octets (FCS error)
97// or a bad FCS with a non-integral number of octets (alignment error). It is entirely normal for
98// this attribute to increment. This is because it counts both runts (which are normal occurrences
99// due to collisions) and noise hits. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700100//
101// Jabbers
Andrea Campanella10426e22021-10-15 17:58:04 +0200102// The total number of packets received that were longer than 1518 octets, excluding framing bits
103// but including FCS octets, and had either a bad FCS with an integral number of octets (FCS error)
104// or a bad FCS with a non-integral number of octets (alignment error). The range to detect jabber
105// is between 20 ms and 150 ms. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700106//
107// Packets 64 Octets
Andrea Campanella10426e22021-10-15 17:58:04 +0200108// The total number of received packets (including bad packets) that were 64-octets long, excluding
109// framing bits but including FCS. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700110//
111// Packets 65 To 127 Octets
Andrea Campanella10426e22021-10-15 17:58:04 +0200112// The total number of received packets (including bad packets) that were 65..127 octets long,
113// excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700114//
115// Packets 128 To 255 Octets
Andrea Campanella10426e22021-10-15 17:58:04 +0200116// The total number of packets (including bad packets) received that were 128..255 octets long,
117// excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700118//
119// Packets 256 To 511 Octets
Andrea Campanella10426e22021-10-15 17:58:04 +0200120// The total number of packets (including bad packets) received that were 256..511 octets long,
121// excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700122//
123// Packets 512 To 1023 Octets
Andrea Campanella10426e22021-10-15 17:58:04 +0200124// The total number of packets (including bad packets) received that were 512..1023 octets long,
125// excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700126//
127// Packets 1024 To 1518 Octets
Andrea Campanella10426e22021-10-15 17:58:04 +0200128// The total number of packets (including bad packets) received that were 1024..1518 octets long,
129// excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700130//
131type EthernetPerformanceMonitoringHistoryData3 struct {
132 ManagedEntityDefinition
133 Attributes AttributeValueMap
134}
135
136func init() {
137 ethernetperformancemonitoringhistorydata3BME = &ManagedEntityDefinition{
138 Name: "EthernetPerformanceMonitoringHistoryData3",
139 ClassID: 296,
140 MessageTypes: mapset.NewSetWith(
141 Create,
142 Delete,
143 Get,
144 Set,
Girish Gowdrae2683102021-03-05 08:24:26 -0800145 GetCurrentData,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700146 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800147 AllowedAttributeMask: 0xffff,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700148 AttributeDefinitions: AttributeDefinitionMap{
Matteo Scandolof9d43412021-01-12 11:11:34 -0800149 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
150 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
151 2: Uint16Field("ThresholdData12Id", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
152 3: Uint32Field("DropEvents", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
153 4: Uint32Field("Octets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
154 5: Uint32Field("Packets", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
155 6: Uint32Field("BroadcastPackets", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
156 7: Uint32Field("MulticastPackets", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
157 8: Uint32Field("UndersizePackets", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
158 9: Uint32Field("Fragments", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
159 10: Uint32Field("Jabbers", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
160 11: Uint32Field("Packets64Octets", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
161 12: Uint32Field("Packets65To127Octets", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
162 13: Uint32Field("Packets128To255Octets", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
163 14: Uint32Field("Packets256To511Octets", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
164 15: Uint32Field("Packets512To1023Octets", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
165 16: Uint32Field("Packets1024To1518Octets", CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
166 },
167 Access: CreatedByOlt,
168 Support: UnknownSupport,
169 Alarms: AlarmMap{
170 0: "Drop events",
171 1: "Undersize packets",
172 2: "Fragments",
173 3: "Jabbers",
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700174 },
175 }
176}
177
Matteo Scandolof9d43412021-01-12 11:11:34 -0800178// NewEthernetPerformanceMonitoringHistoryData3 (class ID 296) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700179// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800180// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700181func NewEthernetPerformanceMonitoringHistoryData3(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800182 return NewManagedEntity(*ethernetperformancemonitoringhistorydata3BME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700183}