blob: 5e701a270a3e29045ea71cfa6b523ae1d7d3eb4f [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// XdslChannelConfigurationProfileClassID is the 16-bit ID for the OMCI
26// Managed entity xDSL channel configuration profile
27const XdslChannelConfigurationProfileClassID ClassID = ClassID(107)
28
29var xdslchannelconfigurationprofileBME *ManagedEntityDefinition
30
31// XdslChannelConfigurationProfile (class ID #107)
32// This ME contains the channel configuration profile for an xDSL UNI. An instance of this ME is
33// created and deleted by the OLT.
34//
35// NOTE - If [ITUT G.997.1] compatibility is required, bit rates should only be set to integer
36// multiples of 1000-bits/s. The ONU may reject attempts to set other values for bit rate
37// attributes.
38//
39// Relationships
40// An instance of this ME may be associated with zero or more instances of the PPTP xDSL UNI part
41// 1.
42//
43// Attributes
44// Managed Entity Id
45// Managed entity ID: This attribute uniquely identifies each instance of this ME. The value 0 is
46// reserved. (R, setbycreate) (mandatory) (2-bytes)
47//
48// Minimum Data Rate
49// Minimum data rate: This parameter specifies the minimum desired net data rate for the bearer
50// channel. It is coded in bits per second. (R,-W, setbycreate) (mandatory) (4-bytes)
51//
52// Maximum Data Rate
53// Maximum data rate: This parameter specifies the maximum desired net data rate for the bearer
54// channel. It is coded in bits per second. (R,-W, setbycreate) (mandatory) (4-bytes)
55//
56// Rate Adaptation Ratio
57// Rate adaptation ratio: This attribute specifies the weight that should be taken into account
58// when performing rate adaptation in the direction of the bearer channel. The attribute is defined
59// as a percentage. The value 20, for example, means that 20% of the available data rate (in excess
60// of the minimum data rate summed over all bearer channels) is assigned to this bearer channel and
61// 80% to the other bearer channels. The OLT must ensure that the sum of rate adaptation ratios
62// over all bearers in one direction is 100%. (R,-W, setbycreate) (optional) (1-byte)
63//
64// Maximum Interleaving Delay
65// The delay is coded in milliseconds, varying from 2 to 63, with special meaning assigned to
66// values 0, 1 and 255. The value 0 indicates that no delay bound is imposed. The value 1 indicates
67// the fast latency path is to be used in the ITUT G.992.1 operating mode and S and D are to be
68// selected such that S- 1 and D-= 1 in ITU-T G.992.2, ITUT G.992.3, ITUT G.992.4, ITUT G.992.5 and
69// ITUT G.993.2 operating modes. The value 255 indicates a delay bound of 1-ms in ITUT-G.993.2
70// operation. (R,-W, setbycreate) (mandatory) (1-byte)
71//
72// Data Rate Threshold Upshift
73// Data rate threshold upshift: This attribute is a threshold on the cumulative data rate upshift
74// achieved over one or more bearer channel data rate adaptations. An upshift rate change (DRT up)
75// notification is issued by the PPTP xDSL UNI part 1 when the actual data rate exceeds the data
76// rate at the last entry into showtime by more than the threshold. The data rate threshold is
77// coded in bits per second. (R,-W, setbycreate) (mandatory for xDSL standards that use this
78// attribute) (4-bytes)
79//
80// Data Rate Threshold Downshift
81// Data rate threshold downshift: This attribute is a threshold on the cumulative data rate
82// downshift achieved over one or more bearer channel data rate adaptations. A downshift rate
83// change (DRT down) notification is issued by the PPTP xDSL UNI part 1 when the actual data rate
84// is below the data rate at the last entry into showtime by more than the threshold. The data rate
85// threshold is coded in bits per second. (R,-W, setbycreate) (mandatory for xDSL standards that
86// use this attribute) (4-bytes)
87//
88// Minimum Reserved Data Rate
89// Minimum reserved data rate: This attribute specifies the desired minimum reserved net data rate
90// for the bearer channel. The rate is coded in bits per second. This attribute is needed only if
91// the rate adaptation mode is set to dynamic in the xDSL line configuration profile part 1. (R,-W,
92// setbycreate) (optional) (4-bytes)
93//
94// Minimum Data Rate In Low _ Power State
95// Minimum data rate in low-power state: This parameter specifies the minimum desired net data rate
96// for the bearer channel during the low-power state (L1/L2). The power management low-power states
97// L1 and L2 are defined in [ITUT-G.992.2] and [ITUT G.992.3], respectively. The data rate is coded
98// in bits per second. (R,-W, setbycreate) (mandatory) (4-byte)
99//
100// Minimum Impulse Noise Protection
101// (R,-W, setbycreate) (optional for [ITU-T G.992.1], mandatory for other xDSL standards that use
102// this attribute) (1-byte)
103//
104// Maximum Bit Error Ratio
105// (R,-W, setbycreate) (mandatory for standards that use this attribute) (1-byte)
106//
107// Minimum Impulse Noise Protection 8_Khz
108// Minimum impulse noise protection 8-kHz: The INPmin8 attribute specifies the minimum INP for the
109// bearer channel if it is transported over DMT symbols with a subcarrier spacing of 8.625-kHz. It
110// is only valid for [ITUT-G.993.2]. INP is expressed in DMT symbols with a subcarrier spacing of
111// 8.625-kHz. It can take any integer value from 0 (default) to 16, inclusive. (R, W) (mandatory
112// for [ITUT-G.993.2]) (1 byte)
113//
114// Maximum Delay Variation
115// Maximum delay variation: The DVMAX attribute specifies the maximum value for delay variation
116// allowed in an OLR procedure. Its value ranges from 1 (0.1-ms) to 254 (25.4-ms). The special
117// value 255 specifies that no delay variation bound is imposed. (R, W) (optional: used by
118// [ITUT-G.993.2]) (1 byte)
119//
120// Channel Initialization Policy Selection
121// Channel initialization policy selection: The CIPOLICY attribute specifies the policy to
122// determine transceiver configuration at initialization. Valid values are 0..1, as defined in the
123// Recommendations that use this attribute. (R,-W) (optional) (1-byte)
124//
125// Minimum Sos Bit Rate Downstream
126// Minimum SOS bit rate downstream: The MIN-SOS-BR-ds attribute specifies the minimum net data rate
127// required for a valid SOS request in the downstream direction. The value is coded as an unsigned
128// integer representing the data rate as a multiple of 8-kbit/s. (R,-W) (optional) (4-bytes)
129//
130// Minimum Sos Bit Rate Upstream
131// Minimum SOS bit rate upstream: The MIN-SOS-BR-us attribute specifies the minimum net data rate
132// required for a valid SOS request in the upstream direction. The value is coded as an unsigned
133// integer representing the data rate as a multiple of 8-kbit/s. (R,-W) (optional) (4-bytes)
134//
135type XdslChannelConfigurationProfile struct {
136 ManagedEntityDefinition
137 Attributes AttributeValueMap
138}
139
140func init() {
141 xdslchannelconfigurationprofileBME = &ManagedEntityDefinition{
142 Name: "XdslChannelConfigurationProfile",
143 ClassID: 107,
144 MessageTypes: mapset.NewSetWith(
145 Create,
146 Delete,
147 Get,
148 Set,
149 ),
150 AllowedAttributeMask: 0xfffe,
151 AttributeDefinitions: AttributeDefinitionMap{
152 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
153 1: Uint32Field("MinimumDataRate", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
154 2: Uint32Field("MaximumDataRate", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
155 3: ByteField("RateAdaptationRatio", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 3),
156 4: ByteField("MaximumInterleavingDelay", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
157 5: Uint32Field("DataRateThresholdUpshift", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
158 6: Uint32Field("DataRateThresholdDownshift", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
159 7: Uint32Field("MinimumReservedDataRate", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 7),
160 8: Uint32Field("MinimumDataRateInLowPowerState", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
161 9: ByteField("MinimumImpulseNoiseProtection", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
162 10: ByteField("MaximumBitErrorRatio", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
163 11: ByteField("MinimumImpulseNoiseProtection8Khz", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, false, false, 11),
164 12: ByteField("MaximumDelayVariation", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, false, false, 12),
165 13: ByteField("ChannelInitializationPolicySelection", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
166 14: Uint32Field("MinimumSosBitRateDownstream", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14),
167 15: Uint32Field("MinimumSosBitRateUpstream", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, Write), false, true, false, 15),
168 },
169 Access: CreatedByOlt,
170 Support: UnknownSupport,
171 }
172}
173
174// NewXdslChannelConfigurationProfile (class ID 107) creates the basic
175// Managed Entity definition that is used to validate an ME of this type that
176// is received from or transmitted to the OMCC.
177func NewXdslChannelConfigurationProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
178 return NewManagedEntity(*xdslchannelconfigurationprofileBME, params...)
179}