blob: 05390c1a7dc41421a71ad71011e4b9e23c7901fc [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
Chip Boling8cdd6392022-01-27 08:43:37 -06004 *
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
Chip Boling8cdd6392022-01-27 08:43:37 -06008 *
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Chip Boling8cdd6392022-01-27 08:43:37 -060010 *
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
Chip Boling8cdd6392022-01-27 08:43:37 -060094// Attribute name constants
95
96const XdslSubcarrierMaskingDownstreamProfile_DownstreamSubcarrierMask1 = "DownstreamSubcarrierMask1"
97const XdslSubcarrierMaskingDownstreamProfile_DownstreamSubcarrierMask2 = "DownstreamSubcarrierMask2"
98const XdslSubcarrierMaskingDownstreamProfile_DownstreamSubcarrierMask3 = "DownstreamSubcarrierMask3"
99const XdslSubcarrierMaskingDownstreamProfile_DownstreamSubcarrierMask4 = "DownstreamSubcarrierMask4"
100const XdslSubcarrierMaskingDownstreamProfile_MaskValid = "MaskValid"
101
Chip Boling6e27b352020-02-14 09:10:01 -0600102func init() {
103 xdslsubcarriermaskingdownstreamprofileBME = &ManagedEntityDefinition{
104 Name: "XdslSubcarrierMaskingDownstreamProfile",
Chip Boling8cdd6392022-01-27 08:43:37 -0600105 ClassID: XdslSubcarrierMaskingDownstreamProfileClassID,
Chip Boling6e27b352020-02-14 09:10:01 -0600106 MessageTypes: mapset.NewSetWith(
107 Create,
108 Delete,
109 Get,
110 Set,
111 ),
112 AllowedAttributeMask: 0xf800,
113 AttributeDefinitions: AttributeDefinitionMap{
Chip Boling8cdd6392022-01-27 08:43:37 -0600114 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),
Chip Boling6e27b352020-02-14 09:10:01 -0600120 },
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.
129func NewXdslSubcarrierMaskingDownstreamProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
130 return NewManagedEntity(*xdslsubcarriermaskingdownstreamprofileBME, params...)
131}