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