blob: ebb2f39e9babf88f8882ebd1e6fec24f2a165028 [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 */
David K. Bainbridgeadf422d2021-04-09 16:06:41 +000017/*
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// OnuDynamicPowerManagementControlClassID is the 16-bit ID for the OMCI
29// Managed entity ONU dynamic power management control
Chip Boling610117d2021-09-09 11:24:34 -050030const OnuDynamicPowerManagementControlClassID = ClassID(336) // 0x0150
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var onudynamicpowermanagementcontrolBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// OnuDynamicPowerManagementControl (Class ID: #336 / 0x0150)
Chip Boling6e27b352020-02-14 09:10:01 -060035// This ME models the ONU's ability to enter power conservation modes in cooperation with the OLT
36// in an ITU-T G.987 system. [ITUT G.987.3] originally specified two alternative modes, doze and
37// cyclic sleep. The subsequent revision of [ITUT G.987.3] simplified the specification providing a
38// single power conservation mode, watchful sleep.
39//
40// An ONU that supports power conservation modes automatically creates an instance of this ME.
41//
42// Relationships
43// One instance of this ME is associated with the ONU ME.
44//
45// Attributes
46// Managed Entity Id
Chip Boling610117d2021-09-09 11:24:34 -050047// This attribute uniquely identifies each instance of this ME. There is only one instance, number
48// 0. (R) (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060049//
50// Power Reduction Management Capability
Chip Boling610117d2021-09-09 11:24:34 -050051// This attribute declares the ONU's support for managed power conservation modes, as defined in
52// [ITUT G.987.3]. It is a bit map in which the bit value 0 indicates no support for the specified
53// mode, while the bit value 1 indicates that the ONU does support the specified mode. (R)
54// (mandatory) (1-byte)
55//
56// Codepoints are assigned as follows:
57//
58// Value Meaning
59//
60// 0 No support for power reduction
61//
62// 1 Doze mode supported
63//
64// 2 Cyclic sleep mode supported
65//
66// 3 Both doze and cyclic sleep modes supported
67//
68// 4 Watchful sleep mode supported
69//
Chip Boling6e27b352020-02-14 09:10:01 -060070// 5..255 Reserved
71//
72// Power Reduction Management Mode
Chip Boling610117d2021-09-09 11:24:34 -050073// This attribute enables one or more of the ONU's managed power conservation modes. It is a bit
74// map in which the bit value 0 disables the mode, while the value 1 enables the mode. Bit
75// assignments are the same as those of the power reduction management capability attribute. The
76// default value of each bit is 0. (R,-W) (mandatory) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -060077//
78// Itransinit
Chip Boling610117d2021-09-09 11:24:34 -050079// This attribute is the ONU vendor's statement of the complete transceiver initialization time:
80// the worst-case time required for the ONU to regain full functionality when leaving the asleep
81// state in cyclic sleep mode or low-power state in watchful sleep mode (i.e., turning on both the
82// receiver and the transmitter and acquiring synchronization to the downstream flow), measured in
83// units of 125-us frames. The value zero indicates that the sleeping ONU can respond to a
84// bandwidth grant without delay. (R) (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060085//
86// Itxinit
Chip Boling610117d2021-09-09 11:24:34 -050087// This attribute is the ONU vendor's statement of the transmitter initialization time: the time
88// required for the ONU to regain full functionality when leaving the listen state (i.e., turning
89// on the transmitter), measured in units of 125-us frames. The value zero indicates that the
90// dozing ONU can respond to a bandwidth grant without delay. If watchful sleep is enabled, the ONU
91// ignores this attribute. (R) (mandatory) (2 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060092//
93// Maximum Sleep Interval
Chip Boling610117d2021-09-09 11:24:34 -050094// The Isleep/Ilowpower attribute specifies the maximum time the ONU spends in its asleep, listen,
95// or low-power states, as a count of 125-us frames. Local or remote events may truncate the ONU's
96// sojourn in these states. The default value of this attribute is 0. (R,-W) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060097//
98// Maximum Receiver_Off Interval
99// Maximum receiver-off interval: The Irxoff attribute specifies the maximum time the OLT can
100// afford to wait from the moment it decides to wake up an ONU in the low-power state of the
101// watchful sleep mode until the ONU is fully operational, specified as a count of 125-us frames.
102// (R,-W) (mandatory) (4-bytes)
103//
104// Minimum Aware Interval
Chip Boling610117d2021-09-09 11:24:34 -0500105// The Iaware attribute specifies the time the ONU spends in its aware state, as a count of 125-us
106// frames, before it re-enters asleep or listen states. Local or remote events may independently
107// cause the ONU to enter an active state rather than returning to a sleep state. The default value
108// of this attribute is 0. (R,-W) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600109//
110// Minimum Active Held Interval
Chip Boling610117d2021-09-09 11:24:34 -0500111// The Ihold attribute specifies the minimum time during which the ONU remains in the active held
112// state, as a count of 125-us frames. Its initial value is zero. (R, W) (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600113//
114// Maximum Sleep Interval Extension
Chip Boling610117d2021-09-09 11:24:34 -0500115// Maximum sleep interval for doze mode specifies the maximum time the ONU spends in its listen
116// state, as a count of 125-us frames. Local or remote events may truncate the ONU's sojourn in
117// these states. The default value is 0.
118//
119// Maximum sleep interval for cyclic sleep mode specifies the maximum time the ONU spends in its
120// asleep state, as a count of 125-us frames. Local or remote events may truncate the ONU's sojourn
121// in these states. The default value is 0. If watchful sleep is enabled, the ONU ignores this
122// attribute.
123//
Chip Boling6e27b352020-02-14 09:10:01 -0600124// (R,-W) (optional) (8-bytes)
125//
Chip Boling610117d2021-09-09 11:24:34 -0500126// This attribute designates maximum sleep interval values for doze mode and cyclic sleep mode
127// separately. When it supports this attribute, the ONU ignores the value of the maximum sleep
128// interval attribute.
129//
130// Maximum sleep interval for doze mode 4-bytes
131//
132// Maximum sleep interval for cyclic sleep mode 4-bytes
133//
Chip Boling6e27b352020-02-14 09:10:01 -0600134// Ethernet Passive Optical Network Epon Capability Extension
Chip Boling610117d2021-09-09 11:24:34 -0500135// Ethernet passive optical network (EPON) capability extension: This attribute declares EPON-
136// specific capabilities for the dynamic power management control.
137//
138// Bits are assigned as follows.
Chip Boling6e27b352020-02-14 09:10:01 -0600139//
140// Epon Setup Extension
Chip Boling610117d2021-09-09 11:24:34 -0500141// The bits are assigned as follows.
142//
143// This attribute specifies EPON specific configurations for the dynamic power management control.
Chip Boling6e27b352020-02-14 09:10:01 -0600144//
145// Missing Consecutive Bursts Threshold
Chip Boling610117d2021-09-09 11:24:34 -0500146// The Clobi attribute specifies the maximum number of missing consecutive scheduled bursts from
147// the ONU that the OLT is willing to tolerate without raising an alarm. The value of this
148// attribute defaults to 4. (R,-W) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600149//
150type OnuDynamicPowerManagementControl struct {
151 ManagedEntityDefinition
152 Attributes AttributeValueMap
153}
154
155func init() {
156 onudynamicpowermanagementcontrolBME = &ManagedEntityDefinition{
157 Name: "OnuDynamicPowerManagementControl",
158 ClassID: 336,
159 MessageTypes: mapset.NewSetWith(
160 Get,
161 Set,
162 ),
163 AllowedAttributeMask: 0xfff0,
164 AttributeDefinitions: AttributeDefinitionMap{
165 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
166 1: ByteField("PowerReductionManagementCapability", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
167 2: ByteField("PowerReductionManagementMode", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
168 3: Uint16Field("Itransinit", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
169 4: Uint16Field("Itxinit", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
170 5: Uint32Field("MaximumSleepInterval", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
171 6: Uint32Field("MaximumReceiverOffInterval", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
172 7: Uint32Field("MinimumAwareInterval", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
173 8: Uint16Field("MinimumActiveHeldInterval", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8),
174 9: Uint64Field("MaximumSleepIntervalExtension", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
175 10: ByteField("EthernetPassiveOpticalNetworkEponCapabilityExtension", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
176 11: ByteField("EponSetupExtension", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
177 12: Uint32Field("MissingConsecutiveBurstsThreshold", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, false, false, 12),
178 },
179 Access: CreatedByOnu,
180 Support: UnknownSupport,
181 }
182}
183
184// NewOnuDynamicPowerManagementControl (class ID 336) creates the basic
185// Managed Entity definition that is used to validate an ME of this type that
186// is received from or transmitted to the OMCC.
187func NewOnuDynamicPowerManagementControl(params ...ParamData) (*ManagedEntity, OmciErrors) {
188 return NewManagedEntity(*onudynamicpowermanagementcontrolBME, params...)
189}