blob: 3ac89cec4f6d2a9e8ab6df2f8ee709d5dea2d081 [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
8 * Unless required by applicable law or agreed to in writing, software
9 * distributed under the License is distributed on an "AS IS" BASIS,
10 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 * See the License for the specific language governing permissions and
12 * limitations under the License.
13 */
14/*
15 * NOTE: This file was generated, manual edits will be overwritten!
16 *
17 * Generated by 'goCodeGenerator.py':
18 * https://github.com/cboling/OMCI-parser/README.md
19 */
20
21package generated
22
23import "github.com/deckarep/golang-set"
24
25// OnuDynamicPowerManagementControlClassID is the 16-bit ID for the OMCI
26// Managed entity ONU dynamic power management control
27const OnuDynamicPowerManagementControlClassID ClassID = ClassID(336)
28
29var onudynamicpowermanagementcontrolBME *ManagedEntityDefinition
30
31// OnuDynamicPowerManagementControl (class ID #336)
32// This ME models the ONU's ability to enter power conservation modes in cooperation with the OLT
33// in an ITU-T G.987 system. [ITUT G.987.3] originally specified two alternative modes, doze and
34// cyclic sleep. The subsequent revision of [ITUT G.987.3] simplified the specification providing a
35// single power conservation mode, watchful sleep.
36//
37// An ONU that supports power conservation modes automatically creates an instance of this ME.
38//
39// Relationships
40// One instance of this ME is associated with the ONU ME.
41//
42// Attributes
43// Managed Entity Id
44// Managed entity ID: This attribute uniquely identifies each instance of this ME. There is only
45// one instance, number 0. (R) (mandatory) (2-bytes)
46//
47// Power Reduction Management Capability
48// 5..255 Reserved
49//
50// Power Reduction Management Mode
51// Power reduction management mode: This attribute enables one or more of the ONU's managed power
52// conservation modes. It is a bit map in which the bit value 0 disables the mode, while the value
53// 1 enables the mode. Bit assignments are the same as those of the power reduction management
54// capability attribute. The default value of each bit is 0. (R,-W) (mandatory) (1-byte)
55//
56// Itransinit
57// Itransinit: This attribute is the ONU vendor's statement of the complete transceiver
58// initialization time: the worst-case time required for the ONU to regain full functionality when
59// leaving the asleep state in cyclic sleep mode or low-power state in watchful sleep mode (i.e.,
60// turning on both the receiver and the transmitter and acquiring synchronization to the downstream
61// flow), measured in units of 125-us frames. The value zero indicates that the sleeping ONU can
62// respond to a bandwidth grant without delay. (R) (mandatory) (2-bytes)
63//
64// Itxinit
65// Itxinit: This attribute is the ONU vendor's statement of the transmitter initialization time:
66// the time required for the ONU to regain full functionality when leaving the listen state (i.e.,
67// turning on the transmitter), measured in units of 125-us frames. The value zero indicates that
68// the dozing ONU can respond to a bandwidth grant without delay. If watchful sleep is enabled, the
69// ONU ignores this attribute. (R) (mandatory) (2 bytes)
70//
71// Maximum Sleep Interval
72// Maximum sleep interval: The Isleep/Ilowpower attribute specifies the maximum time the ONU spends
73// in its asleep, listen, or low-power states, as a count of 125-us frames. Local or remote events
74// may truncate the ONU's sojourn in these states. The default value of this attribute is 0. (R,-W)
75// (mandatory) (4-bytes)
76//
77// Maximum Receiver_Off Interval
78// Maximum receiver-off interval: The Irxoff attribute specifies the maximum time the OLT can
79// afford to wait from the moment it decides to wake up an ONU in the low-power state of the
80// watchful sleep mode until the ONU is fully operational, specified as a count of 125-us frames.
81// (R,-W) (mandatory) (4-bytes)
82//
83// Minimum Aware Interval
84// Minimum aware interval: The Iaware attribute specifies the time the ONU spends in its aware
85// state, as a count of 125-us frames, before it re-enters asleep or listen states. Local or remote
86// events may independently cause the ONU to enter an active state rather than returning to a sleep
87// state. The default value of this attribute is 0. (R,-W) (mandatory) (4-bytes)
88//
89// Minimum Active Held Interval
90// Minimum active held interval: The Ihold attribute specifies the minimum time during which the
91// ONU remains in the active held state, as a count of 125-us frames. Its initial value is zero.
92// (R, W) (mandatory) (2-bytes)
93//
94// Maximum Sleep Interval Extension
95// (R,-W) (optional) (8-bytes)
96//
97// Ethernet Passive Optical Network Epon Capability Extension
98// - Configurations: ackEnable configuration = enable, Sleep indication configuration = disable,
99// Early wake-up configuration = enable
100//
101// Epon Setup Extension
102// (R,-W) (optional) (1-byte)
103//
104// Missing Consecutive Bursts Threshold
105// Missing consecutive bursts threshold: The Clobi attribute specifies the maximum number of
106// missing consecutive scheduled bursts from the ONU that the OLT is willing to tolerate without
107// raising an alarm. The value of this attribute defaults to 4. (R,-W) (mandatory) (4-bytes)
108//
109type OnuDynamicPowerManagementControl struct {
110 ManagedEntityDefinition
111 Attributes AttributeValueMap
112}
113
114func init() {
115 onudynamicpowermanagementcontrolBME = &ManagedEntityDefinition{
116 Name: "OnuDynamicPowerManagementControl",
117 ClassID: 336,
118 MessageTypes: mapset.NewSetWith(
119 Get,
120 Set,
121 ),
122 AllowedAttributeMask: 0xfff0,
123 AttributeDefinitions: AttributeDefinitionMap{
124 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
125 1: ByteField("PowerReductionManagementCapability", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
126 2: ByteField("PowerReductionManagementMode", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
127 3: Uint16Field("Itransinit", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
128 4: Uint16Field("Itxinit", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
129 5: Uint32Field("MaximumSleepInterval", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
130 6: Uint32Field("MaximumReceiverOffInterval", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
131 7: Uint32Field("MinimumAwareInterval", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
132 8: Uint16Field("MinimumActiveHeldInterval", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8),
133 9: Uint64Field("MaximumSleepIntervalExtension", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
134 10: ByteField("EthernetPassiveOpticalNetworkEponCapabilityExtension", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
135 11: ByteField("EponSetupExtension", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
136 12: Uint32Field("MissingConsecutiveBurstsThreshold", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, false, false, 12),
137 },
138 Access: CreatedByOnu,
139 Support: UnknownSupport,
140 }
141}
142
143// NewOnuDynamicPowerManagementControl (class ID 336) creates the basic
144// Managed Entity definition that is used to validate an ME of this type that
145// is received from or transmitted to the OMCC.
146func NewOnuDynamicPowerManagementControl(params ...ParamData) (*ManagedEntity, OmciErrors) {
147 return NewManagedEntity(*onudynamicpowermanagementcontrolBME, params...)
148}