blob: 07dd47f8c8049e42da56d6024c93922d81c5000a [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
Chip Boling8cdd6392022-01-27 08:43:37 -06004 *
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
Chip Boling8cdd6392022-01-27 08:43:37 -06008 *
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Chip Boling8cdd6392022-01-27 08:43:37 -060010 *
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 */
David K. Bainbridgeadf422d2021-04-09 16:06:41 +000017/*
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// XdslChannelConfigurationProfileClassID is the 16-bit ID for the OMCI
29// Managed entity xDSL channel configuration profile
Chip Boling610117d2021-09-09 11:24:34 -050030const XdslChannelConfigurationProfileClassID = ClassID(107) // 0x006b
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var xdslchannelconfigurationprofileBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// XdslChannelConfigurationProfile (Class ID: #107 / 0x006b)
Chip Boling6e27b352020-02-14 09:10:01 -060035// This ME contains the channel configuration profile for an xDSL UNI. An instance of this ME is
36// created and deleted by the OLT.
37//
38// NOTE - If [ITUT G.997.1] compatibility is required, bit rates should only be set to integer
39// multiples of 1000-bits/s. The ONU may reject attempts to set other values for bit rate
40// attributes.
41//
42// Relationships
43// An instance of this ME may be associated with zero or more instances of the PPTP xDSL UNI part
44// 1.
45//
46// Attributes
47// Managed Entity Id
Chip Boling610117d2021-09-09 11:24:34 -050048// This attribute uniquely identifies each instance of this ME. The value 0 is reserved. (R,
49// setbycreate) (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060050//
51// Minimum Data Rate
Chip Boling610117d2021-09-09 11:24:34 -050052// This parameter specifies the minimum desired net data rate for the bearer channel. It is coded
53// in bits per second. (R,-W, setbycreate) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060054//
55// Maximum Data Rate
Chip Boling610117d2021-09-09 11:24:34 -050056// This parameter specifies the maximum desired net data rate for the bearer channel. It is coded
57// in bits per second. (R,-W, setbycreate) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060058//
59// Rate Adaptation Ratio
Chip Boling610117d2021-09-09 11:24:34 -050060// This attribute specifies the weight that should be taken into account when performing rate
61// adaptation in the direction of the bearer channel. The attribute is defined as a percentage. The
62// value 20, for example, means that 20% of the available data rate (in excess of the minimum data
63// rate summed over all bearer channels) is assigned to this bearer channel and 80% to the other
64// bearer channels. The OLT must ensure that the sum of rate adaptation ratios over all bearers in
65// one direction is 100%. (R,-W, setbycreate) (optional) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -060066//
67// Maximum Interleaving Delay
Chip Boling610117d2021-09-09 11:24:34 -050068// This attribute is the maximum one-way interleaving delay introduced by the PMS-TC between the
69// alpha and the beta reference points, in the direction of the bearer channel. The one-way
70// interleaving delay is defined in individual xDSL Recommendations as cap(S*D)-/4-ms, where S is
71// the S factor, D is the interleaving depth, and cap() denotes rounding to the next higher
72// integer. xTUs choose S and D values such that the actual one-way interleaving delay does not
73// exceed the configured maximum interleaving delay.
74//
Chip Boling6e27b352020-02-14 09:10:01 -060075// The delay is coded in milliseconds, varying from 2 to 63, with special meaning assigned to
76// values 0, 1 and 255. The value 0 indicates that no delay bound is imposed. The value 1 indicates
77// the fast latency path is to be used in the ITUT G.992.1 operating mode and S and D are to be
78// 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
79// ITUT G.993.2 operating modes. The value 255 indicates a delay bound of 1-ms in ITUT-G.993.2
80// operation. (R,-W, setbycreate) (mandatory) (1-byte)
81//
82// Data Rate Threshold Upshift
Chip Boling610117d2021-09-09 11:24:34 -050083// This attribute is a threshold on the cumulative data rate upshift achieved over one or more
84// bearer channel data rate adaptations. An upshift rate change (DRT up) notification is issued by
85// the PPTP xDSL UNI part 1 when the actual data rate exceeds the data rate at the last entry into
86// showtime by more than the threshold. The data rate threshold is coded in bits per second. (R,-W,
87// setbycreate) (mandatory for xDSL standards that use this attribute) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060088//
89// Data Rate Threshold Downshift
Chip Boling610117d2021-09-09 11:24:34 -050090// This attribute is a threshold on the cumulative data rate downshift achieved over one or more
91// bearer channel data rate adaptations. A downshift rate change (DRT down) notification is issued
92// by the PPTP xDSL UNI part 1 when the actual data rate is below the data rate at the last entry
93// into showtime by more than the threshold. The data rate threshold is coded in bits per second.
94// (R,-W, setbycreate) (mandatory for xDSL standards that use this attribute) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060095//
96// Minimum Reserved Data Rate
Chip Boling610117d2021-09-09 11:24:34 -050097// This attribute specifies the desired minimum reserved net data rate for the bearer channel. The
98// rate is coded in bits per second. This attribute is needed only if the rate adaptation mode is
99// set to dynamic in the xDSL line configuration profile part 1. (R,-W, setbycreate) (optional)
100// (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600101//
102// Minimum Data Rate In Low _ Power State
103// Minimum data rate in low-power state: This parameter specifies the minimum desired net data rate
104// for the bearer channel during the low-power state (L1/L2). The power management low-power states
105// L1 and L2 are defined in [ITUT-G.992.2] and [ITUT G.992.3], respectively. The data rate is coded
106// in bits per second. (R,-W, setbycreate) (mandatory) (4-byte)
107//
108// Minimum Impulse Noise Protection
Chip Boling610117d2021-09-09 11:24:34 -0500109// The INPmin attribute specifies the minimum INP for the bearer channel if it is transported over
110// DMT symbols with a subcarrier spacing of 4.3125-kHz. INP is expressed in DMT symbols with a
111// subcarrier spacing of 4.3125-kHz. It can be 1/2 symbol or any integer number of symbols from 0
112// to 16, inclusive.
113//
114// If the xTU does not support the configured INPmin value, it uses the nearest supported INP value
115// greater than INPmin.
116//
117// Value INPmin
118//
119// 1 0 symbols
120//
121// 2 1/2 symbol
122//
123// N (N-- 2) symbols, 3 <= N <= 18
124//
Chip Boling6e27b352020-02-14 09:10:01 -0600125// (R,-W, setbycreate) (optional for [ITU-T G.992.1], mandatory for other xDSL standards that use
126// this attribute) (1-byte)
127//
128// Maximum Bit Error Ratio
Chip Boling610117d2021-09-09 11:24:34 -0500129// This attribute specifies the desired maximum bit error ratio for the bearer channel. It is only
130// valid for [ITUT-G.992.3], [ITUT-G.992.4] and [ITUT-G.992.5]. The bit error ratio is specified
131// via the following values:
132//
133// 1 10-3
134//
135// 2 10-5
136//
137// 3 10-7
138//
Chip Boling6e27b352020-02-14 09:10:01 -0600139// (R,-W, setbycreate) (mandatory for standards that use this attribute) (1-byte)
140//
141// Minimum Impulse Noise Protection 8_Khz
142// Minimum impulse noise protection 8-kHz: The INPmin8 attribute specifies the minimum INP for the
143// bearer channel if it is transported over DMT symbols with a subcarrier spacing of 8.625-kHz. It
144// is only valid for [ITUT-G.993.2]. INP is expressed in DMT symbols with a subcarrier spacing of
145// 8.625-kHz. It can take any integer value from 0 (default) to 16, inclusive. (R, W) (mandatory
146// for [ITUT-G.993.2]) (1 byte)
147//
148// Maximum Delay Variation
Chip Boling610117d2021-09-09 11:24:34 -0500149// The DVMAX attribute specifies the maximum value for delay variation allowed in an OLR procedure.
150// Its value ranges from 1 (0.1-ms) to 254 (25.4-ms). The special value 255 specifies that no delay
151// variation bound is imposed. (R, W) (optional: used by [ITUT-G.993.2]) (1 byte)
Chip Boling6e27b352020-02-14 09:10:01 -0600152//
153// Channel Initialization Policy Selection
Chip Boling610117d2021-09-09 11:24:34 -0500154// The CIPOLICY attribute specifies the policy to determine transceiver configuration at
155// initialization. Valid values are 0..1, as defined in the Recommendations that use this
156// attribute. (R,-W) (optional) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -0600157//
158// Minimum Sos Bit Rate Downstream
Chip Boling610117d2021-09-09 11:24:34 -0500159// The MIN-SOS-BR-ds attribute specifies the minimum net data rate required for a valid SOS request
160// in the downstream direction. The value is coded as an unsigned integer representing the data
161// rate as a multiple of 8-kbit/s. (R,-W) (optional) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600162//
163// Minimum Sos Bit Rate Upstream
Chip Boling610117d2021-09-09 11:24:34 -0500164// The MIN-SOS-BR-us attribute specifies the minimum net data rate required for a valid SOS request
165// in the upstream direction. The value is coded as an unsigned integer representing the data rate
166// as a multiple of 8-kbit/s. (R,-W) (optional) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600167//
168type XdslChannelConfigurationProfile struct {
169 ManagedEntityDefinition
170 Attributes AttributeValueMap
171}
172
Chip Boling8cdd6392022-01-27 08:43:37 -0600173// Attribute name constants
174
175const XdslChannelConfigurationProfile_MinimumDataRate = "MinimumDataRate"
176const XdslChannelConfigurationProfile_MaximumDataRate = "MaximumDataRate"
177const XdslChannelConfigurationProfile_RateAdaptationRatio = "RateAdaptationRatio"
178const XdslChannelConfigurationProfile_MaximumInterleavingDelay = "MaximumInterleavingDelay"
179const XdslChannelConfigurationProfile_DataRateThresholdUpshift = "DataRateThresholdUpshift"
180const XdslChannelConfigurationProfile_DataRateThresholdDownshift = "DataRateThresholdDownshift"
181const XdslChannelConfigurationProfile_MinimumReservedDataRate = "MinimumReservedDataRate"
182const XdslChannelConfigurationProfile_MinimumDataRateInLowPowerState = "MinimumDataRateInLowPowerState"
183const XdslChannelConfigurationProfile_MinimumImpulseNoiseProtection = "MinimumImpulseNoiseProtection"
184const XdslChannelConfigurationProfile_MaximumBitErrorRatio = "MaximumBitErrorRatio"
185const XdslChannelConfigurationProfile_MinimumImpulseNoiseProtection8Khz = "MinimumImpulseNoiseProtection8Khz"
186const XdslChannelConfigurationProfile_MaximumDelayVariation = "MaximumDelayVariation"
187const XdslChannelConfigurationProfile_ChannelInitializationPolicySelection = "ChannelInitializationPolicySelection"
188const XdslChannelConfigurationProfile_MinimumSosBitRateDownstream = "MinimumSosBitRateDownstream"
189const XdslChannelConfigurationProfile_MinimumSosBitRateUpstream = "MinimumSosBitRateUpstream"
190
Chip Boling6e27b352020-02-14 09:10:01 -0600191func init() {
192 xdslchannelconfigurationprofileBME = &ManagedEntityDefinition{
193 Name: "XdslChannelConfigurationProfile",
Chip Boling8cdd6392022-01-27 08:43:37 -0600194 ClassID: XdslChannelConfigurationProfileClassID,
Chip Boling6e27b352020-02-14 09:10:01 -0600195 MessageTypes: mapset.NewSetWith(
196 Create,
197 Delete,
198 Get,
199 Set,
200 ),
201 AllowedAttributeMask: 0xfffe,
202 AttributeDefinitions: AttributeDefinitionMap{
Chip Boling8cdd6392022-01-27 08:43:37 -0600203 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
204 1: Uint32Field(XdslChannelConfigurationProfile_MinimumDataRate, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
205 2: Uint32Field(XdslChannelConfigurationProfile_MaximumDataRate, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
206 3: ByteField(XdslChannelConfigurationProfile_RateAdaptationRatio, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 3),
207 4: ByteField(XdslChannelConfigurationProfile_MaximumInterleavingDelay, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
208 5: Uint32Field(XdslChannelConfigurationProfile_DataRateThresholdUpshift, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
209 6: Uint32Field(XdslChannelConfigurationProfile_DataRateThresholdDownshift, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
210 7: Uint32Field(XdslChannelConfigurationProfile_MinimumReservedDataRate, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 7),
211 8: Uint32Field(XdslChannelConfigurationProfile_MinimumDataRateInLowPowerState, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
212 9: ByteField(XdslChannelConfigurationProfile_MinimumImpulseNoiseProtection, UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
213 10: ByteField(XdslChannelConfigurationProfile_MaximumBitErrorRatio, UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
214 11: ByteField(XdslChannelConfigurationProfile_MinimumImpulseNoiseProtection8Khz, UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, false, false, 11),
215 12: ByteField(XdslChannelConfigurationProfile_MaximumDelayVariation, UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, false, false, 12),
216 13: ByteField(XdslChannelConfigurationProfile_ChannelInitializationPolicySelection, UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
217 14: Uint32Field(XdslChannelConfigurationProfile_MinimumSosBitRateDownstream, UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14),
218 15: Uint32Field(XdslChannelConfigurationProfile_MinimumSosBitRateUpstream, UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, Write), false, true, false, 15),
Chip Boling6e27b352020-02-14 09:10:01 -0600219 },
220 Access: CreatedByOlt,
221 Support: UnknownSupport,
222 }
223}
224
225// NewXdslChannelConfigurationProfile (class ID 107) creates the basic
226// Managed Entity definition that is used to validate an ME of this type that
227// is received from or transmitted to the OMCC.
228func NewXdslChannelConfigurationProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
229 return NewManagedEntity(*xdslchannelconfigurationprofileBME, params...)
230}