blob: 25f33051b1835a227ef7d59f7a29454af48ffdf2 [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
8 * Unless required by applicable law or agreed to in writing, software
9 * distributed under the License is distributed on an "AS IS" BASIS,
10 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 * See the License for the specific language governing permissions and
12 * limitations under the License.
13 */
14/*
15 * NOTE: This file was generated, manual edits will be overwritten!
16 *
17 * Generated by 'goCodeGenerator.py':
18 * https://github.com/cboling/OMCI-parser/README.md
19 */
20package generated
21
22import "github.com/deckarep/golang-set"
23
24const MplsPseudowireTerminationPointClassId ClassID = ClassID(333)
25
26var mplspseudowireterminationpointBME *ManagedEntityDefinition
27
28// MplsPseudowireTerminationPoint (class ID #333)
29// This ME contains the configuration data of a pseudowire whose underlying transport method is
30// MPLS. Instances of this ME are created and deleted by the OLT.
31//
32// Relationships
33// Zero or one instance of this ME is associated with each instance of the pseudowire TP ME.
34//
35// Attributes
36// Managed Entity Id
37// Managed entity ID: This attribute uniquely identifies each instance of this ME. (R,
38// setbycreate) (mandatory) (2 bytes)
39//
40// Tp Type
41// (R, W, setbycreate) (mandatory) (1 byte)
42//
43// Tp Pointer
44// TP pointer: This attribute points to the instance of the TP associated with this MPLS PW TP. The
45// type of the associated TP is determined by the TP type attribute. (R, W, setbycreate)
46// (mandatory) (2 bytes)
47//
48// Mpls Label Indicator
49// (R, W, setbycreate) (mandatory) (1 byte)
50//
51// Mpls Pw Direction
52// (R, W, setbycreate) (mandatory) (1 byte)
53//
54// Mpls Pw Uplink Label
55// MPLS PW uplink label: This attribute specifies the label of the inner MPLS pseudowire upstream.
56// The attribute is not meaningful for unidirectional downstream PWs. (R, W, setbycreate)
57// (mandatory) (4 bytes)
58//
59// Mpls Pw Downlink Label
60// MPLS PW downlink label: This attribute specifies the label of the inner MPLS pseudowire
61// downstream. The attribute is not meaningful for unidirectional upstream PWs. (R, W, setbycreate)
62// (mandatory) (4 bytes)
63//
64// Mpls Pw Tc
65// NOTE 1 – The TC field was previously known as EXP. Refer to [bIETF RFC 5462].
66//
67// Mpls Tunnel Direction
68// (R, W, setbycreate) (mandatory for double-labelled case) (1 byte)
69//
70// Mpls Tunnel Uplink Label
71// MPLS tunnel uplink label: This attribute specifies the (outer) label for the upstream MPLS
72// tunnel. If the MPLS tunnel is downstream only, this attribute should be set to 0. (R, W,
73// setbycreate) (mandatory for double-labelled case) (4 bytes)
74//
75// Mpls Tunnel Downlink Label
76// MPLS tunnel downlink label: This attribute specifies the (outer) label for the downstream MPLS
77// tunnel. If the MPLS tunnel is upstream only, this attribute should be set to 0. (R, W,
78// setbycreate) (mandatory for double-labelled case) (4 bytes)
79//
80// Mpls Tunnel Tc
81// NOTE 2 – The TC field was previously known as EXP. Refer to [bIETF RFC 5462].
82//
83// Pseudowire Type
84// (R, W, setbycreate) (mandatory) (2 bytes)
85//
86// Pseudowire Control Word Preference
87// Pseudowire control word preference: When set to true, this Boolean attribute specifies that a
88// control word is to be sent with each packet. Some PW types mandate the use of a control word in
89// any event. In such cases, the value configured for this attribute has no effect on the presence
90// of the control word. (R, W, setbycreate) (optional) (1 byte)
91//
92// Administrative State
93// Administrative state: This attribute locks (1) and unlocks (0) the functions performed by the
94// MPLS pseudowire TP. Administrative state is further described in clause A.1.6. (R, W) (optional)
95// (1 byte)
96//
97// Operational State
98// Operational state: This attribute reports whether the ME is currently capable of performing its
99// function. Valid values are enabled (0) and disabled (1). (R) (optional) (1 byte)
100//
101type MplsPseudowireTerminationPoint struct {
102 ManagedEntityDefinition
103 Attributes AttributeValueMap
104}
105
106func init() {
107 mplspseudowireterminationpointBME = &ManagedEntityDefinition{
108 Name: "MplsPseudowireTerminationPoint",
109 ClassID: 333,
110 MessageTypes: mapset.NewSetWith(
111 Create,
112 Delete,
113 Get,
114 Set,
115 ),
116 AllowedAttributeMask: 0XFFFE,
117 AttributeDefinitions: AttributeDefinitionMap{
118 0: Uint16Field("ManagedEntityId", 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, false, 0),
119 1: ByteField("TpType", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 1),
120 2: Uint16Field("TpPointer", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 2),
121 3: ByteField("MplsLabelIndicator", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 3),
122 4: ByteField("MplsPwDirection", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 4),
123 5: Uint32Field("MplsPwUplinkLabel", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 5),
124 6: Uint32Field("MplsPwDownlinkLabel", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 6),
125 7: ByteField("MplsPwTc", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 7),
126 8: ByteField("MplsTunnelDirection", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 8),
127 9: Uint32Field("MplsTunnelUplinkLabel", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 9),
128 10: Uint32Field("MplsTunnelDownlinkLabel", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 10),
129 11: ByteField("MplsTunnelTc", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 11),
130 12: Uint16Field("PseudowireType", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 12),
131 13: ByteField("PseudowireControlWordPreference", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, true, false, 13),
132 14: ByteField("AdministrativeState", 0, mapset.NewSetWith(Read, Write), false, false, true, false, 14),
133 15: ByteField("OperationalState", 0, mapset.NewSetWith(Read), true, false, true, false, 15),
134 },
135 }
136}
137
138// NewMplsPseudowireTerminationPoint (class ID 333 creates the basic
139// Managed Entity definition that is used to validate an ME of this type that
140// is received from the wire, about to be sent on the wire.
141func NewMplsPseudowireTerminationPoint(params ...ParamData) (*ManagedEntity, OmciErrors) {
142 return NewManagedEntity(mplspseudowireterminationpointBME, params...)
143}