blob: 3b31ff88ddd9e58e85b6807197ea6efe72de83df [file] [log] [blame]
mpagenko836a1fd2021-11-01 16:12:42 +00001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00004 *
mpagenko836a1fd2021-11-01 16:12:42 +00005 * 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
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00008 *
mpagenko836a1fd2021-11-01 16:12:42 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
mpagenko836a1fd2021-11-01 16:12:42 +000011 * 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 */
17/*
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
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
30const XdslPsdMaskProfileClassID = ClassID(110) // 0x006e
31
32var xdslpsdmaskprofileBME *ManagedEntityDefinition
33
34// XdslPsdMaskProfile (Class ID: #110 / 0x006e)
35// 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
44// This attribute uniquely identifies each instance of this ME. The value 0 is reserved. (R,
45// setbycreate) (mandatory) (2-bytes)
46//
47// Psd Mask Table
48// 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//
80// (R,-W) (mandatory) (4 * N bytes where N is the number of breakpoints)
81//
82// Mask Valid
83// 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//
97// (R,-W) (mandatory) (1-byte)
98//
99type XdslPsdMaskProfile struct {
100 ManagedEntityDefinition
101 Attributes AttributeValueMap
102}
103
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000104// Attribute name constants
105
106const XdslPsdMaskProfile_PsdMaskTable = "PsdMaskTable"
107const XdslPsdMaskProfile_MaskValid = "MaskValid"
108
mpagenko836a1fd2021-11-01 16:12:42 +0000109func init() {
110 xdslpsdmaskprofileBME = &ManagedEntityDefinition{
111 Name: "XdslPsdMaskProfile",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000112 ClassID: XdslPsdMaskProfileClassID,
mpagenko836a1fd2021-11-01 16:12:42 +0000113 MessageTypes: mapset.NewSetWith(
114 Create,
115 Delete,
116 Get,
117 GetNext,
118 Set,
119 SetTable,
120 ),
121 AllowedAttributeMask: 0xc000,
122 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000123 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),
mpagenko836a1fd2021-11-01 16:12:42 +0000126 },
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}