blob: 895e9ed94ad33d3d5ac82623970c1a0ea4270b97 [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
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
21package generated
22
23import "github.com/deckarep/golang-set"
24
25// EthernetPerformanceMonitoringHistoryData3ClassID is the 16-bit ID for the OMCI
26// Managed entity Ethernet performance monitoring history data 3
27const EthernetPerformanceMonitoringHistoryData3ClassID ClassID = ClassID(296)
28
29var ethernetperformancemonitoringhistorydata3BME *ManagedEntityDefinition
30
31// EthernetPerformanceMonitoringHistoryData3 (class ID #296)
32// This ME collects PM data associated with an Ethernet interface. It includes parameters defined
33// in the Ethernet statistics group of [IETF RFC 2819] that are not already covered by previously
34// defined Ethernet monitoring MEs. The received direction is from the CPE towards the network
35// (upstream).
36//
37// NOTE 1 - Several of the same counters are available from the Ethernet frame PM history data MEs,
38// which are associated with MAC bridge ports. MAC bridge port association allows those MEs to be
39// used for any Ethernet flow, in both upstream and downstream directions, while the Ethernet PM
40// history data 3 ME can only be used on a physical IEEE 802.3 port.
41//
42// Instances of this ME are created and deleted by the OLT.
43//
44// For a complete discussion of generic PM architecture, refer to clause I.4.
45//
46// NOTE 2 - Implementers are encouraged to consider the Ethernet frame extended PM ME defined in
47// clause-9.3.32, which collects the same counters in a more generalized way.
48//
49// Relationships
50// An instance of this ME is associated with an instance of the PPTP Ethernet UNI.
51//
52// Attributes
53// Managed Entity Id
54// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
55// identical ID, this ME is implicitly linked to an instance of the PPTP Ethernet UNI. (R,
56// setbycreate) (mandatory) (2-bytes)
57//
58// Interval End Time
59// Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
60// (mandatory) (1-byte)
61//
62// Threshold Data 1_2 Id
63// Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
64// contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
65// data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
66//
67// Drop Events
68// Drop events: The total number of events in which packets were dropped due to a lack of
69// resources. This is not necessarily the number of packets dropped; it is the number of times this
70// event was detected. (R) (mandatory) (4-bytes)
71//
72// Octets
73// Octets: The total number of octets received from the CPE, including those in bad packets,
74// excluding framing bytes, but including FCS. (R) (mandatory) (4-bytes)
75//
76// Packets
77// Packets: The total number of packets received, including bad packets, broadcast packets and
78// multicast packets. (R) (mandatory) (4-bytes)
79//
80// Broadcast Packets
81// Broadcast packets: The total number of received good packets directed to the broadcast address.
82// This does not include multicast packets. (R) (mandatory) (4-bytes)
83//
84// Multicast Packets
85// Multicast packets: The total number of received good packets directed to a multicast address.
86// This does not include broadcast packets. (R) (mandatory) (4-bytes)
87//
88// Undersize Packets
89// Undersize packets: The total number of packets received that were less than 64 octets long, but
90// were otherwise well formed (excluding framing bits, but including FCS). (R) (mandatory)
91// (4-bytes)
92//
93// Fragments
94// Fragments: The total number of packets received that were less than 64 octets long, excluding
95// framing bits but including FCS octets, and had either a bad FCS with an integral number of
96// octets (FCS error) or a bad FCS with a non-integral number of octets (alignment error). It is
97// entirely normal for this attribute to increment. This is because it counts both runts (which are
98// normal occurrences due to collisions) and noise hits. (R) (mandatory) (4-bytes)
99//
100// Jabbers
101// Jabbers: The total number of packets received that were longer than 1518 octets, excluding
102// framing bits but including FCS octets, and had either a bad FCS with an integral number of
103// octets (FCS error) or a bad FCS with a non-integral number of octets (alignment error). The
104// range to detect jabber is between 20 ms and 150 ms. (R) (mandatory) (4-bytes)
105//
106// Packets 64 Octets
107// Packets 64 octets: The total number of received packets (including bad packets) that were
108// 64-octets long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
109//
110// Packets 65 To 127 Octets
111// Packets 65 to 127 octets: The total number of received packets (including bad packets) that were
112// 65..127 octets long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
113//
114// Packets 128 To 255 Octets
115// Packets 128 to 255 octets: The total number of packets (including bad packets) received that
116// were 128..255 octets long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
117//
118// Packets 256 To 511 Octets
119// Packets 256 to 511 octets: The total number of packets (including bad packets) received that
120// were 256..511 octets long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
121//
122// Packets 512 To 1023 Octets
123// Packets 512 to 1023 octets: The total number of packets (including bad packets) received that
124// were 512..1023 octets long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
125//
126// Packets 1024 To 1518 Octets
127// Packets 1024 to 1518 octets: The total number of packets (including bad packets) received that
128// were 1024..1518 octets long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
129//
130type EthernetPerformanceMonitoringHistoryData3 struct {
131 ManagedEntityDefinition
132 Attributes AttributeValueMap
133}
134
135func init() {
136 ethernetperformancemonitoringhistorydata3BME = &ManagedEntityDefinition{
137 Name: "EthernetPerformanceMonitoringHistoryData3",
138 ClassID: 296,
139 MessageTypes: mapset.NewSetWith(
140 Create,
141 Delete,
142 Get,
143 Set,
144 ),
145 AllowedAttributeMask: 0xffff,
146 AttributeDefinitions: AttributeDefinitionMap{
147 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
148 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
149 2: Uint16Field("ThresholdData12Id", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
150 3: Uint32Field("DropEvents", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
151 4: Uint32Field("Octets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
152 5: Uint32Field("Packets", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
153 6: Uint32Field("BroadcastPackets", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
154 7: Uint32Field("MulticastPackets", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
155 8: Uint32Field("UndersizePackets", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
156 9: Uint32Field("Fragments", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
157 10: Uint32Field("Jabbers", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
158 11: Uint32Field("Packets64Octets", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
159 12: Uint32Field("Packets65To127Octets", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
160 13: Uint32Field("Packets128To255Octets", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
161 14: Uint32Field("Packets256To511Octets", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
162 15: Uint32Field("Packets512To1023Octets", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
163 16: Uint32Field("Packets1024To1518Octets", CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
164 },
165 Access: CreatedByOlt,
166 Support: UnknownSupport,
167 }
168}
169
170// NewEthernetPerformanceMonitoringHistoryData3 (class ID 296) creates the basic
171// Managed Entity definition that is used to validate an ME of this type that
172// is received from or transmitted to the OMCC.
173func NewEthernetPerformanceMonitoringHistoryData3(params ...ParamData) (*ManagedEntity, OmciErrors) {
174 return NewManagedEntity(*ethernetperformancemonitoringhistorydata3BME, params...)
175}