blob: 082de7430d7b8ad350a869f4af97d489daf23277 [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
Chip Boling610117d2021-09-09 11:24:34 -050030const MgcPerformanceMonitoringHistoryDataClassID = ClassID(156) // 0x009c
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var mgcperformancemonitoringhistorydataBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// MgcPerformanceMonitoringHistoryData (Class ID: #156 / 0x009c)
Chip Boling6e27b352020-02-14 09:10:01 -060035// 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
Chip Boling610117d2021-09-09 11:24:34 -050046// 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)
Chip Boling6e27b352020-02-14 09:10:01 -060050//
51// Interval End Time
Chip Boling610117d2021-09-09 11:24:34 -050052// This attribute identifies the most recently finished 15-min interval. (R) (mandatory) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -060053//
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
Chip Boling610117d2021-09-09 11:24:34 -050060// This attribute counts the number of received Megaco messages on this association, as defined by
61// [ITUT H.341]. (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060062//
63// Received Octets
Chip Boling610117d2021-09-09 11:24:34 -050064// This attribute counts the total number of octets received on this association, as defined by
65// [ITU-T H.341]. (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060066//
67// Sent Messages
Chip Boling610117d2021-09-09 11:24:34 -050068// 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)
Chip Boling6e27b352020-02-14 09:10:01 -060070//
71// Sent Octets
Chip Boling610117d2021-09-09 11:24:34 -050072// This attribute counts the total number of octets sent over this association, as defined by
73// [ITU-T H.341]. (R) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060074//
75// Protocol Errors
Chip Boling610117d2021-09-09 11:24:34 -050076// 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//
Chip Boling6e27b352020-02-14 09:10:01 -060083// (R) (mandatory) (4-bytes)
84//
85// Transport Losses
Chip Boling610117d2021-09-09 11:24:34 -050086// 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)
Chip Boling6e27b352020-02-14 09:10:01 -060089//
90// Last Detected Event
Chip Boling610117d2021-09-09 11:24:34 -050091// 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//
Chip Boling6e27b352020-02-14 09:10:01 -0600110// (R) (mandatory) (1-byte)
111//
112// Last Detected Event Time
Chip Boling610117d2021-09-09 11:24:34 -0500113// 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)
Chip Boling6e27b352020-02-14 09:10:01 -0600115//
116// Last Detected Reset Time
Chip Boling610117d2021-09-09 11:24:34 -0500117// 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)
Chip Boling6e27b352020-02-14 09:10:01 -0600120//
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,
Chip Boling2d51f052021-02-09 09:04:15 -0600135 GetCurrentData,
Chip Boling6e27b352020-02-14 09:10:01 -0600136 ),
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,
Chip Boling34ebcb62021-02-02 12:13:58 -0600154 Alarms: AlarmMap{
155 0: "MGCP protocol errors",
156 1: "MGCP transport losses",
157 },
Chip Boling6e27b352020-02-14 09:10:01 -0600158 }
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}