blob: 213236b50a9e340ae6bc7cbf202308846e2685f3 [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 */
Andrea Campanella7167ebb2020-02-24 09:56:38 +010017 /*
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
30const MplsPseudowireTerminationPointClassID ClassID = ClassID(333)
31
32var mplspseudowireterminationpointBME *ManagedEntityDefinition
33
34// MplsPseudowireTerminationPoint (class ID #333)
35// 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
43// Managed entity ID: This attribute uniquely identifies each instance of this ME. (R,
44// setbycreate)-(mandatory) (2 bytes)
45//
46// Tp Type
47// (R, W, setbycreate) (mandatory) (1 byte)
48//
49// Tp Pointer
50// TP pointer: This attribute points to the instance of the TP associated with this MPLS PW TP. The
51// type of the associated TP is determined by the TP type attribute. (R, W, setbycreate)
52// (mandatory) (2 bytes)
53//
54// Mpls Label Indicator
55// (R, W, setbycreate) (mandatory) (1 byte)
56//
57// Mpls Pw Direction
58// (R, W, setbycreate) (mandatory) (1 byte)
59//
60// Mpls Pw Uplink Label
61// MPLS PW uplink label: This attribute specifies the label of the inner MPLS pseudowire upstream.
62// The attribute is not meaningful for unidirectional downstream PWs. (R, W, setbycreate)
63// (mandatory) (4 bytes)
64//
65// Mpls Pw Downlink Label
66// MPLS PW downlink label: This attribute specifies the label of the inner MPLS pseudowire
67// downstream. The attribute is not meaningful for unidirectional upstream PWs. (R, W, setbycreate)
68// (mandatory) (4 bytes)
69//
70// Mpls Pw Tc
71// NOTE 1 - The TC field was previously known as EXP. Refer to [bIETF-RFC-5462].
72//
73// Mpls Tunnel Direction
74// (R, W, setbycreate) (mandatory for double-labelled case) (1 byte)
75//
76// Mpls Tunnel Uplink Label
77// MPLS tunnel uplink label: This attribute specifies the (outer) label for the upstream MPLS
78// tunnel. If the MPLS tunnel is downstream only, this attribute should be set to 0. (R, W,
79// setbycreate) (mandatory for double-labelled case) (4 bytes)
80//
81// Mpls Tunnel Downlink Label
82// MPLS tunnel downlink label: This attribute specifies the (outer) label for the downstream MPLS
83// tunnel. If the MPLS tunnel is upstream only, this attribute should be set to 0. (R, W,
84// setbycreate) (mandatory for double-labelled case) (4 bytes)
85//
86// Mpls Tunnel Tc
87// NOTE 2 - The TC field was previously known as EXP. Refer to [bIETF-RFC-5462].
88//
89// Pseudowire Type
90// (R, W, setbycreate) (mandatory) (2 bytes)
91//
92// Pseudowire Control Word Preference
93// Pseudowire control word preference: When set to true, this Boolean attribute specifies that a
94// control word is to be sent with each packet. Some PW types mandate the use of a control word in
95// any event. In such cases, the value configured for this attribute has no effect on the presence
96// of the control word. (R, W, setbycreate) (optional) (1 byte)
97//
98// Administrative State
99// Administrative state: This attribute locks (1) and unlocks (0) the functions performed by the
100// MPLS pseudowire TP. Administrative state is further described in clause-A.1.6. (R,-W) (optional)
101// (1-byte)
102//
103// Operational State
104// Operational state: This attribute reports whether the ME is currently capable of performing its
105// function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
106//
107type MplsPseudowireTerminationPoint struct {
108 ManagedEntityDefinition
109 Attributes AttributeValueMap
110}
111
112func init() {
113 mplspseudowireterminationpointBME = &ManagedEntityDefinition{
114 Name: "MplsPseudowireTerminationPoint",
115 ClassID: 333,
116 MessageTypes: mapset.NewSetWith(
117 Create,
118 Delete,
119 Get,
120 Set,
121 ),
122 AllowedAttributeMask: 0xfffe,
123 AttributeDefinitions: AttributeDefinitionMap{
124 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
125 1: ByteField("TpType", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
126 2: Uint16Field("TpPointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
127 3: ByteField("MplsLabelIndicator", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
128 4: ByteField("MplsPwDirection", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
129 5: Uint32Field("MplsPwUplinkLabel", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
130 6: Uint32Field("MplsPwDownlinkLabel", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
131 7: ByteField("MplsPwTc", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
132 8: ByteField("MplsTunnelDirection", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
133 9: Uint32Field("MplsTunnelUplinkLabel", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
134 10: Uint32Field("MplsTunnelDownlinkLabel", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
135 11: ByteField("MplsTunnelTc", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 11),
136 12: Uint16Field("PseudowireType", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 12),
137 13: ByteField("PseudowireControlWordPreference", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13),
138 14: ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14),
139 15: ByteField("OperationalState", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read), true, true, false, 15),
140 },
141 Access: CreatedByOlt,
142 Support: UnknownSupport,
143 }
144}
145
146// NewMplsPseudowireTerminationPoint (class ID 333) creates the basic
147// Managed Entity definition that is used to validate an ME of this type that
148// is received from or transmitted to the OMCC.
149func NewMplsPseudowireTerminationPoint(params ...ParamData) (*ManagedEntity, OmciErrors) {
150 return NewManagedEntity(*mplspseudowireterminationpointBME, params...)
151}