blob: 62be2557bf31b44d7caa74b1a3001c37dc46e7b1 [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
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 */
20package generated
21
22import "github.com/deckarep/golang-set"
23
24const OnuPowerSheddingClassId ClassID = ClassID(133)
25
26var onupowersheddingBME *ManagedEntityDefinition
27
28// OnuPowerShedding (class ID #133)
29// This ME models the ONU's ability to shed services when the ONU goes into battery operation mode
30// after AC power failure. Shedding classes are defined in the following table, which may span
31// multiple circuit pack types. This feature works in conjunction with the power shed override
32// attribute of the circuit pack ME, which can selectively prevent power shedding of priority
33// ports.
34//
35// An ONU that supports power shedding automatically creates an instance of this ME.
36//
37// The following table defines the binding of shedding class and PPTP type. The coding is taken
38// from Table 9.1.5-1. In the case of hybrid circuit pack types, multiple shedding classes may
39// affect a circuit pack if the hardware is capable of partial power shedding.
40//
41// An ONU may choose to model its ports with the port-mapping package of clause 9.1.8, rather than
42// with real or virtual circuit packs. In this case, power shedding pertains to individual PPTPs
43// (listed in column 2 of the table).
44//
45// Relationships
46// One instance of this ME is associated with the ONU ME.
47//
48// Attributes
49// Managed Entity Id
50// Managed entity ID: This attribute uniquely identifies each instance of this ME. There is only
51// one instance, number 0. (R) (mandatory) (2 bytes)
52//
53// Restore Power Timer Reset Interval
54// Restore power timer reset interval: The time delay, in seconds, before resetting the power-
55// shedding timers after full power restoration. Upon ME instantiation, the ONU sets this attribute
56// to 0. (R, W) (mandatory) (2 bytes)
57//
58// Data Class Shedding Interval
59// Data class shedding interval: (R, W) (mandatory) (2 bytes)
60//
61// Voice Class Shedding Interval
62// Voice class shedding interval: This attribute only pertains to voice services that terminate on
63// the ONU and are under the management control of the OMCI. (R, W) (mandatory) (2 bytes)
64//
65// Video Overlay Class Shedding Interval
66// Video overlay class shedding interval: (R, W) (mandatory) (2 bytes)
67//
68// Video Return Class Shedding Interval
69// Video return class shedding interval: (R, W) (mandatory) (2 bytes)
70//
71// Digital Subscriber Line Class Shedding Interval
72// Digital subscriber line (DSL) class shedding interval: (R, W) (mandatory) (2 bytes)
73//
74// Atm Class Shedding Interval
75// ATM class shedding interval: (R, W) (mandatory) (2 bytes)
76//
77// Ces Class Shedding Interval
78// CES class shedding interval: (R, W) (mandatory) (2 bytes)
79//
80// Frame Class Shedding Interval
81// Frame class shedding interval: (R, W) (mandatory) (2 bytes)
82//
83// Sdh_Sonet Class Shedding Interval
84// Sdh-sonet class shedding interval: (R, W) (mandatory) (2 bytes)
85//
86// Shedding Status
87// The ONU sets each bit to 1 when power shedding is active, and clears it to 0 when the service is
88// restored. (R) (optional) (2 bytes)
89//
90type OnuPowerShedding struct {
91 ManagedEntityDefinition
92 Attributes AttributeValueMap
93}
94
95func init() {
96 onupowersheddingBME = &ManagedEntityDefinition{
97 Name: "OnuPowerShedding",
98 ClassID: 133,
99 MessageTypes: mapset.NewSetWith(
100 Get,
101 Set,
102 ),
103 AllowedAttributeMask: 0XFFE0,
104 AttributeDefinitions: AttributeDefinitionMap{
105 0: Uint16Field("ManagedEntityId", 0, mapset.NewSetWith(Read), false, false, false, false, 0),
106 1: Uint16Field("RestorePowerTimerResetInterval", 0, mapset.NewSetWith(Read, Write), false, false, false, false, 1),
107 2: Uint16Field("DataClassSheddingInterval", 0, mapset.NewSetWith(Read, Write), false, false, false, false, 2),
108 3: Uint16Field("VoiceClassSheddingInterval", 0, mapset.NewSetWith(Read, Write), false, false, false, false, 3),
109 4: Uint16Field("VideoOverlayClassSheddingInterval", 0, mapset.NewSetWith(Read, Write), false, false, false, false, 4),
110 5: Uint16Field("VideoReturnClassSheddingInterval", 0, mapset.NewSetWith(Read, Write), false, false, false, false, 5),
111 6: Uint16Field("DigitalSubscriberLineClassSheddingInterval", 0, mapset.NewSetWith(Read, Write), false, false, false, false, 6),
112 7: Uint16Field("AtmClassSheddingInterval", 0, mapset.NewSetWith(Read, Write), false, false, false, false, 7),
113 8: Uint16Field("CesClassSheddingInterval", 0, mapset.NewSetWith(Read, Write), false, false, false, false, 8),
114 9: Uint16Field("FrameClassSheddingInterval", 0, mapset.NewSetWith(Read, Write), false, false, false, false, 9),
115 10: Uint16Field("SdhSonetClassSheddingInterval", 0, mapset.NewSetWith(Read, Write), false, false, false, false, 10),
116 11: Uint16Field("SheddingStatus", 0, mapset.NewSetWith(Read), true, false, true, false, 11),
117 },
118 }
119}
120
121// NewOnuPowerShedding (class ID 133 creates the basic
122// Managed Entity definition that is used to validate an ME of this type that
123// is received from the wire, about to be sent on the wire.
124func NewOnuPowerShedding(params ...ParamData) (*ManagedEntity, OmciErrors) {
125 return NewManagedEntity(onupowersheddingBME, params...)
126}