blob: 68805deefcf8e661652aadae7a49dd8d4d46ff9d [file] [log] [blame]
Takahiro Suzuki241c10e2020-12-17 20:17:57 +09001/*
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 = 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,
112 ),
113 AllowedAttributeMask: 0xffe0,
114 AttributeDefinitions: AttributeDefinitionMap{
115 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
116 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
117 2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
118 3: Uint32Field("ReceivedMessages", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
119 4: Uint32Field("ReceivedOctets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
120 5: Uint32Field("SentMessages", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
121 6: Uint32Field("SentOctets", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
122 7: Uint32Field("ProtocolErrors", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
123 8: Uint32Field("TransportLosses", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
124 9: ByteField("LastDetectedEvent", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
125 10: Uint32Field("LastDetectedEventTime", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
126 11: Uint32Field("LastDetectedResetTime", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
127 },
128 Access: CreatedByOlt,
129 Support: UnknownSupport,
130 }
131}
132
133// NewMgcPerformanceMonitoringHistoryData (class ID 156) creates the basic
134// Managed Entity definition that is used to validate an ME of this type that
135// is received from or transmitted to the OMCC.
136func NewMgcPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
137 return NewManagedEntity(*mgcperformancemonitoringhistorydataBME, params...)
138}