blob: 05e7d550f197d03af8de65b2fc357b8e38b98249 [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// XdslSubcarrierMaskingDownstreamProfileClassID is the 16-bit ID for the OMCI
29// Managed entity xDSL subcarrier masking downstream profile
Chip Boling610117d2021-09-09 11:24:34 -050030const XdslSubcarrierMaskingDownstreamProfileClassID = ClassID(108) // 0x006c
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var xdslsubcarriermaskingdownstreamprofileBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// XdslSubcarrierMaskingDownstreamProfile (Class ID: #108 / 0x006c)
Chip Boling6e27b352020-02-14 09:10:01 -060035// 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 Boling610117d2021-09-09 11:24:34 -050044// 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 Boling6e27b352020-02-14 09:10:01 -060056//
57// Downstream Subcarrier Mask 1
Chip Boling610117d2021-09-09 11:24:34 -050058// Subcarriers 1 to 128. (R,-W, set-by-create) (mandatory) (16-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060059//
60// Downstream Subcarrier Mask 2
Chip Boling610117d2021-09-09 11:24:34 -050061// Subcarriers 129 to 256. (R,-W) (mandatory for modems that support NSCds-> 128) (16-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060062//
63// Downstream Subcarrier Mask 3
Chip Boling610117d2021-09-09 11:24:34 -050064// Subcarriers 257 to 384. (R,-W) (mandatory for modems that support NSCds-> 256) (16-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060065//
66// Downstream Subcarrier Mask 4
Chip Boling610117d2021-09-09 11:24:34 -050067// Subcarriers 385 to 512. (R,-W) (mandatory for modems that support NSCds-> 384) (16-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060068//
69// Mask Valid
Chip Boling610117d2021-09-09 11:24:34 -050070// 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 Boling6e27b352020-02-14 09:10:01 -060087// (R,-W) (mandatory) (1-byte)
88//
89type XdslSubcarrierMaskingDownstreamProfile struct {
90 ManagedEntityDefinition
91 Attributes AttributeValueMap
92}
93
94func 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.
121func NewXdslSubcarrierMaskingDownstreamProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
122 return NewManagedEntity(*xdslsubcarriermaskingdownstreamprofileBME, params...)
123}