blob: 41b3aa14a6e21c77f627dc76b67bc335ee492262 [file] [log] [blame]
Chip Boling610117d2021-09-09 11:24:34 -05001/*
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// MocaInterfacePerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
29// Managed entity MoCA interface performance monitoring history data
30const MocaInterfacePerformanceMonitoringHistoryDataClassID = ClassID(164) // 0x00a4
31
32var mocainterfaceperformancemonitoringhistorydataBME *ManagedEntityDefinition
33
34// MocaInterfacePerformanceMonitoringHistoryData (Class ID: #164 / 0x00a4)
35// This ME collects PM data for an MoCA interface. Instances of this ME are created and deleted by
36// the OLT.
37//
38// NOTE - The structure of this ME is an exception to the normal definition of PM MEs and normal PM
39// behaviour (clause I.4). It should not be used as a guide for the definition of future MEs. Among
40// other exceptions, this ME contains only current values, which are retrievable by get and get
41// next operations; no history is retained.
42//
43// Relationships
44// An instance of this ME is associated with an instance of the PPTP MoCA UNI ME.
45//
46// Attributes
47// Managed Entity Id
48// This attribute uniquely identifies each instance of this ME. Through an identical ID, this ME is
49// implicitly linked to an instance of the PPTP MoCA UNI. (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// Phy T X Broadcast Rate
60// PHY Tx broadcast rate: This attribute indicates the MoCA PHY broadcast transmit rate from the
61// ONU MoCA interface to all the nodes in bits per second. (R) (optional) (4-bytes)
62//
63// Node Table
64// Rx packet: Number of packets received from the node. (4-bytes)
65//
66// Rx errored and missed: Number of errored and missed packets received from the node. The sum of
67// this field across all entries in the node table contributes to the Rx errored and missed TCA.
68// This field is reset to 0 on 15-min boundaries. (4-bytes)
69//
70// Rx errored: Number of errored packets received from the node. The sum of this field across all
71// entries in the node table contributes to the Rx errored TCA. This field is reset to 0 on 15-min
72// boundaries. (optional) (4-bytes)
73//
74// (R) (mandatory) (37 * N bytes, where N is the number of nodes in the node table)
75//
76// This attribute lists current nodes in the node table. The table contains MAC addresses and
77// statistics for those nodes. These table attributes are further described in the following. Space
78// for nonsupported optional fields must be allocated in table records, and filled with zero bytes.
79//
80// MAC address: A unique identifier of a node within the table. (6-bytes)
81//
82// PHY Tx rate: MoCA PHY unicast transmit rate from the ONU MoCA interface to the node identified
83// by the MAC address, in bits per second. (4-bytes)
84//
85// Tx power control reduction: The reduction in transmitter level due to power control, in
86// decibels. Valid values range from 0 (full power) to 60. (1-byte)
87//
88// PHY Rx rate: MoCA PHY unicast receive rate to the ONU MoCA interface from the node identified by
89// the MAC address, in bits per second. (optional) (4-bytes)
90//
91// Rx power level: The power level received at the ONU MoCA interface from the node identified by
92// the MAC address, in decibel-milliwatts, represented as a 2s complement integer. Valid values
93// range from +10 (0x0A) to -80 (0xB0). (1-byte)
94//
95// PHY Rx broadcast rate: MoCA PHY broadcast receive rate to the ONU MoCA interface from the node
96// identified by MAC address, in bits per second. (optional) (4-bytes)
97//
98// Rx broadcast power level: The power level received at the ONU MoCA interface from the node
99// identified by the MAC address, in decibel-milliwatts, represented as a 2s complement integer.
100// Valid values range from +10-(0x0A) to -80 (0xB0). (1-byte)
101//
102// Tx packet: Number of packets transmitted to the node. (4-bytes)
103//
104type MocaInterfacePerformanceMonitoringHistoryData struct {
105 ManagedEntityDefinition
106 Attributes AttributeValueMap
107}
108
109func init() {
110 mocainterfaceperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
111 Name: "MocaInterfacePerformanceMonitoringHistoryData",
112 ClassID: 164,
113 MessageTypes: mapset.NewSetWith(
114 Create,
115 Delete,
116 Get,
117 GetNext,
118 Set,
119 ),
120 AllowedAttributeMask: 0xf000,
121 AttributeDefinitions: AttributeDefinitionMap{
122 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
123 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
124 2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
125 3: Uint32Field("PhyTXBroadcastRate", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, true, false, 3),
126 4: TableField("NodeTable", TableAttributeType, 0x1000, TableInfo{nil, 37}, mapset.NewSetWith(Read), false, false, false, 4),
127 },
128 Access: CreatedByOlt,
129 Support: UnknownSupport,
130 Alarms: AlarmMap{
131 0: "Total rx errored and missed",
132 1: "Total rx errored",
133 },
134 }
135}
136
137// NewMocaInterfacePerformanceMonitoringHistoryData (class ID 164) creates the basic
138// Managed Entity definition that is used to validate an ME of this type that
139// is received from or transmitted to the OMCC.
140func NewMocaInterfacePerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
141 return NewManagedEntity(*mocainterfaceperformancemonitoringhistorydataBME, params...)
142}