blob: ed2ec3484bfc0a8b823f509eec70e3fc22e74bc4 [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 */
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// MplsPseudowireTerminationPointClassID is the 16-bit ID for the OMCI
29// Managed entity MPLS pseudowire termination point
Chip Boling610117d2021-09-09 11:24:34 -050030const MplsPseudowireTerminationPointClassID = ClassID(333) // 0x014d
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var mplspseudowireterminationpointBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// MplsPseudowireTerminationPoint (Class ID: #333 / 0x014d)
Chip Boling6e27b352020-02-14 09:10:01 -060035// This ME contains the configuration data of a pseudowire whose underlying transport method is
36// MPLS. Instances of this ME are created and deleted by the OLT.
37//
38// Relationships
39// Zero or one instance of this ME is associated with each instance of the pseudowire TP ME.
40//
41// Attributes
42// Managed Entity Id
Chip Boling610117d2021-09-09 11:24:34 -050043// This attribute uniquely identifies each instance of this ME. (R, setbycreate)-(mandatory) (2
44// bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060045//
46// Tp Type
Chip Boling610117d2021-09-09 11:24:34 -050047// This attribute specifies the type of ANI-side TP associated with this-ME.
48//
49// 1 Ethernet flow termination point
50//
51// 2 GEM IW TP
52//
53// 3 TCP/UDP config data
54//
55// 4 MPLS pseudowire termination point
56//
57// NOTE - If this instance of the MPLS PW TP is pointed to by another instance of the MPLS PW TP
58// (i.e., whose TP type-= 4), this instance represents a tunnelled MPLS flow, and the following
59// attributes are not meaningful: MPLS PW direction; MPLS PW uplink label; MPLS PW downlink label;
60// and MPLS PW TC. These attributes should be set to the proper number of 0x00 bytes by the OLT and
61// ignored by the ONU.
62//
Chip Boling6e27b352020-02-14 09:10:01 -060063// (R, W, setbycreate) (mandatory) (1 byte)
64//
65// Tp Pointer
Chip Boling610117d2021-09-09 11:24:34 -050066// This attribute points to the instance of the TP associated with this MPLS PW TP. The type of the
67// associated TP is determined by the TP type attribute. (R, W, setbycreate) (mandatory) (2 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060068//
69// Mpls Label Indicator
Chip Boling610117d2021-09-09 11:24:34 -050070// This attribute specifies the MPLS label stacking situation.
71//
72// 0 Single MPLS labelled
73//
74// 1 Double MPLS labelled
75//
Chip Boling6e27b352020-02-14 09:10:01 -060076// (R, W, setbycreate) (mandatory) (1 byte)
77//
78// Mpls Pw Direction
Chip Boling610117d2021-09-09 11:24:34 -050079// This attribute specifies the inner MPLS direction.
80//
81// 0 Upstream only
82//
83// 1 Downstream only
84//
85// 2 Bidirectional
86//
Chip Boling6e27b352020-02-14 09:10:01 -060087// (R, W, setbycreate) (mandatory) (1 byte)
88//
89// Mpls Pw Uplink Label
Chip Boling610117d2021-09-09 11:24:34 -050090// This attribute specifies the label of the inner MPLS pseudowire upstream. The attribute is not
91// meaningful for unidirectional downstream PWs. (R, W, setbycreate) (mandatory) (4 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060092//
93// Mpls Pw Downlink Label
Chip Boling610117d2021-09-09 11:24:34 -050094// This attribute specifies the label of the inner MPLS pseudowire downstream. The attribute is not
95// meaningful for unidirectional upstream PWs. (R, W, setbycreate) (mandatory) (4 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060096//
97// Mpls Pw Tc
98// NOTE 1 - The TC field was previously known as EXP. Refer to [bIETF-RFC-5462].
99//
Chip Boling610117d2021-09-09 11:24:34 -0500100// This attribute specifies the inner MPLS TC value in the upstream direction. The attribute is not
101// meaningful for unidirectional downstream PWs. (R, W, setbycreate) (mandatory) (1 byte)
102//
Chip Boling6e27b352020-02-14 09:10:01 -0600103// Mpls Tunnel Direction
Chip Boling610117d2021-09-09 11:24:34 -0500104// This attribute specifies the direction of the (outer) MPLS tunnel.
105//
106// 0 Upstream only
107//
108// 1 Downstream only
109//
110// 2 Bidirectional
111//
Chip Boling6e27b352020-02-14 09:10:01 -0600112// (R, W, setbycreate) (mandatory for double-labelled case) (1 byte)
113//
114// Mpls Tunnel Uplink Label
Chip Boling610117d2021-09-09 11:24:34 -0500115// This attribute specifies the (outer) label for the upstream MPLS tunnel. If the MPLS tunnel is
116// downstream only, this attribute should be set to 0. (R, W, setbycreate) (mandatory for double-
117// labelled case) (4 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600118//
119// Mpls Tunnel Downlink Label
Chip Boling610117d2021-09-09 11:24:34 -0500120// This attribute specifies the (outer) label for the downstream MPLS tunnel. If the MPLS tunnel is
121// upstream only, this attribute should be set to 0. (R, W, setbycreate) (mandatory for double-
122// labelled case) (4 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600123//
124// Mpls Tunnel Tc
Chip Boling610117d2021-09-09 11:24:34 -0500125// This attribute specifies the TC value of the upstream MPLS tunnel. If the MPLS tunnel is
126// downstream only, this attribute should be set to 0. (R, W, setbycreate) (mandatory for double
127// MPLS labelled case) (1 byte)
128//
Chip Boling6e27b352020-02-14 09:10:01 -0600129// NOTE 2 - The TC field was previously known as EXP. Refer to [bIETF-RFC-5462].
130//
131// Pseudowire Type
Chip Boling610117d2021-09-09 11:24:34 -0500132// This attribute specifies the emulated service to be carried over this PW. The values are from
133// [IETF RFC 4446].
134//
135// 2 ATM AAL5 SDU VCC transport
136//
137// 3 ATM transparent cell transport
138//
139// 5 Ethernet
140//
141// 9 ATM n-to-one VCC cell transport
142//
143// 10 ATM n-to-one VPC cell transport
144//
145// 12 ATM one-to-one VCC cell mode
146//
147// 13 ATM one-to-one VPC cell mode
148//
149// 14 ATM AAL5 PDU VCC transport
150//
151// All other values are reserved.
152//
Chip Boling6e27b352020-02-14 09:10:01 -0600153// (R, W, setbycreate) (mandatory) (2 bytes)
154//
155// Pseudowire Control Word Preference
Chip Boling610117d2021-09-09 11:24:34 -0500156// When set to true, this Boolean attribute specifies that a control word is to be sent with each
157// packet. Some PW types mandate the use of a control word in any event. In such cases, the value
158// configured for this attribute has no effect on the presence of the control word. (R, W,
159// setbycreate) (optional) (1 byte)
Chip Boling6e27b352020-02-14 09:10:01 -0600160//
161// Administrative State
Chip Boling610117d2021-09-09 11:24:34 -0500162// This attribute locks (1) and unlocks (0) the functions performed by the MPLS pseudowire TP.
163// Administrative state is further described in clause-A.1.6. (R,-W) (optional) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -0600164//
165// Operational State
Chip Boling610117d2021-09-09 11:24:34 -0500166// This attribute reports whether the ME is currently capable of performing its function. Valid
167// values are enabled (0) and disabled (1). (R) (optional) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -0600168//
169type MplsPseudowireTerminationPoint struct {
170 ManagedEntityDefinition
171 Attributes AttributeValueMap
172}
173
174func init() {
175 mplspseudowireterminationpointBME = &ManagedEntityDefinition{
176 Name: "MplsPseudowireTerminationPoint",
177 ClassID: 333,
178 MessageTypes: mapset.NewSetWith(
179 Create,
180 Delete,
181 Get,
182 Set,
183 ),
184 AllowedAttributeMask: 0xfffe,
185 AttributeDefinitions: AttributeDefinitionMap{
186 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
187 1: ByteField("TpType", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
188 2: Uint16Field("TpPointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
189 3: ByteField("MplsLabelIndicator", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
190 4: ByteField("MplsPwDirection", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
191 5: Uint32Field("MplsPwUplinkLabel", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
192 6: Uint32Field("MplsPwDownlinkLabel", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
193 7: ByteField("MplsPwTc", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
194 8: ByteField("MplsTunnelDirection", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
195 9: Uint32Field("MplsTunnelUplinkLabel", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
196 10: Uint32Field("MplsTunnelDownlinkLabel", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
197 11: ByteField("MplsTunnelTc", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 11),
198 12: Uint16Field("PseudowireType", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 12),
199 13: ByteField("PseudowireControlWordPreference", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13),
200 14: ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14),
201 15: ByteField("OperationalState", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read), true, true, false, 15),
202 },
203 Access: CreatedByOlt,
204 Support: UnknownSupport,
205 }
206}
207
208// NewMplsPseudowireTerminationPoint (class ID 333) creates the basic
209// Managed Entity definition that is used to validate an ME of this type that
210// is received from or transmitted to the OMCC.
211func NewMplsPseudowireTerminationPoint(params ...ParamData) (*ManagedEntity, OmciErrors) {
212 return NewManagedEntity(*mplspseudowireterminationpointBME, params...)
213}