blob: 7a4e4576eecc1d6a0899bb5ebe24301f43b0a310 [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Andrea Campanella7167ebb2020-02-24 09:56:38 +01003 * Copyright 2020-present Open Networking Foundation
4
Chip Boling6e27b352020-02-14 09:10:01 -06005 * 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 Campanella7167ebb2020-02-24 09:56:38 +01008
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Andrea Campanella7167ebb2020-02-24 09:56:38 +010010
Chip Boling6e27b352020-02-14 09:10:01 -060011 * 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 Boling34ebcb62021-02-02 12:13:58 -060017/*
Chip Boling6e27b352020-02-14 09:10:01 -060018 * 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
24package generated
25
26import "github.com/deckarep/golang-set"
27
28// MgcPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
29// Managed entity MGC performance monitoring history data
30const MgcPerformanceMonitoringHistoryDataClassID ClassID = ClassID(156)
31
32var mgcperformancemonitoringhistorydataBME *ManagedEntityDefinition
33
34// MgcPerformanceMonitoringHistoryData (class ID #156)
35// The MGC monitoring data ME provides run-time statistics for an active MGC association. Instances
36// of this ME are created and deleted by the OLT.
37//
38// For a complete discussion of generic PM architecture, refer to clause I.4.
39//
40// Relationships
41// An instance of this ME is associated with an instance of the MGC config data or MGC config
42// portal ME.
43//
44// Attributes
45// Managed Entity Id
46// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
47// identical ID, this ME is implicitly linked to an instance of the associated MGC config data or
48// to the MGC config portal ME. If a non-OMCI configuration method is used for VoIP, there can be
49// only one live ME instance, associated with the MGC config portal, and with ME ID 0. (R,
50// setbycreate) (mandatory) (2-bytes)
51//
52// Interval End Time
53// Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
54// (mandatory) (1-byte)
55//
56// Threshold Data 1_2 Id
57// Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
58// contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
59// data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
60//
61// Received Messages
62// Received messages: This attribute counts the number of received Megaco messages on this
63// association, as defined by [ITUT H.341]. (R) (mandatory) (4-bytes)
64//
65// Received Octets
66// Received octets: This attribute counts the total number of octets received on this association,
67// as defined by [ITU-T H.341]. (R) (mandatory) (4-bytes)
68//
69// Sent Messages
70// Sent messages: This attribute counts the total number of Megaco messages sent over this
71// association, as defined by [ITU-T H.341]. (R) (mandatory) (4-bytes)
72//
73// Sent Octets
74// Sent octets: This attribute counts the total number of octets sent over this association, as
75// defined by [ITU-T H.341]. (R) (mandatory) (4-bytes)
76//
77// Protocol Errors
78// (R) (mandatory) (4-bytes)
79//
80// Transport Losses
81// Transport losses: This attribute counts the total number of transport losses (e.g., socket
82// problems) detected on this association. A link loss is defined as loss of communication with the
83// remote entity due to hardware/transient problems, or problems in related software. (R)
84// (mandatory) (4-bytes)
85//
86// Last Detected Event
87// (R) (mandatory) (1-byte)
88//
89// Last Detected Event Time
90// Last detected event time: This attribute reports the time in seconds since the last event on
91// this association was detected, as defined by [ITU-T H.341]. (R) (mandatory) (4-bytes)
92//
93// Last Detected Reset Time
94// Last detected reset time: This attribute reports the time in seconds since these statistics were
95// last reset, as defined by [ITU-T H.341]. Under normal circumstances, a get action on this
96// attribute would return 900-s to indicate a completed 15-min interval. (R) (mandatory) (4-bytes)
97//
98type MgcPerformanceMonitoringHistoryData struct {
99 ManagedEntityDefinition
100 Attributes AttributeValueMap
101}
102
103func init() {
104 mgcperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
105 Name: "MgcPerformanceMonitoringHistoryData",
106 ClassID: 156,
107 MessageTypes: mapset.NewSetWith(
108 Create,
109 Delete,
110 Get,
111 Set,
Chip Boling2d51f052021-02-09 09:04:15 -0600112 GetCurrentData,
Chip Boling6e27b352020-02-14 09:10:01 -0600113 ),
114 AllowedAttributeMask: 0xffe0,
115 AttributeDefinitions: AttributeDefinitionMap{
116 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
117 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
118 2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
119 3: Uint32Field("ReceivedMessages", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
120 4: Uint32Field("ReceivedOctets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
121 5: Uint32Field("SentMessages", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
122 6: Uint32Field("SentOctets", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
123 7: Uint32Field("ProtocolErrors", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
124 8: Uint32Field("TransportLosses", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
125 9: ByteField("LastDetectedEvent", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
126 10: Uint32Field("LastDetectedEventTime", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
127 11: Uint32Field("LastDetectedResetTime", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
128 },
129 Access: CreatedByOlt,
130 Support: UnknownSupport,
Chip Boling34ebcb62021-02-02 12:13:58 -0600131 Alarms: AlarmMap{
132 0: "MGCP protocol errors",
133 1: "MGCP transport losses",
134 },
Chip Boling6e27b352020-02-14 09:10:01 -0600135 }
136}
137
138// NewMgcPerformanceMonitoringHistoryData (class ID 156) creates the basic
139// Managed Entity definition that is used to validate an ME of this type that
140// is received from or transmitted to the OMCC.
141func NewMgcPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
142 return NewManagedEntity(*mgcperformancemonitoringhistorydataBME, params...)
143}