Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 3 | * Copyright 2020-present Open Networking Foundation |
| 4 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 5 | * 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 Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 8 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 10 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 11 | * 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. Bainbridge | adf422d | 2021-04-09 16:06:41 +0000 | [diff] [blame] | 17 | /* |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 18 | * 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 | |
| 24 | package generated |
| 25 | |
| 26 | import "github.com/deckarep/golang-set" |
| 27 | |
| 28 | // XdslChannelConfigurationProfileClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity xDSL channel configuration profile |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 30 | const XdslChannelConfigurationProfileClassID = ClassID(107) // 0x006b |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var xdslchannelconfigurationprofileBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 34 | // XdslChannelConfigurationProfile (Class ID: #107 / 0x006b) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 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 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 48 | // This attribute uniquely identifies each instance of this ME. The value 0 is reserved. (R, |
| 49 | // setbycreate) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 50 | // |
| 51 | // Minimum Data Rate |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 52 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 54 | // |
| 55 | // Maximum Data Rate |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 56 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 58 | // |
| 59 | // Rate Adaptation Ratio |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 60 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 66 | // |
| 67 | // Maximum Interleaving Delay |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 68 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 75 | // 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 Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 83 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 88 | // |
| 89 | // Data Rate Threshold Downshift |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 90 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 95 | // |
| 96 | // Minimum Reserved Data Rate |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 97 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 101 | // |
| 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 Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 109 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 125 | // (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 Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 129 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 139 | // (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 Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 149 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 152 | // |
| 153 | // Channel Initialization Policy Selection |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 154 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 157 | // |
| 158 | // Minimum Sos Bit Rate Downstream |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 159 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 162 | // |
| 163 | // Minimum Sos Bit Rate Upstream |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 164 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 167 | // |
| 168 | type XdslChannelConfigurationProfile struct { |
| 169 | ManagedEntityDefinition |
| 170 | Attributes AttributeValueMap |
| 171 | } |
| 172 | |
| 173 | func 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. |
| 210 | func NewXdslChannelConfigurationProfile(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 211 | return NewManagedEntity(*xdslchannelconfigurationprofileBME, params...) |
| 212 | } |