blob: 0cd5ec462582ae8868f80d2078e6c4a2bfc637bb [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 */
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// PwAtmConfigurationDataClassID is the 16-bit ID for the OMCI
29// Managed entity PW ATM configuration data
Chip Boling610117d2021-09-09 11:24:34 -050030const PwAtmConfigurationDataClassID = ClassID(337) // 0x0151
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var pwatmconfigurationdataBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// PwAtmConfigurationData (Class ID: #337 / 0x0151)
Chip Boling6e27b352020-02-14 09:10:01 -060035// This ME contains generic configuration data for an ATM pseudowire. Definitions of attributes are
36// from PW-ATM-MIB [IETF RFC 5605]. Instances of this ME are created and deleted by the OLT.
37//
38// Relationships
39// An instance of this ME is associated with an instance of the MPLS pseudowire TP ME with a
40// pseudowire type attribute equal to one of the following.//// 2 ATM AAL5 SDU VCC transport//// 3 ATM transparent cell transport//// 9 ATM n-to-one VCC cell transport//// 10 ATM n-to-one VPC cell transport//// 12 ATM one-to-one VCC cell mode//// 13 ATM one-to-one VPC cell mode//// 14 ATM AAL5 PDU VCC transport//// Alternatively, an instance of this ME may be associated with an Ethernet flow TP or a TCP/UDP
41// config data ME, depending on the transport layer of the pseudowire.
42//
43// Attributes
44// Managed Entity Id
Chip Boling610117d2021-09-09 11:24:34 -050045// This attribute uniquely identifies each instance of this ME. (R, setbycreate)-(mandatory) (2
46// bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060047//
48// Tp Type
Chip Boling610117d2021-09-09 11:24:34 -050049// This attribute specifies the type of the underlying transport layer. (R, W, setbycreate)
50// (mandatory) (1 byte)
51//
52// 0 MPLS pseudowire termination point
53//
54// 1 Ethernet flow termination point
55//
Chip Boling6e27b352020-02-14 09:10:01 -060056// 2 TCP/UDP config data
57//
58// Transport Tp Pointer
Chip Boling610117d2021-09-09 11:24:34 -050059// This attribute points to an associated instance of the transport layer TP, whose type is
60// specified by the TP type attribute. (R, W, setbycreate) (mandatory) (2 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060061//
62// Pptp Atm Uni Pointer
Chip Boling610117d2021-09-09 11:24:34 -050063// This attribute points to an associated instance of the ITU-T G.983.2 PPTP ATM UNI. Refer to
64// [ITUT G.983.2] for the definition of the target ME. (R, W, setbycreate) (mandatory) (2 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060065//
66// Max C Ell C Oncatenation
67// Max cell concatenation: This attribute specifies the maximum number of ATM cells that can be
68// concatenated into one PW packet in the upstream direction. (R, W, setbycreate) (mandatory) (2
69// bytes)
70//
71// Far End M Ax C Ell C Oncatenation
72// Far-end max cell concatenation: This attribute specifies the maximum number of ATM cells that
73// can be concatenated into one PW packet as provisioned at the far end. This attribute may be used
74// for error checking of downstream traffic. The value 0 specifies that the ONU uses its internal
75// default. (R, W, set-by-create) (optional) (2 bytes)
76//
77// Atm Cell Loss Priority Clp Qos Mapping
Chip Boling610117d2021-09-09 11:24:34 -050078// ATM cell loss priority (CLP) QoS mapping: This attribute specifies whether the CLP bits should
79// be considered when setting the value in the QoS fields of the encapsulating protocol (e.g., TC
80// fields of the MPLS label stack).
81//
82// 1 ATM CLP bits mapping to QoS fields of the encapsulating protocol
83//
84// 2 Not applicable
85//
Chip Boling6e27b352020-02-14 09:10:01 -060086// The value 0 specifies that the ONU uses its internal default. (R, W, setbycreate) (optional) (1
87// byte)
88//
89// Timeout Mode
90// The value 0 specifies that the ONU uses its internal default. (R, W, setbycreate) (optional) (1
91// byte)
92//
Chip Boling610117d2021-09-09 11:24:34 -050093// This attribute specifies whether a packet is transmitted in the upstream direction based on
94// timeout expiration for collecting cells. The actual handling of the timeout is implementation
95// specific; as such, this attribute may be changed at any time with proper consideration of the
96// traffic disruption effect.
97//
98// 1 Disabled. The ONU does not generate packets based on timeout cells.
99//
100// 2 Enabled. The ONU generates packets based on timeout cells.
101//
Chip Boling6e27b352020-02-14 09:10:01 -0600102// Pw Atm Mapping Table
Chip Boling610117d2021-09-09 11:24:34 -0500103// 12 ATM one-to-one VCC cell mode
104//
105// 13 ATM one-to-one VPC cell mode
106//
107// 14 ATM AAL5 PDU VCC transport
108//
109// Each entry contains:
110//
111// Entry number: (1-byte), the index of this row. A set operation with all fields zero has the
112// effect of clearing the table. A set operation with a non-zero entry number and all other fields
113// zero, has the effect of deleting one row.
114//
115// Upstream VPI: (2 bytes)
116//
117// The VPI value of this ATM PW at the UNI. When pseudowire type-= ATM transparent cell transport
118// (3), this field is ignored.
119//
120// Upstream VCI: (2 bytes)
121//
122// The VCI value of this ATM PW at the UNI. When pseudowire type-= ATM transparent cell transport
123// (3), or in virtual path (VP) cases, this field is ignored.
124//
125// Upstream traffic descriptor profile pointer: (2 bytes)
126//
127// A pointer to an instance of an ITU-T G.983.2 traffic descriptor profile ME that contains the
128// traffic parameters used for the ATM upstream traffic. Refer to clause 7.5.2 of [ITUT-G.983.2]
129// for the definition of this class of MEs. A null pointer indicates BE.
130//
131// Upstream mapped VPI: (2 bytes)
132//
133// The VPI value of the upstream MPLS ATM PW. This field is valid when the pseudowire type is as
134// follows.
135//
136// 9 ATM n-to-one VCC cell transport
137//
138// 10 ATM n-to-one VPC cell transport
139//
140// 12 ATM one-to-one VCC cell mode
141//
142// 13 ATM one-to-one VPC cell mode
143//
144// This field is not used for other pseudowire types.
145//
146// Upstream mapped VCI: (2 bytes)
147//
148// The VCI value of the upstream MPLS ATM PW. This field is valid when the pseudowire type is as
149// follows.
150//
151// 9 ATM n-to-one VCC cell transport
152//
153// 10 ATM n-to-one VPC cell transport
154//
155// 12 ATM one-to-one VCC cell mode
156//
157// 13 ATM one-to-one VPC cell mode
158//
159// This field is not used for other pseudowire types.
160//
161// Downstream VPI: (2 bytes)
162//
163// The downstream VPI value of this MPLS ATM PW. When pseudowire type-= ATM transparent cell
164// transport (3), this field is ignored.
165//
166// Downstream VCI: (2 bytes)
167//
168// The downstream VCI value of this MPLS ATM PW. When pseudowire type-= ATM transparent cell
169// transport (3) or in the VP case, this field is ignored.
170//
171// Downstream traffic descriptor profile pointer: (2 bytes)
172//
173// A pointer to an instance of an ITU-T G.983.2 traffic descriptor profile ME that contains the
174// traffic parameters used for the ATM downstream traffic. Refer to clause 7.5.2 of [ITUT-G.983.2]
175// for definition of this class of MEs. A null pointer indicates BE.
176//
177// Downstream mapped VPI: (2 bytes)
178//
179// The VPI value of this ATM PW at the UNI. This field is valid when the pseudowire type is as
180// follows.
181//
182// 9 ATM n-to-one VCC cell transport
183//
184// 10 ATM n-to-one VPC cell transport
185//
186// 12 ATM one-to-one VCC cell mode
187//
188// 13 ATM one-to-one VPC cell mode
189//
190// This field is not used for other pseudowire types.
191//
192// Downstream mapped VCI: (2 bytes)
193//
194// The VCI value of this ATM PW at the UNI. This field is valid when the pseudowire type is as
195// follows.
196//
197// 9 ATM n-to-one VCC cell transport
198//
199// 10 ATM n-to-one VPC cell transport
200//
201// 12 ATM one-to-one VCC cell mode
202//
203// 13 ATM one-to-one VPC cell mode
204//
205// This field is not used for other pseudowire types.
206//
Chip Boling6e27b352020-02-14 09:10:01 -0600207// (R,-W) (mandatory) (21N bytes, where N is the number of entries in the list)
208//
Chip Boling610117d2021-09-09 11:24:34 -0500209// This attribute lists ATM VPI/VCI mapping entries in both the upstream and downstream directions.
210// In the upstream direction, ATM cells that match no entry's upstream VPI (and conditionally VCI)
211// values are discarded; conversely in the downstream direction. Upon ME instantiation, the ONU
212// sets this attribute to an empty table, which discards all cells in both directions.
213//
214// The table can contain up to N entries when the pseudowire type is equal to one of the following:
215//
216// 9 ATM n-to-one VCC cell transport
217//
218// 10 ATM n-to-one VPC cell transport
219//
220// The table contains only one entry when the pseudowire type is equal to one of the following.
221//
222// 2 ATM AAL5 SDU VCC transport
223//
224// 3 ATM transparent cell transport
225//
Chip Boling6e27b352020-02-14 09:10:01 -0600226type PwAtmConfigurationData struct {
227 ManagedEntityDefinition
228 Attributes AttributeValueMap
229}
230
231func init() {
232 pwatmconfigurationdataBME = &ManagedEntityDefinition{
233 Name: "PwAtmConfigurationData",
234 ClassID: 337,
235 MessageTypes: mapset.NewSetWith(
236 Create,
237 Delete,
238 Get,
239 GetNext,
240 Set,
Chip Boling2d51f052021-02-09 09:04:15 -0600241 SetTable,
Chip Boling6e27b352020-02-14 09:10:01 -0600242 ),
243 AllowedAttributeMask: 0xff00,
244 AttributeDefinitions: AttributeDefinitionMap{
245 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
246 1: ByteField("TpType", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
247 2: Uint16Field("TransportTpPointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
248 3: Uint16Field("PptpAtmUniPointer", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
249 4: Uint16Field("MaxCEllCOncatenation", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
250 5: Uint16Field("FarEndMAxCEllCOncatenation", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
251 6: ByteField("AtmCellLossPriorityClpQosMapping", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 6),
252 7: ByteField("TimeoutMode", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 7),
253 8: TableField("PwAtmMappingTable", TableAttributeType, 0x0100, TableInfo{nil, 21}, mapset.NewSetWith(Read, Write), false, false, false, 8),
254 },
255 Access: CreatedByOlt,
256 Support: UnknownSupport,
257 }
258}
259
260// NewPwAtmConfigurationData (class ID 337) creates the basic
261// Managed Entity definition that is used to validate an ME of this type that
262// is received from or transmitted to the OMCC.
263func NewPwAtmConfigurationData(params ...ParamData) (*ManagedEntity, OmciErrors) {
264 return NewManagedEntity(*pwatmconfigurationdataBME, params...)
265}