blob: 082de7430d7b8ad350a869f4af97d489daf23277 [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
4
5 * 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
8
9 * http://www.apache.org/licenses/LICENSE-2.0
10
11 * 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
126func init() {
127 mgcperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
128 Name: "MgcPerformanceMonitoringHistoryData",
129 ClassID: 156,
130 MessageTypes: mapset.NewSetWith(
131 Create,
132 Delete,
133 Get,
134 Set,
135 GetCurrentData,
136 ),
137 AllowedAttributeMask: 0xffe0,
138 AttributeDefinitions: AttributeDefinitionMap{
139 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
140 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
141 2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
142 3: Uint32Field("ReceivedMessages", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
143 4: Uint32Field("ReceivedOctets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
144 5: Uint32Field("SentMessages", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
145 6: Uint32Field("SentOctets", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
146 7: Uint32Field("ProtocolErrors", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
147 8: Uint32Field("TransportLosses", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
148 9: ByteField("LastDetectedEvent", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
149 10: Uint32Field("LastDetectedEventTime", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
150 11: Uint32Field("LastDetectedResetTime", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
151 },
152 Access: CreatedByOlt,
153 Support: UnknownSupport,
154 Alarms: AlarmMap{
155 0: "MGCP protocol errors",
156 1: "MGCP transport losses",
157 },
158 }
159}
160
161// NewMgcPerformanceMonitoringHistoryData (class ID 156) creates the basic
162// Managed Entity definition that is used to validate an ME of this type that
163// is received from or transmitted to the OMCC.
164func NewMgcPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
165 return NewManagedEntity(*mgcperformancemonitoringhistorydataBME, params...)
166}