blob: 3b31ff88ddd9e58e85b6807197ea6efe72de83df [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 */
Chip Boling2d51f052021-02-09 09:04:15 -060017/*
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// XdslPsdMaskProfileClassID is the 16-bit ID for the OMCI
29// Managed entity xDSL PSD mask profile
Chip Boling610117d2021-09-09 11:24:34 -050030const XdslPsdMaskProfileClassID = ClassID(110) // 0x006e
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var xdslpsdmaskprofileBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// XdslPsdMaskProfile (Class ID: #110 / 0x006e)
Chip Boling6e27b352020-02-14 09:10:01 -060035// This ME contains a PSD mask profile for an xDSL UNI. An instance of this ME is created and
36// 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,
45// setbycreate) (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060046//
47// Psd Mask Table
Chip Boling610117d2021-09-09 11:24:34 -050048// This attribute is a table that defines the PSD mask applicable at the U-C2 reference point
49// (downstream) or the U-R2 reference point (upstream). This mask may impose PSD restrictions in
50// addition to the limit PSD mask defined in the relevant Recommendations ([ITUT G.992.3], [ITUT
51// G.992.5], [ITUT-G.993.2]).
52//
53// NOTE - In [ITUT G.997.1], this attribute is called PSDMASKds (downstream) and PSDMASKus
54// (upstream). In [ITUT G.993.2], this attribute is called MIBMASKds (downstream) and MIBMASKus
55// (upstream). The ITU-T G.993.2 MIBMASKus does not include breakpoints to shape US0.
56//
57// The PSD mask is specified through a set of breakpoints. Each breakpoint comprises a 2-byte
58// subcarrier index t, with a subcarrier spacing of 4.3125-kHz, and a 1-byte PSD mask level at that
59// subcarrier. The set of breakpoints can then be represented as [(t1, PSD1), (t2, PSD2), ..., (tN,
60// PSDN)]. The PSD mask level is coded as 0 (0.0-dBm/Hz) to 190 (-95.0-dBm/Hz), in steps of 0.5
61// dB.
62//
63// The maximum number of downstream breakpoints is 32. In the upstream direction, the maximum
64// number of breakpoints is 4 for [ITU-T G.992.3] and 16 for [ITU-T G.993.2]. The requirements for
65// a valid set of breakpoints are defined in the relevant Recommendations ([ITUT G.992.3],
66// [ITUT-G.992.5], [ITUT G.993.2]).
67//
68// Each table entry in this attribute comprises:
69//
70// - an entry number field (1-byte, first entry numbered 1);
71//
72// - a subcarrier index field, denoted t (2-bytes);
73//
74// - a PSD mask level field (1-byte).
75//
76// By default, the PSD mask table is empty. Setting a subcarrier entry with a valid PSD mask level
77// implies insertion into the table or replacement of an existing entry. Setting an entry's PSD
78// mask level to 0xFF implies deletion from the table.
79//
Chip Boling6e27b352020-02-14 09:10:01 -060080// (R,-W) (mandatory) (4 * N bytes where N is the number of breakpoints)
81//
82// Mask Valid
Chip Boling610117d2021-09-09 11:24:34 -050083// This Boolean attribute controls and reports the status of the PSD mask attribute.
84//
85// As a status report, the value false indicates that the PSD mask represented in this ME has not
86// been impressed on the DSL equipment. The value true indicates that the PSD mask represented in
87// this ME has been impressed on the DSL equipment.
88//
89// This attribute behaves as follows.
90//
91// o If the OLT changes any of the PSD mask table entries or sets mask valid false, then mask valid
92// is false.
93//
94// o If mask valid is false and the OLT sets mask valid true, the ONU impresses the PSD mask data
95// on the DSL equipment.
96//
Chip Boling6e27b352020-02-14 09:10:01 -060097// (R,-W) (mandatory) (1-byte)
98//
99type XdslPsdMaskProfile struct {
100 ManagedEntityDefinition
101 Attributes AttributeValueMap
102}
103
Chip Boling8cdd6392022-01-27 08:43:37 -0600104// Attribute name constants
105
106const XdslPsdMaskProfile_PsdMaskTable = "PsdMaskTable"
107const XdslPsdMaskProfile_MaskValid = "MaskValid"
108
Chip Boling6e27b352020-02-14 09:10:01 -0600109func init() {
110 xdslpsdmaskprofileBME = &ManagedEntityDefinition{
111 Name: "XdslPsdMaskProfile",
Chip Boling8cdd6392022-01-27 08:43:37 -0600112 ClassID: XdslPsdMaskProfileClassID,
Chip Boling6e27b352020-02-14 09:10:01 -0600113 MessageTypes: mapset.NewSetWith(
114 Create,
115 Delete,
116 Get,
117 GetNext,
118 Set,
Chip Boling2d51f052021-02-09 09:04:15 -0600119 SetTable,
Chip Boling6e27b352020-02-14 09:10:01 -0600120 ),
121 AllowedAttributeMask: 0xc000,
122 AttributeDefinitions: AttributeDefinitionMap{
Chip Boling8cdd6392022-01-27 08:43:37 -0600123 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
124 1: TableField(XdslPsdMaskProfile_PsdMaskTable, TableAttributeType, 0x8000, TableInfo{nil, 4}, mapset.NewSetWith(Read, Write), false, false, false, 1),
125 2: ByteField(XdslPsdMaskProfile_MaskValid, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
Chip Boling6e27b352020-02-14 09:10:01 -0600126 },
127 Access: CreatedByOlt,
128 Support: UnknownSupport,
129 }
130}
131
132// NewXdslPsdMaskProfile (class ID 110) creates the basic
133// Managed Entity definition that is used to validate an ME of this type that
134// is received from or transmitted to the OMCC.
135func NewXdslPsdMaskProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
136 return NewManagedEntity(*xdslpsdmaskprofileBME, params...)
137}