blob: 55aee0df707345a1b1c8daf59c5a23397266aec7 [file] [log] [blame]
Andrea Campanella10426e22021-10-15 17:58:04 +02001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Elia Battiston9bfe1102022-02-03 10:38:03 +01004 *
Andrea Campanella10426e22021-10-15 17:58:04 +02005 * 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 Battiston9bfe1102022-02-03 10:38:03 +01008 *
Andrea Campanella10426e22021-10-15 17:58:04 +02009 * http://www.apache.org/licenses/LICENSE-2.0
Elia Battiston9bfe1102022-02-03 10:38:03 +010010 *
Andrea Campanella10426e22021-10-15 17:58:04 +020011 * 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// XdslDownstreamRfiBandsProfileClassID is the 16-bit ID for the OMCI
29// Managed entity xDSL downstream RFI bands profile
30const XdslDownstreamRfiBandsProfileClassID = ClassID(111) // 0x006f
31
32var xdsldownstreamrfibandsprofileBME *ManagedEntityDefinition
33
34// XdslDownstreamRfiBandsProfile (Class ID: #111 / 0x006f)
35// This ME contains the downstream RFI bands profile for an xDSL UNI. Instances of this ME are
36// 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
44// This attribute uniquely identifies each instance of this ME. The value 0 is reserved. (R,
45// setbycreate) (mandatory) (2-bytes)
46//
47// Downstream Rfi Bands Table
48// The RFIBANDS attribute is a table where each entry comprises:
49//
50// o an entry number field (1-byte, first entry numbered 1);
51//
52// o subcarrier index 1 field (2-bytes);
53//
54// o subcarrier index 2 field (2-bytes).
55//
56// For [ITU-T G.992.5], this configuration attribute defines the subset of downstream PSD mask
57// breakpoints, as specified in the downstream PSD mask, to be used to notch an RFI band. This
58// subset consists of couples of consecutive subcarrier indices belonging to breakpoints: [ti; ti-+
59// 1], corresponding to the low level of the notch. Interpolation around these points is defined in
60// [ITUT G.992.5].
61//
62// For [ITU-T G.993.2], this attribute defines the bands where the PSD is to be reduced as
63// specified in clause 7.2.1.2 of [ITUT G.993.2]. Each band is represented by start and stop
64// subcarrier indices with a subcarrier spacing of 4.3125-kHz. Up to 16 bands may be specified.
65// This attribute defines the RFI bands for both upstream and downstream directions.
66//
67// Entries have the default value 0 for both subcarrier index 1 and subcarrier index-2. Setting an
68// entry with a non-zero subcarrier index 1 and subcarrier index-2 implies insertion into the table
69// or replacement of an existing entry. Setting an entry's subcarrier index 1 and subcarrier index
70// 2 to 0 implies deletion from the table, if present.
71//
72// (R,-W) (mandatory for [ITU-T G.992.5], [ITU-T G.993.2]) (5 * N bytes where N is the number of
73// RFI bands)
74//
75// Bands Valid
76// This Boolean attribute controls and reports the operational status of the downstream RFI bands
77// table.
78//
79// If this attribute is true, the downstream RFI bands table has been impressed on the DSL
80// equipment.
81//
82// If this attribute is false, the downstream RFI bands table has not been impressed on the DSL
83// equipment. The default value is false.
84//
85// This attribute can be modified by the ONU and OLT, as follows.
86//
87// o If the OLT changes any of the RFI bands table entries or sets bands valid false, then bands
88// valid is false.
89//
90// o If bands valid is false and OLT sets bands valid true, the ONU impresses the downstream RFI
91// bands data on to the DSL equipment.
92//
93// (R,-W) (mandatory) (1-byte)
94//
95type XdslDownstreamRfiBandsProfile struct {
96 ManagedEntityDefinition
97 Attributes AttributeValueMap
98}
99
Elia Battiston9bfe1102022-02-03 10:38:03 +0100100// Attribute name constants
101
102const XdslDownstreamRfiBandsProfile_DownstreamRfiBandsTable = "DownstreamRfiBandsTable"
103const XdslDownstreamRfiBandsProfile_BandsValid = "BandsValid"
104
Andrea Campanella10426e22021-10-15 17:58:04 +0200105func init() {
106 xdsldownstreamrfibandsprofileBME = &ManagedEntityDefinition{
107 Name: "XdslDownstreamRfiBandsProfile",
Elia Battiston9bfe1102022-02-03 10:38:03 +0100108 ClassID: XdslDownstreamRfiBandsProfileClassID,
Andrea Campanella10426e22021-10-15 17:58:04 +0200109 MessageTypes: mapset.NewSetWith(
110 Create,
111 Delete,
112 Get,
113 GetNext,
114 Set,
115 SetTable,
116 ),
117 AllowedAttributeMask: 0xc000,
118 AttributeDefinitions: AttributeDefinitionMap{
Elia Battiston9bfe1102022-02-03 10:38:03 +0100119 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
120 1: TableField(XdslDownstreamRfiBandsProfile_DownstreamRfiBandsTable, TableAttributeType, 0x8000, TableInfo{nil, 5}, mapset.NewSetWith(Read, Write), false, false, false, 1),
121 2: ByteField(XdslDownstreamRfiBandsProfile_BandsValid, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
Andrea Campanella10426e22021-10-15 17:58:04 +0200122 },
123 Access: CreatedByOlt,
124 Support: UnknownSupport,
125 }
126}
127
128// NewXdslDownstreamRfiBandsProfile (class ID 111) creates the basic
129// Managed Entity definition that is used to validate an ME of this type that
130// is received from or transmitted to the OMCC.
131func NewXdslDownstreamRfiBandsProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
132 return NewManagedEntity(*xdsldownstreamrfibandsprofileBME, params...)
133}