blob: da0180fa67a7ac3a860a40b287a880c6264f4d2a [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
30const OnuDynamicPowerManagementControlClassID ClassID = ClassID(336)
31
32var onudynamicpowermanagementcontrolBME *ManagedEntityDefinition
33
34// OnuDynamicPowerManagementControl (class ID #336)
35// 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
47// Managed entity ID: This attribute uniquely identifies each instance of this ME. There is only
48// one instance, number 0. (R) (mandatory) (2-bytes)
49//
50// Power Reduction Management Capability
51// 5..255 Reserved
52//
53// Power Reduction Management Mode
54// Power reduction management mode: This attribute enables one or more of the ONU's managed power
55// conservation modes. It is a bit map in which the bit value 0 disables the mode, while the value
56// 1 enables the mode. Bit assignments are the same as those of the power reduction management
57// capability attribute. The default value of each bit is 0. (R,-W) (mandatory) (1-byte)
58//
59// Itransinit
60// Itransinit: This attribute is the ONU vendor's statement of the complete transceiver
61// initialization time: the worst-case time required for the ONU to regain full functionality when
62// leaving the asleep state in cyclic sleep mode or low-power state in watchful sleep mode (i.e.,
63// turning on both the receiver and the transmitter and acquiring synchronization to the downstream
64// flow), measured in units of 125-us frames. The value zero indicates that the sleeping ONU can
65// respond to a bandwidth grant without delay. (R) (mandatory) (2-bytes)
66//
67// Itxinit
68// Itxinit: This attribute is the ONU vendor's statement of the transmitter initialization time:
69// the time required for the ONU to regain full functionality when leaving the listen state (i.e.,
70// turning on the transmitter), measured in units of 125-us frames. The value zero indicates that
71// the dozing ONU can respond to a bandwidth grant without delay. If watchful sleep is enabled, the
72// ONU ignores this attribute. (R) (mandatory) (2 bytes)
73//
74// Maximum Sleep Interval
75// Maximum sleep interval: The Isleep/Ilowpower attribute specifies the maximum time the ONU spends
76// in its asleep, listen, or low-power states, as a count of 125-us frames. Local or remote events
77// may truncate the ONU's sojourn in these states. The default value of this attribute is 0. (R,-W)
78// (mandatory) (4-bytes)
79//
80// Maximum Receiver_Off Interval
81// Maximum receiver-off interval: The Irxoff attribute specifies the maximum time the OLT can
82// afford to wait from the moment it decides to wake up an ONU in the low-power state of the
83// watchful sleep mode until the ONU is fully operational, specified as a count of 125-us frames.
84// (R,-W) (mandatory) (4-bytes)
85//
86// Minimum Aware Interval
87// Minimum aware interval: The Iaware attribute specifies the time the ONU spends in its aware
88// state, as a count of 125-us frames, before it re-enters asleep or listen states. Local or remote
89// events may independently cause the ONU to enter an active state rather than returning to a sleep
90// state. The default value of this attribute is 0. (R,-W) (mandatory) (4-bytes)
91//
92// Minimum Active Held Interval
93// Minimum active held interval: The Ihold attribute specifies the minimum time during which the
94// ONU remains in the active held state, as a count of 125-us frames. Its initial value is zero.
95// (R, W) (mandatory) (2-bytes)
96//
97// Maximum Sleep Interval Extension
98// (R,-W) (optional) (8-bytes)
99//
100// Ethernet Passive Optical Network Epon Capability Extension
101// - Configurations: ackEnable configuration = enable, Sleep indication configuration = disable,
102// Early wake-up configuration = enable
103//
104// Epon Setup Extension
105// (R,-W) (optional) (1-byte)
106//
107// Missing Consecutive Bursts Threshold
108// Missing consecutive bursts threshold: The Clobi attribute specifies the maximum number of
109// missing consecutive scheduled bursts from the ONU that the OLT is willing to tolerate without
110// raising an alarm. The value of this attribute defaults to 4. (R,-W) (mandatory) (4-bytes)
111//
112type OnuDynamicPowerManagementControl struct {
113 ManagedEntityDefinition
114 Attributes AttributeValueMap
115}
116
117func init() {
118 onudynamicpowermanagementcontrolBME = &ManagedEntityDefinition{
119 Name: "OnuDynamicPowerManagementControl",
120 ClassID: 336,
121 MessageTypes: mapset.NewSetWith(
122 Get,
123 Set,
124 ),
125 AllowedAttributeMask: 0xfff0,
126 AttributeDefinitions: AttributeDefinitionMap{
127 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
128 1: ByteField("PowerReductionManagementCapability", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
129 2: ByteField("PowerReductionManagementMode", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
130 3: Uint16Field("Itransinit", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
131 4: Uint16Field("Itxinit", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
132 5: Uint32Field("MaximumSleepInterval", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
133 6: Uint32Field("MaximumReceiverOffInterval", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
134 7: Uint32Field("MinimumAwareInterval", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
135 8: Uint16Field("MinimumActiveHeldInterval", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8),
136 9: Uint64Field("MaximumSleepIntervalExtension", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
137 10: ByteField("EthernetPassiveOpticalNetworkEponCapabilityExtension", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
138 11: ByteField("EponSetupExtension", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
139 12: Uint32Field("MissingConsecutiveBurstsThreshold", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, false, false, 12),
140 },
141 Access: CreatedByOnu,
142 Support: UnknownSupport,
143 }
144}
145
146// NewOnuDynamicPowerManagementControl (class ID 336) creates the basic
147// Managed Entity definition that is used to validate an ME of this type that
148// is received from or transmitted to the OMCC.
149func NewOnuDynamicPowerManagementControl(params ...ParamData) (*ManagedEntity, OmciErrors) {
150 return NewManagedEntity(*onudynamicpowermanagementcontrolBME, params...)
151}