blob: eabe18919fa1c56af3a2b85b658da503d6ef9bfd [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Matteo Scandolof9d43412021-01-12 11:11:34 -08003 * Copyright 2020-present Open Networking Foundation
4
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07005 * 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
Matteo Scandolof9d43412021-01-12 11:11:34 -08008
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Matteo Scandolof9d43412021-01-12 11:11:34 -080010
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070011 * 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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080017 /*
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070018 * 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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080023
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070024package generated
25
26import "github.com/deckarep/golang-set"
27
Matteo Scandolof9d43412021-01-12 11:11:34 -080028// OnuDynamicPowerManagementControlClassID is the 16-bit ID for the OMCI
29// Managed entity ONU dynamic power management control
30const OnuDynamicPowerManagementControlClassID ClassID = ClassID(336)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
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
Matteo Scandolof9d43412021-01-12 11:11:34 -080048// one instance, number 0. (R) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070049//
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
Matteo Scandolof9d43412021-01-12 11:11:34 -080057// capability attribute. The default value of each bit is 0. (R,-W) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070058//
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
Matteo Scandolof9d43412021-01-12 11:11:34 -080064// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070066//
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.,
Matteo Scandolof9d43412021-01-12 11:11:34 -080070// turning on the transmitter), measured in units of 125-us frames. The value zero indicates that
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070071// 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
Matteo Scandolof9d43412021-01-12 11:11:34 -080076// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070079//
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
Matteo Scandolof9d43412021-01-12 11:11:34 -080083// watchful sleep mode until the ONU is fully operational, specified as a count of 125-us frames.
84// (R,-W) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070085//
86// Minimum Aware Interval
87// Minimum aware interval: The Iaware attribute specifies the time the ONU spends in its aware
Matteo Scandolof9d43412021-01-12 11:11:34 -080088// state, as a count of 125-us frames, before it re-enters asleep or listen states. Local or remote
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070089// events may independently cause the ONU to enter an active state rather than returning to a sleep
Matteo Scandolof9d43412021-01-12 11:11:34 -080090// state. The default value of this attribute is 0. (R,-W) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070091//
92// Minimum Active Held Interval
93// Minimum active held interval: The Ihold attribute specifies the minimum time during which the
Matteo Scandolof9d43412021-01-12 11:11:34 -080094// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070096//
97// Maximum Sleep Interval Extension
Matteo Scandolof9d43412021-01-12 11:11:34 -080098// (R,-W) (optional) (8-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070099//
100// Ethernet Passive Optical Network Epon Capability Extension
Matteo Scandolof9d43412021-01-12 11:11:34 -0800101// - Configurations: ackEnable configuration = enable, Sleep indication configuration = disable,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700102// Early wake-up configuration = enable
103//
104// Epon Setup Extension
Matteo Scandolof9d43412021-01-12 11:11:34 -0800105// (R,-W) (optional) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700106//
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
Matteo Scandolof9d43412021-01-12 11:11:34 -0800110// raising an alarm. The value of this attribute defaults to 4. (R,-W) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700111//
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 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800125 AllowedAttributeMask: 0xfff0,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700126 AttributeDefinitions: AttributeDefinitionMap{
Matteo Scandolof9d43412021-01-12 11:11:34 -0800127 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),
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700140 },
Matteo Scandolof9d43412021-01-12 11:11:34 -0800141 Access: CreatedByOnu,
142 Support: UnknownSupport,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700143 }
144}
145
Matteo Scandolof9d43412021-01-12 11:11:34 -0800146// NewOnuDynamicPowerManagementControl (class ID 336) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700147// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800148// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700149func NewOnuDynamicPowerManagementControl(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800150 return NewManagedEntity(*onudynamicpowermanagementcontrolBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700151}