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