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