blob: 8a71aefce2654490ec48e3256425e724df8013ca [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// MacBridgePortPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
26// Managed entity MAC bridge port performance monitoring history data
27const MacBridgePortPerformanceMonitoringHistoryDataClassID ClassID = ClassID(52)
28
29var macbridgeportperformancemonitoringhistorydataBME *ManagedEntityDefinition
30
31// MacBridgePortPerformanceMonitoringHistoryData (class ID #52)
32// This ME collects PM data associated with a MAC bridge port. Instances of this ME are created and
33// deleted by the OLT.
34//
35// For a complete discussion of generic PM architecture, refer to clause I.4.
36//
37// Relationships
38// An instance of this ME is associated with an instance of a MAC bridge port configuration data
39// ME.
40//
41// Attributes
42// Managed Entity Id
43// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
44// identical ID, this ME is implicitly linked to an instance of the MAC bridge port configuration
45// data ME. (R, setbycreate) (mandatory) (2-bytes)
46//
47// Interval End Time
48// Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
49// (mandatory) (1-byte)
50//
51// Threshold Data 1_2 Id
52// Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
53// contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
54// data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
55//
56// Forwarded Frame Counter
57// Forwarded frame counter: This attribute counts frames transmitted successfully on this port. (R)
58// (mandatory) (4-bytes)
59//
60// Delay Exceeded Discard Counter
61// Delay exceeded discard counter: This attribute counts frames discarded on this port because
62// transmission was delayed. (R) (mandatory) (4-bytes)
63//
64// Maximum Transmission Unit Mtu Exceeded Discard Counter
65// Maximum transmission unit (MTU) exceeded discard counter: This attribute counts frames discarded
66// on this port because the MTU was exceeded. (R) (mandatory) (4-bytes)
67//
68// Received Frame Counter
69// Received frame counter: This attribute counts frames received on this port. (R) (mandatory)
70// (4-bytes)
71//
72// Received And Discarded Counter
73// Received and discarded counter: This attribute counts frames received on this port that were
74// discarded due to errors. (R) (mandatory) (4-bytes)
75//
76type MacBridgePortPerformanceMonitoringHistoryData struct {
77 ManagedEntityDefinition
78 Attributes AttributeValueMap
79}
80
81func init() {
82 macbridgeportperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
83 Name: "MacBridgePortPerformanceMonitoringHistoryData",
84 ClassID: 52,
85 MessageTypes: mapset.NewSetWith(
86 Create,
87 Delete,
88 Get,
89 Set,
90 ),
91 AllowedAttributeMask: 0xfe00,
92 AttributeDefinitions: AttributeDefinitionMap{
93 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
94 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
95 2: Uint16Field("ThresholdData12Id", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
96 3: Uint32Field("ForwardedFrameCounter", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
97 4: Uint32Field("DelayExceededDiscardCounter", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
98 5: Uint32Field("MaximumTransmissionUnitMtuExceededDiscardCounter", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
99 6: Uint32Field("ReceivedFrameCounter", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
100 7: Uint32Field("ReceivedAndDiscardedCounter", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
101 },
102 Access: CreatedByOlt,
103 Support: UnknownSupport,
104 }
105}
106
107// NewMacBridgePortPerformanceMonitoringHistoryData (class ID 52) creates the basic
108// Managed Entity definition that is used to validate an ME of this type that
109// is received from or transmitted to the OMCC.
110func NewMacBridgePortPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
111 return NewManagedEntity(*macbridgeportperformancemonitoringhistorydataBME, params...)
112}