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 | // XdslSubcarrierMaskingDownstreamProfileClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity xDSL subcarrier masking downstream profile |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const XdslSubcarrierMaskingDownstreamProfileClassID = ClassID(108) // 0x006c |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var xdslsubcarriermaskingdownstreamprofileBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // XdslSubcarrierMaskingDownstreamProfile (Class ID: #108 / 0x006c) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // This ME contains the subcarrier masking downstream profile for an xDSL UNI. Instances of this ME |
| 36 | // are created and deleted by the OLT. |
| 37 | // |
| 38 | // Relationships |
| 39 | // An instance of this ME may be associated with zero or more instances of the PPTP xDSL UNI part |
| 40 | // 1. |
| 41 | // |
| 42 | // Attributes |
| 43 | // Managed Entity Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 44 | // This attribute uniquely identifies each instance of this ME. The value 0 is reserved. (R, set- |
| 45 | // by-create) (mandatory) (2-bytes) |
| 46 | // |
| 47 | // The four following attributes are bit maps that represent downstream mask values for subcarriers |
| 48 | // 1..128 (mask 1) through 385..512 (mask 4). The MSB of the first byte corresponds to the lowest |
| 49 | // numbered subcarrier, and the LSB of the last byte corresponds to the highest. Each bit position |
| 50 | // defines whether the corresponding downstream subcarrier is masked (1) or not masked (0). |
| 51 | // |
| 52 | // The number of xDSL subcarriers, downstream (NSCds) is the highest numbered subcarrier that can |
| 53 | // be transmitted in the downstream direction. For [ITUT-G.992.3], [ITUT-G.992.4] and |
| 54 | // [ITUT-G.992.5], it is defined in the corresponding Recommendation. For [ITUT-G.992.1], NSCds = |
| 55 | // 256 and for [ITUT-G.992.2], NSCds-= 128. |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 56 | // |
| 57 | // Downstream Subcarrier Mask 1 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 58 | // Subcarriers 1 to 128. (R,-W, set-by-create) (mandatory) (16-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 59 | // |
| 60 | // Downstream Subcarrier Mask 2 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 61 | // Subcarriers 129 to 256. (R,-W) (mandatory for modems that support NSCds-> 128) (16-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 62 | // |
| 63 | // Downstream Subcarrier Mask 3 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 64 | // Subcarriers 257 to 384. (R,-W) (mandatory for modems that support NSCds-> 256) (16-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 65 | // |
| 66 | // Downstream Subcarrier Mask 4 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 67 | // Subcarriers 385 to 512. (R,-W) (mandatory for modems that support NSCds-> 384) (16-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 68 | // |
| 69 | // Mask Valid |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 70 | // This Boolean attribute controls and reports the operational status of the downstream subcarrier |
| 71 | // mask attributes. |
| 72 | // |
| 73 | // If this attribute is true (1), the downstream subcarrier mask represented in this ME has been |
| 74 | // impressed on the DSL equipment. |
| 75 | // |
| 76 | // If this attribute is false (0), the downstream subcarrier mask represented in this ME has not |
| 77 | // been impressed on the DSL equipment. The default value is false. |
| 78 | // |
| 79 | // The value of this attribute can be modified by the ONU and OLT, as follows. |
| 80 | // |
| 81 | // o If the OLT changes any of the four mask attributes or sets mask valid false, then mask valid |
| 82 | // is false. |
| 83 | // |
| 84 | // o If mask valid is false and the OLT sets mask valid true, the ONU impresses the downstream |
| 85 | // subcarrier mask data on to the DSL equipment. |
| 86 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 87 | // (R,-W) (mandatory) (1-byte) |
| 88 | // |
| 89 | type XdslSubcarrierMaskingDownstreamProfile struct { |
| 90 | ManagedEntityDefinition |
| 91 | Attributes AttributeValueMap |
| 92 | } |
| 93 | |
| 94 | func init() { |
| 95 | xdslsubcarriermaskingdownstreamprofileBME = &ManagedEntityDefinition{ |
| 96 | Name: "XdslSubcarrierMaskingDownstreamProfile", |
| 97 | ClassID: 108, |
| 98 | MessageTypes: mapset.NewSetWith( |
| 99 | Create, |
| 100 | Delete, |
| 101 | Get, |
| 102 | Set, |
| 103 | ), |
| 104 | AllowedAttributeMask: 0xf800, |
| 105 | AttributeDefinitions: AttributeDefinitionMap{ |
| 106 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 107 | 1: MultiByteField("DownstreamSubcarrierMask1", OctetsAttributeType, 0x8000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 108 | 2: MultiByteField("DownstreamSubcarrierMask2", OctetsAttributeType, 0x4000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 2), |
| 109 | 3: MultiByteField("DownstreamSubcarrierMask3", OctetsAttributeType, 0x2000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3), |
| 110 | 4: MultiByteField("DownstreamSubcarrierMask4", OctetsAttributeType, 0x1000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 4), |
| 111 | 5: ByteField("MaskValid", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5), |
| 112 | }, |
| 113 | Access: CreatedByOlt, |
| 114 | Support: UnknownSupport, |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | // NewXdslSubcarrierMaskingDownstreamProfile (class ID 108) creates the basic |
| 119 | // Managed Entity definition that is used to validate an ME of this type that |
| 120 | // is received from or transmitted to the OMCC. |
| 121 | func NewXdslSubcarrierMaskingDownstreamProfile(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 122 | return NewManagedEntity(*xdslsubcarriermaskingdownstreamprofileBME, params...) |
| 123 | } |