blob: 7a4e4576eecc1d6a0899bb5ebe24301f43b0a310 [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Matteo Scandolof9d43412021-01-12 11:11:34 -08003 * Copyright 2020-present Open Networking Foundation
4
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07005 * 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
Matteo Scandolof9d43412021-01-12 11:11:34 -08008
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Matteo Scandolof9d43412021-01-12 11:11:34 -080010
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070011 * 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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080023
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070024package generated
25
26import "github.com/deckarep/golang-set"
27
Matteo Scandolof9d43412021-01-12 11:11:34 -080028// MgcPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
29// Managed entity MGC performance monitoring history data
30const MgcPerformanceMonitoringHistoryDataClassID ClassID = ClassID(156)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
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,
Matteo Scandolof9d43412021-01-12 11:11:34 -080050// setbycreate) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070051//
52// Interval End Time
Matteo Scandolof9d43412021-01-12 11:11:34 -080053// Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
54// (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070055//
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
Matteo Scandolof9d43412021-01-12 11:11:34 -080059// data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070060//
61// Received Messages
62// Received messages: This attribute counts the number of received Megaco messages on this
Matteo Scandolof9d43412021-01-12 11:11:34 -080063// association, as defined by [ITUT H.341]. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070064//
65// Received Octets
66// Received octets: This attribute counts the total number of octets received on this association,
Matteo Scandolof9d43412021-01-12 11:11:34 -080067// as defined by [ITU-T H.341]. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070068//
69// Sent Messages
70// Sent messages: This attribute counts the total number of Megaco messages sent over this
Matteo Scandolof9d43412021-01-12 11:11:34 -080071// association, as defined by [ITU-T H.341]. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070072//
73// Sent Octets
74// Sent octets: This attribute counts the total number of octets sent over this association, as
Matteo Scandolof9d43412021-01-12 11:11:34 -080075// defined by [ITU-T H.341]. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070076//
77// Protocol Errors
Matteo Scandolof9d43412021-01-12 11:11:34 -080078// (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070079//
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)
Matteo Scandolof9d43412021-01-12 11:11:34 -080084// (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070085//
86// Last Detected Event
Matteo Scandolof9d43412021-01-12 11:11:34 -080087// (R) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070088//
89// Last Detected Event Time
90// Last detected event time: This attribute reports the time in seconds since the last event on
Matteo Scandolof9d43412021-01-12 11:11:34 -080091// this association was detected, as defined by [ITU-T H.341]. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070092//
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
Matteo Scandolof9d43412021-01-12 11:11:34 -080096// attribute would return 900-s to indicate a completed 15-min interval. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070097//
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,
Girish Gowdrae2683102021-03-05 08:24:26 -0800112 GetCurrentData,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700113 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800114 AllowedAttributeMask: 0xffe0,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700115 AttributeDefinitions: AttributeDefinitionMap{
Matteo Scandolof9d43412021-01-12 11:11:34 -0800116 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,
131 Alarms: AlarmMap{
132 0: "MGCP protocol errors",
133 1: "MGCP transport losses",
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700134 },
135 }
136}
137
Matteo Scandolof9d43412021-01-12 11:11:34 -0800138// NewMgcPerformanceMonitoringHistoryData (class ID 156) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700139// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800140// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700141func NewMgcPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800142 return NewManagedEntity(*mgcperformancemonitoringhistorydataBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700143}