Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
| 3 | * Copyright 2020-present Open Networking Foundation |
Elia Battiston | 9bfe110 | 2022-02-03 10:38:03 +0100 | [diff] [blame^] | 4 | * |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [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 |
Elia Battiston | 9bfe110 | 2022-02-03 10:38:03 +0100 | [diff] [blame^] | 8 | * |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Elia Battiston | 9bfe110 | 2022-02-03 10:38:03 +0100 | [diff] [blame^] | 10 | * |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [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 | */ |
Girish Gowdra | 161d27a | 2021-05-05 12:01:44 -0700 | [diff] [blame] | 17 | /* |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [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 |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 30 | const XdslSubcarrierMaskingDownstreamProfileClassID = ClassID(108) // 0x006c |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 31 | |
| 32 | var xdslsubcarriermaskingdownstreamprofileBME *ManagedEntityDefinition |
| 33 | |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 34 | // XdslSubcarrierMaskingDownstreamProfile (Class ID: #108 / 0x006c) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [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 |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [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. |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 56 | // |
| 57 | // Downstream Subcarrier Mask 1 |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 58 | // Subcarriers 1 to 128. (R,-W, set-by-create) (mandatory) (16-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 59 | // |
| 60 | // Downstream Subcarrier Mask 2 |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 61 | // Subcarriers 129 to 256. (R,-W) (mandatory for modems that support NSCds-> 128) (16-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 62 | // |
| 63 | // Downstream Subcarrier Mask 3 |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 64 | // Subcarriers 257 to 384. (R,-W) (mandatory for modems that support NSCds-> 256) (16-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 65 | // |
| 66 | // Downstream Subcarrier Mask 4 |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 67 | // Subcarriers 385 to 512. (R,-W) (mandatory for modems that support NSCds-> 384) (16-bytes) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 68 | // |
| 69 | // Mask Valid |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [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 | // |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 87 | // (R,-W) (mandatory) (1-byte) |
| 88 | // |
| 89 | type XdslSubcarrierMaskingDownstreamProfile struct { |
| 90 | ManagedEntityDefinition |
| 91 | Attributes AttributeValueMap |
| 92 | } |
| 93 | |
Elia Battiston | 9bfe110 | 2022-02-03 10:38:03 +0100 | [diff] [blame^] | 94 | // Attribute name constants |
| 95 | |
| 96 | const XdslSubcarrierMaskingDownstreamProfile_DownstreamSubcarrierMask1 = "DownstreamSubcarrierMask1" |
| 97 | const XdslSubcarrierMaskingDownstreamProfile_DownstreamSubcarrierMask2 = "DownstreamSubcarrierMask2" |
| 98 | const XdslSubcarrierMaskingDownstreamProfile_DownstreamSubcarrierMask3 = "DownstreamSubcarrierMask3" |
| 99 | const XdslSubcarrierMaskingDownstreamProfile_DownstreamSubcarrierMask4 = "DownstreamSubcarrierMask4" |
| 100 | const XdslSubcarrierMaskingDownstreamProfile_MaskValid = "MaskValid" |
| 101 | |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 102 | func init() { |
| 103 | xdslsubcarriermaskingdownstreamprofileBME = &ManagedEntityDefinition{ |
| 104 | Name: "XdslSubcarrierMaskingDownstreamProfile", |
Elia Battiston | 9bfe110 | 2022-02-03 10:38:03 +0100 | [diff] [blame^] | 105 | ClassID: XdslSubcarrierMaskingDownstreamProfileClassID, |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 106 | MessageTypes: mapset.NewSetWith( |
| 107 | Create, |
| 108 | Delete, |
| 109 | Get, |
| 110 | Set, |
| 111 | ), |
| 112 | AllowedAttributeMask: 0xf800, |
| 113 | AttributeDefinitions: AttributeDefinitionMap{ |
Elia Battiston | 9bfe110 | 2022-02-03 10:38:03 +0100 | [diff] [blame^] | 114 | 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 115 | 1: MultiByteField(XdslSubcarrierMaskingDownstreamProfile_DownstreamSubcarrierMask1, OctetsAttributeType, 0x8000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 116 | 2: MultiByteField(XdslSubcarrierMaskingDownstreamProfile_DownstreamSubcarrierMask2, OctetsAttributeType, 0x4000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 2), |
| 117 | 3: MultiByteField(XdslSubcarrierMaskingDownstreamProfile_DownstreamSubcarrierMask3, OctetsAttributeType, 0x2000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3), |
| 118 | 4: MultiByteField(XdslSubcarrierMaskingDownstreamProfile_DownstreamSubcarrierMask4, OctetsAttributeType, 0x1000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 4), |
| 119 | 5: ByteField(XdslSubcarrierMaskingDownstreamProfile_MaskValid, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5), |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 120 | }, |
| 121 | Access: CreatedByOlt, |
| 122 | Support: UnknownSupport, |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | // NewXdslSubcarrierMaskingDownstreamProfile (class ID 108) creates the basic |
| 127 | // Managed Entity definition that is used to validate an ME of this type that |
| 128 | // is received from or transmitted to the OMCC. |
| 129 | func NewXdslSubcarrierMaskingDownstreamProfile(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 130 | return NewManagedEntity(*xdslsubcarriermaskingdownstreamprofileBME, params...) |
| 131 | } |