blob: 7a628546d23365db3cade2215f162f6b8e7a3d56 [file] [log] [blame]
mpagenko836a1fd2021-11-01 16:12:42 +00001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00004 *
mpagenko836a1fd2021-11-01 16:12:42 +00005 * 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
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00008 *
mpagenko836a1fd2021-11-01 16:12:42 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
mpagenko836a1fd2021-11-01 16:12:42 +000011 * 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// PseudowireTerminationPointClassID is the 16-bit ID for the OMCI
29// Managed entity Pseudowire termination point
30const PseudowireTerminationPointClassID = ClassID(282) // 0x011a
31
32var pseudowireterminationpointBME *ManagedEntityDefinition
33
34// PseudowireTerminationPoint (Class ID: #282 / 0x011a)
35// The pseudowire TP supports packetized (rather than TDM) transport of TDM services, transported
36// either directly over Ethernet, over UDP/IP or over MPLS. Instances of this ME are created and
37// deleted by the OLT.
38//
39// Relationships
40// One pseudowire TP ME exists for each distinct TDM service that is mapped to a pseudowire.
41//
42// Attributes
43// Managed Entity Id
44// This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory)
45// (2-bytes)
46//
47// Underlying Transport
48// 2 MPLS
49//
50// (R,-W, setbycreate) (mandatory) (1-byte)
51//
52// Underlying transport:
53//
54// 0 Ethernet, MEF 8
55//
56// 1 UDP/IP
57//
58// Service Type
59// This attribute specifies the basic service type, either a transparent bit pipe or an
60// encapsulation that recognizes the underlying structure of the payload.
61//
62// 0 Basic unstructured (also known as structure agnostic)
63//
64// 1 Octet-aligned unstructured, structure agnostic. Applicable only to DS1, a mode in which each
65// frame of 193 bits is encapsulated in 25 bytes with 7 padding bits.
66//
67// 2 Structured (structure-locked)
68//
69// (R,-W, setbycreate) (mandatory) (1-byte)
70//
71// Signalling
72// 1 CAS, to be carried in the same packet stream as the payload
73//
74// 2 CAS, to be carried in a separate signalling channel
75//
76// (R,-W, setbycreate) (mandatory for structured service type) (1-byte)
77//
78// 0 No signalling visible at this layer
79//
80// Tdm Uni Pointer
81// If service type-= structured, this attribute points to a logical N-* 64-kbit/s subport CTP.
82// Otherwise, this attribute points to a PPTP CES UNI. (R,-W, setbycreate) (mandatory) (2-bytes)
83//
84// North_Side Pointer
85// North-side pointer: When the pseudowire service is transported via IP, as indicated by the
86// underlying transport attribute, the northside pointer attribute points to an instance of the
87// TCP/UDP config data ME. When the pseudowire service is transported directly over Ethernet, the
88// north-side pointer attribute is not used - the linkage to the Ethernet flow TP is implicit in
89// the ME IDs. When the pseudowire service is transported over MPLS, the northside pointer
90// attribute points to an instance of the MPLS PW TP. (R, W, setbycreate) (mandatory) (2 bytes)
91//
92// Far_End Ip Info
93// A null pointer is appropriate if the pseudowire is not transported via IP. (R,-W, setbycreate)
94// (mandatory for IP transport) (2-bytes)
95//
96// Far-end IP info: When the pseudowire service is transported via IP, this attribute points to a
97// large string ME that contains the URI of the far-end TP, e.g.,
98//
99// udp://192.168.100.221:5000
100//
101// udp://pwe3srvr.int.example.net:2222
102//
103// Payload Size
104// Number of payload bytes per packet. Valid only if service type-= basic unstructured or octet-
105// aligned unstructured. Valid choices depend on the TDM service, but must include the following.
106// Other choices are at the vendor's discretion.
107//
108// DS1 192
109//
110// DS1 200, required only if an octet-aligned unstructured service is supported
111//
112// E1 256
113//
114// DS3 1024
115//
116// E3 1024
117//
118// (R,-W, setbycreate) (mandatory for unstructured service) (2-bytes)
119//
120// Payload Encapsulation Delay
121// Number of 125-us frames to be encapsulated in each pseudowire packet. Valid only if service
122// type-= structured. The minimum set of choices for various TDM services is listed in the
123// following table, and is affected by the possible presence of in-band signalling. Other choices
124// are at the vendor's discretion.
125//
126// (R,-W, setbycreate) (mandatory for structured service) (1-byte)
127//
128// Timing Mode
129// (R,-W) (mandatory) (1-byte)
130//
131// This attribute selects the timing mode of the TDM service. If RTP is used, this attribute must
132// be set to be consistent with the value of the RTP timestamp mode attribute in the RTP pseudowire
133// parameters ME, or its equivalent, at the far end.
134//
135// 0 Network timing (default)
136//
137// 1 Differential timing
138//
139// 2 Adaptive timing
140//
141// 3 Loop timing: local TDM transmit clock derived from local TDM receive stream
142//
143// Transmit Circuit Id
144// This attribute is a pair of emulated circuit ID (ECID) values that the ONU transmits in the
145// direction from the TDM termination towards the packet-switched network (PSN). MEF 8 ECIDs lie in
146// the range 1..1048575 (220-- 1). To allow for the possibility of other transport (L2TP) in the
147// future, each ECID is allocated 4-bytes.
148//
149// The first value is used for the payload ECID; the second is used for the optional separate
150// signalling ECID. The first ECID is required for all MEF 8 pseudowires; the second is required
151// only if signalling is to be carried in a distinct channel. If signalling is not present, or is
152// carried in the same channel as the payload, the second ECID should be set to 0.
153//
154// (R,-W) (mandatory for MEF 8 transport) (8-bytes)
155//
156// Expected Circuit Id
157// This attribute is a pair of ECID values that the ONU can expect in the direction from the PSN
158// towards the TDM termination. Checking ECIDs may be a way to detect circuit misconnection. MEF 8
159// ECIDs lie in the range 1..1048575 (220-- 1). To allow for the possibility of other transport
160// (L2TP) in the future, each ECID is allocated 4-bytes.
161//
162// The first value is used for the payload ECID; the second is used for the optional separate
163// signalling ECID. In both cases, the default value 0 indicates that no ECID checking is expected.
164//
165// (R,-W) (optional for MEF 8 transport) (8-bytes)
166//
167// Received Circuit Id
168// This attribute indicates the actual ECID(s) received on the payload and signalling channels,
169// respectively. It may be used for diagnostic purposes. (R) (optional for MEF 8 transport)
170// (8-bytes)
171//
172// Exception Policy
173// This attribute points to an instance of the pseudowire maintenance profile ME. If the pointer
174// has its default value 0, the ONU's internal defaults apply. (R,-W) (optional) (2-bytes)
175//
176// Arc
177// See clause A.1.4.3. (R,-W) (optional) (1-byte)
178//
179// Arc Interval
180// See clause A.1.4.3. (R,-W) (optional) (1-byte)
181//
182type PseudowireTerminationPoint struct {
183 ManagedEntityDefinition
184 Attributes AttributeValueMap
185}
186
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000187// Attribute name constants
188
189const PseudowireTerminationPoint_UnderlyingTransport = "UnderlyingTransport"
190const PseudowireTerminationPoint_ServiceType = "ServiceType"
191const PseudowireTerminationPoint_Signalling = "Signalling"
192const PseudowireTerminationPoint_TdmUniPointer = "TdmUniPointer"
193const PseudowireTerminationPoint_NorthSidePointer = "NorthSidePointer"
194const PseudowireTerminationPoint_FarEndIpInfo = "FarEndIpInfo"
195const PseudowireTerminationPoint_PayloadSize = "PayloadSize"
196const PseudowireTerminationPoint_PayloadEncapsulationDelay = "PayloadEncapsulationDelay"
197const PseudowireTerminationPoint_TimingMode = "TimingMode"
198const PseudowireTerminationPoint_TransmitCircuitId = "TransmitCircuitId"
199const PseudowireTerminationPoint_ExpectedCircuitId = "ExpectedCircuitId"
200const PseudowireTerminationPoint_ReceivedCircuitId = "ReceivedCircuitId"
201const PseudowireTerminationPoint_ExceptionPolicy = "ExceptionPolicy"
202const PseudowireTerminationPoint_Arc = "Arc"
203const PseudowireTerminationPoint_ArcInterval = "ArcInterval"
204
mpagenko836a1fd2021-11-01 16:12:42 +0000205func init() {
206 pseudowireterminationpointBME = &ManagedEntityDefinition{
207 Name: "PseudowireTerminationPoint",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000208 ClassID: PseudowireTerminationPointClassID,
mpagenko836a1fd2021-11-01 16:12:42 +0000209 MessageTypes: mapset.NewSetWith(
210 Create,
211 Delete,
212 Get,
213 Set,
214 ),
215 AllowedAttributeMask: 0xfffe,
216 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000217 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
218 1: ByteField(PseudowireTerminationPoint_UnderlyingTransport, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
219 2: ByteField(PseudowireTerminationPoint_ServiceType, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
220 3: ByteField(PseudowireTerminationPoint_Signalling, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
221 4: Uint16Field(PseudowireTerminationPoint_TdmUniPointer, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
222 5: Uint16Field(PseudowireTerminationPoint_NorthSidePointer, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
223 6: Uint16Field(PseudowireTerminationPoint_FarEndIpInfo, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
224 7: Uint16Field(PseudowireTerminationPoint_PayloadSize, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
225 8: ByteField(PseudowireTerminationPoint_PayloadEncapsulationDelay, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
226 9: ByteField(PseudowireTerminationPoint_TimingMode, UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, false, false, 9),
227 10: Uint64Field(PseudowireTerminationPoint_TransmitCircuitId, UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, false, false, 10),
228 11: Uint64Field(PseudowireTerminationPoint_ExpectedCircuitId, UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, false, false, 11),
229 12: Uint64Field(PseudowireTerminationPoint_ReceivedCircuitId, UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
230 13: Uint16Field(PseudowireTerminationPoint_ExceptionPolicy, UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
231 14: ByteField(PseudowireTerminationPoint_Arc, UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), true, true, false, 14),
232 15: ByteField(PseudowireTerminationPoint_ArcInterval, UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, Write), false, true, false, 15),
mpagenko836a1fd2021-11-01 16:12:42 +0000233 },
234 Access: CreatedByOlt,
235 Support: UnknownSupport,
236 }
237}
238
239// NewPseudowireTerminationPoint (class ID 282) creates the basic
240// Managed Entity definition that is used to validate an ME of this type that
241// is received from or transmitted to the OMCC.
242func NewPseudowireTerminationPoint(params ...ParamData) (*ManagedEntity, OmciErrors) {
243 return NewManagedEntity(*pseudowireterminationpointBME, params...)
244}