blob: a11f3da69447d2d2524cb67a46158e48c1cf53a0 [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 */
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
173func init() {
174 xdslchannelconfigurationprofileBME = &ManagedEntityDefinition{
175 Name: "XdslChannelConfigurationProfile",
176 ClassID: 107,
177 MessageTypes: mapset.NewSetWith(
178 Create,
179 Delete,
180 Get,
181 Set,
182 ),
183 AllowedAttributeMask: 0xfffe,
184 AttributeDefinitions: AttributeDefinitionMap{
185 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
186 1: Uint32Field("MinimumDataRate", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
187 2: Uint32Field("MaximumDataRate", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
188 3: ByteField("RateAdaptationRatio", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 3),
189 4: ByteField("MaximumInterleavingDelay", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
190 5: Uint32Field("DataRateThresholdUpshift", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
191 6: Uint32Field("DataRateThresholdDownshift", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
192 7: Uint32Field("MinimumReservedDataRate", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 7),
193 8: Uint32Field("MinimumDataRateInLowPowerState", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
194 9: ByteField("MinimumImpulseNoiseProtection", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
195 10: ByteField("MaximumBitErrorRatio", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
196 11: ByteField("MinimumImpulseNoiseProtection8Khz", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, false, false, 11),
197 12: ByteField("MaximumDelayVariation", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, false, false, 12),
198 13: ByteField("ChannelInitializationPolicySelection", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
199 14: Uint32Field("MinimumSosBitRateDownstream", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14),
200 15: Uint32Field("MinimumSosBitRateUpstream", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, Write), false, true, false, 15),
201 },
202 Access: CreatedByOlt,
203 Support: UnknownSupport,
204 }
205}
206
207// NewXdslChannelConfigurationProfile (class ID 107) creates the basic
208// Managed Entity definition that is used to validate an ME of this type that
209// is received from or transmitted to the OMCC.
210func NewXdslChannelConfigurationProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
211 return NewManagedEntity(*xdslchannelconfigurationprofileBME, params...)
212}