blob: b500734a53dda7aa3ffc5bb6de031652d2b6b2f1 [file] [log] [blame]
Andrea Campanella10426e22021-10-15 17:58:04 +02001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Elia Battiston9bfe1102022-02-03 10:38:03 +01004 *
Andrea Campanella10426e22021-10-15 17:58:04 +02005 * 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
Elia Battiston9bfe1102022-02-03 10:38:03 +01008 *
Andrea Campanella10426e22021-10-15 17:58:04 +02009 * http://www.apache.org/licenses/LICENSE-2.0
Elia Battiston9bfe1102022-02-03 10:38:03 +010010 *
Andrea Campanella10426e22021-10-15 17:58:04 +020011 * 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 */
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(156) // 0x009c
31
32var mgcperformancemonitoringhistorydataBME *ManagedEntityDefinition
33
34// MgcPerformanceMonitoringHistoryData (Class ID: #156 / 0x009c)
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// This attribute uniquely identifies each instance of this ME. Through an identical ID, this ME is
47// implicitly linked to an instance of the associated MGC config data or to the MGC config portal
48// ME. If a non-OMCI configuration method is used for VoIP, there can be only one live ME instance,
49// associated with the MGC config portal, and with ME ID 0. (R, setbycreate) (mandatory) (2-bytes)
50//
51// Interval End Time
52// This attribute identifies the most recently finished 15-min interval. (R) (mandatory) (1-byte)
53//
54// Threshold Data 1_2 Id
55// Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
56// contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
57// data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
58//
59// Received Messages
60// This attribute counts the number of received Megaco messages on this association, as defined by
61// [ITUT H.341]. (R) (mandatory) (4-bytes)
62//
63// Received Octets
64// This attribute counts the total number of octets received on this association, as defined by
65// [ITU-T H.341]. (R) (mandatory) (4-bytes)
66//
67// Sent Messages
68// This attribute counts the total number of Megaco messages sent over this association, as defined
69// by [ITU-T H.341]. (R) (mandatory) (4-bytes)
70//
71// Sent Octets
72// This attribute counts the total number of octets sent over this association, as defined by
73// [ITU-T H.341]. (R) (mandatory) (4-bytes)
74//
75// Protocol Errors
76// This attribute counts the total number of errors detected on this association, as defined by
77// [ITU-T H.341]. This includes:
78//
79// o syntax errors detected in a given received message;
80//
81// o outgoing transactions that failed for protocol reasons.
82//
83// (R) (mandatory) (4-bytes)
84//
85// Transport Losses
86// This attribute counts the total number of transport losses (e.g., socket problems) detected on
87// this association. A link loss is defined as loss of communication with the remote entity due to
88// hardware/transient problems, or problems in related software. (R) (mandatory) (4-bytes)
89//
90// Last Detected Event
91// This attribute reports the last event detected on this association. This includes events such as
92// the link failing or being set up. Under normal circumstances, a get action on this attribute
93// would return 0 to indicate no abnormal activity. This field is an enumeration as follows.
94//
95// 0 No event - No event has yet been detected during this PM interval.
96//
97// 1 Link up - The transport link underpinning the association came up.
98//
99// 2 Link down - The transport link underpinning the association went down.
100//
101// 3 Persistent error - A persistent error was detected on the link (such as the socket/TCP
102// connection to the remote node could not be set up).
103//
104// 4 Local shutdown - The association was brought down intentionally by the local application.
105//
106// 5 Failover down - The association was brought down as part of failover processing.
107//
108// 255 Other event - The latest event does not match any in the list.
109//
110// (R) (mandatory) (1-byte)
111//
112// Last Detected Event Time
113// This attribute reports the time in seconds since the last event on this association was
114// detected, as defined by [ITU-T H.341]. (R) (mandatory) (4-bytes)
115//
116// Last Detected Reset Time
117// This attribute reports the time in seconds since these statistics were last reset, as defined by
118// [ITU-T H.341]. Under normal circumstances, a get action on this attribute would return 900-s to
119// indicate a completed 15-min interval. (R) (mandatory) (4-bytes)
120//
121type MgcPerformanceMonitoringHistoryData struct {
122 ManagedEntityDefinition
123 Attributes AttributeValueMap
124}
125
Elia Battiston9bfe1102022-02-03 10:38:03 +0100126// Attribute name constants
127
128const MgcPerformanceMonitoringHistoryData_IntervalEndTime = "IntervalEndTime"
129const MgcPerformanceMonitoringHistoryData_ThresholdData12Id = "ThresholdData12Id"
130const MgcPerformanceMonitoringHistoryData_ReceivedMessages = "ReceivedMessages"
131const MgcPerformanceMonitoringHistoryData_ReceivedOctets = "ReceivedOctets"
132const MgcPerformanceMonitoringHistoryData_SentMessages = "SentMessages"
133const MgcPerformanceMonitoringHistoryData_SentOctets = "SentOctets"
134const MgcPerformanceMonitoringHistoryData_ProtocolErrors = "ProtocolErrors"
135const MgcPerformanceMonitoringHistoryData_TransportLosses = "TransportLosses"
136const MgcPerformanceMonitoringHistoryData_LastDetectedEvent = "LastDetectedEvent"
137const MgcPerformanceMonitoringHistoryData_LastDetectedEventTime = "LastDetectedEventTime"
138const MgcPerformanceMonitoringHistoryData_LastDetectedResetTime = "LastDetectedResetTime"
139
Andrea Campanella10426e22021-10-15 17:58:04 +0200140func init() {
141 mgcperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
142 Name: "MgcPerformanceMonitoringHistoryData",
Elia Battiston9bfe1102022-02-03 10:38:03 +0100143 ClassID: MgcPerformanceMonitoringHistoryDataClassID,
Andrea Campanella10426e22021-10-15 17:58:04 +0200144 MessageTypes: mapset.NewSetWith(
145 Create,
146 Delete,
147 Get,
148 Set,
149 GetCurrentData,
150 ),
151 AllowedAttributeMask: 0xffe0,
152 AttributeDefinitions: AttributeDefinitionMap{
Elia Battiston9bfe1102022-02-03 10:38:03 +0100153 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
154 1: ByteField(MgcPerformanceMonitoringHistoryData_IntervalEndTime, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
155 2: Uint16Field(MgcPerformanceMonitoringHistoryData_ThresholdData12Id, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
156 3: Uint32Field(MgcPerformanceMonitoringHistoryData_ReceivedMessages, CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
157 4: Uint32Field(MgcPerformanceMonitoringHistoryData_ReceivedOctets, CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
158 5: Uint32Field(MgcPerformanceMonitoringHistoryData_SentMessages, CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
159 6: Uint32Field(MgcPerformanceMonitoringHistoryData_SentOctets, CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
160 7: Uint32Field(MgcPerformanceMonitoringHistoryData_ProtocolErrors, CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
161 8: Uint32Field(MgcPerformanceMonitoringHistoryData_TransportLosses, CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
162 9: ByteField(MgcPerformanceMonitoringHistoryData_LastDetectedEvent, CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
163 10: Uint32Field(MgcPerformanceMonitoringHistoryData_LastDetectedEventTime, CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
164 11: Uint32Field(MgcPerformanceMonitoringHistoryData_LastDetectedResetTime, CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
Andrea Campanella10426e22021-10-15 17:58:04 +0200165 },
166 Access: CreatedByOlt,
167 Support: UnknownSupport,
168 Alarms: AlarmMap{
169 0: "MGCP protocol errors",
170 1: "MGCP transport losses",
171 },
172 }
173}
174
175// NewMgcPerformanceMonitoringHistoryData (class ID 156) creates the basic
176// Managed Entity definition that is used to validate an ME of this type that
177// is received from or transmitted to the OMCC.
178func NewMgcPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
179 return NewManagedEntity(*mgcperformancemonitoringhistorydataBME, params...)
180}