blob: 85ef6238b3240442f2058e83058d12b39e1d48a1 [file] [log] [blame]
Matteo Scandolof9d43412021-01-12 11:11:34 -08001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Elia Battiston9bfe1102022-02-03 10:38:03 +01004 *
Matteo Scandolof9d43412021-01-12 11:11:34 -08005 * 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
Elia Battiston9bfe1102022-02-03 10:38:03 +01008 *
Matteo Scandolof9d43412021-01-12 11:11:34 -08009 * http://www.apache.org/licenses/LICENSE-2.0
Elia Battiston9bfe1102022-02-03 10:38:03 +010010 *
Matteo Scandolof9d43412021-01-12 11:11:34 -080011 * 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// PhysicalPathTerminationPointCesUniClassID is the 16-bit ID for the OMCI
29// Managed entity Physical path termination point CES UNI
Andrea Campanella10426e22021-10-15 17:58:04 +020030const PhysicalPathTerminationPointCesUniClassID = ClassID(12) // 0x000c
Matteo Scandolof9d43412021-01-12 11:11:34 -080031
32var physicalpathterminationpointcesuniBME *ManagedEntityDefinition
33
Andrea Campanella10426e22021-10-15 17:58:04 +020034// PhysicalPathTerminationPointCesUni (Class ID: #12 / 0x000c)
Matteo Scandolof9d43412021-01-12 11:11:34 -080035// This ME represents the point at a CES UNI in the ONU where the physical path terminates and
36// physical level functions are performed.
37//
38// The ONU automatically creates an instance of this ME per port:
39//
40// o when the ONU has CES ports built into its factory configuration;
41//
42// o when a cardholder is provisioned to expect a circuit pack of a CES type;
43//
44// o when a cardholder provisioned for plug-and-play is equipped with a circuit pack of a CES type.
45// Note that the installation of a plug-and-play card may indicate the presence of CES ports via
46// equipment ID as well as its type and indeed may cause the ONU to instantiate a port-mapping
47// package that specifies CES ports.
48//
49// The ONU automatically deletes instances of this ME when a cardholder is neither provisioned to
50// expect a CES circuit pack, nor is it equipped with a CES circuit pack.
51//
52// Relationships
53// An instance of this ME is associated with each real or pre-provisioned CES port. It can be
54// linked from a GEM IW TP, a pseudowire TP or a logical N * 64 kbit/s CTP.
55//
56// Attributes
57// Managed Entity Id
Andrea Campanella10426e22021-10-15 17:58:04 +020058// This attribute uniquely identifies each instance of this ME. This 2 byte number indicates the
59// physical position of the UNI. The first byte is the slot ID (defined in clause 9.1.5). The
60// second byte is the port ID, with the range 1..255. (R) (mandatory) (2-bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080061//
62// Expected Type
Andrea Campanella10426e22021-10-15 17:58:04 +020063// 1 to 254 One of the values from Table-9.1.5-1 that is compatible with a CES circuit pack
64//
Matteo Scandolof9d43412021-01-12 11:11:34 -080065// Upon ME instantiation, the ONU sets this attribute to 0. (R,-W) (mandatory) (1-byte)
66//
Andrea Campanella10426e22021-10-15 17:58:04 +020067// The following coding is used for this attribute-
68//
69// 0 Autosense
70//
Matteo Scandolof9d43412021-01-12 11:11:34 -080071// Sensed Type
Andrea Campanella10426e22021-10-15 17:58:04 +020072// If the value of expected type is not 0, then the value of sensed type equals the value of
73// expected type. If expected type-= 0, then the value of sensed type is one of the compatible
74// values from Table-9.1.5-1. Upon ME instantiation, the ONU sets this attribute to 0 or to the
75// value that reflects the physically present equipment. (R) (mandatory if the ONU supports circuit
76// packs with configurable interface types, e.g., C1.5/2/6.3) (1-byte)
Matteo Scandolof9d43412021-01-12 11:11:34 -080077//
78// Ces Loopback Configuration
Andrea Campanella10426e22021-10-15 17:58:04 +020079// This attribute specifies and reports the loopback configuration of the physical interface.
80//
81// 0 No loopback
82//
83// 1 Payload loopback
84//
85// 2 Line loopback
86//
87// 3 Operations system-directed (OS-directed) loopback 1 (loopback from/to PON side)
88//
89// 4 OS-directed loopback 2 (loopback from/to CES UNI side)
90//
91// 5 OS-directed loopback 3 (loopback of both PON side and CES UNI side)
92//
93// 6 Manual button-directed loopback [read only (RO)]
94//
95// 7 Network-side code inband-directed loopback (RO)
96//
97// 8 SmartJack-directed loopback (RO)
98//
99// 9 Network-side code inband-directed loopback (armed; RO)
100//
101// 10 Remote-line loopback via facility data link (FDL)
102//
103// 11 Remote-line loopback via inband code
104//
105// 12 Remote-payload loopback
106//
Matteo Scandolof9d43412021-01-12 11:11:34 -0800107// Upon ME instantiation, the ONU sets this attribute to 0. (R,-W) (mandatory) (1-byte)
108//
109// Administrative State
Andrea Campanella10426e22021-10-15 17:58:04 +0200110// This attribute locks (1) and unlocks (0) the functions performed by this ME. Administrative
111// state is further described in clause A.1.6. (R,-W) (mandatory) (1-byte)
Matteo Scandolof9d43412021-01-12 11:11:34 -0800112//
113// Operational State
Andrea Campanella10426e22021-10-15 17:58:04 +0200114// This attribute indicates whether the ME is capable of performing its function. Valid values are
115// enabled (0) and disabled (1). (R) (optional) (1-byte)
Matteo Scandolof9d43412021-01-12 11:11:34 -0800116//
117// Framing
Andrea Campanella10426e22021-10-15 17:58:04 +0200118// 6 Basic framing with CRC-4: clause 2.3.3 of [ITU-T G.704]
119//
120// 7 Basic framing with TS16 multiframe
121//
122// 8 Basic framing with CRC-4 and TS16 multiframe
123//
Matteo Scandolof9d43412021-01-12 11:11:34 -0800124// Upon ME instantiation, the ONU sets this attribute to a value that reflects the vendor's
125// default. (R,-W) (optional) (1-byte)
126//
Andrea Campanella10426e22021-10-15 17:58:04 +0200127// This attribute specifies the framing structure.
128//
129// These code points are for use with DS1 services. Code point 2 may also be used for an unframed
130// E1 service.
131//
132// 0 Extended superframe
133//
134// 1 Superframe
135//
136// 2 Unframed
137//
138// 3 ITUT-G.704
139//
140// NOTE - [ITUT G.704] describes both SF and ESF framing for DS1 signals. This code point is
141// retained for backward compatibility, but its meaning is undefined.
142//
143// 4 JT-G.704
144//
145// The following code points are for use with E1 services.
146//
147// 5 Basic framing: clause 2.3.2 of [ITU-T G.704]
148//
Matteo Scandolof9d43412021-01-12 11:11:34 -0800149// Encoding
Andrea Campanella10426e22021-10-15 17:58:04 +0200150// This attribute specifies the line coding scheme. Valid values are as follows.
151//
152// 0 B8ZS
153//
154// 1 AMI
155//
156// 2 HDB3
157//
158// 3 B3ZS
159//
Matteo Scandolof9d43412021-01-12 11:11:34 -0800160// Upon ME instantiation, the ONU sets this attribute to 0. (R,-W) (mandatory for DS1 and DS3
161// interfaces) (1-byte)
162//
163// Line Length
Andrea Campanella10426e22021-10-15 17:58:04 +0200164// This attribute specifies the length of the twisted pair cable from a DS1 physical UNI to the
165// DSX-1 cross-connect point or the length of coaxial cable from a DS3 physical UNI to the DSX-3
166// cross-connect point. Valid values are given in Table 9.8.1-1. Upon ME instantiation for a DS1
167// interface, the ONU assigns the value 0 for non-power feed type DS1 and the value 6 for power
168// feed type DS1. Upon ME instantiation for a DS3 interface, the ONU sets this attribute to 0x0F.
169// (R,-W) (optional) (1-byte)
Matteo Scandolof9d43412021-01-12 11:11:34 -0800170//
171// Ds1 Mode
Andrea Campanella10426e22021-10-15 17:58:04 +0200172// This attribute specifies the mode of a DS1. Valid values are as follows.
173//
Matteo Scandolof9d43412021-01-12 11:11:34 -0800174// In the event of conflicting values between this attribute and the (also optional) line length
175// attribute, the line length attribute is taken to be valid. This permits the separation of line
176// build-out (LBO) and power settings from smart jack and FDL behaviour. Upon ME instantiation, the
177// ONU sets this attribute to 0. (R,-W) (optional) (1-byte)
178//
179// Arc
Andrea Campanella10426e22021-10-15 17:58:04 +0200180// See clause A.1.4.3. (R,-W) (optional) (1-byte)
Matteo Scandolof9d43412021-01-12 11:11:34 -0800181//
182// Arc Interval
Andrea Campanella10426e22021-10-15 17:58:04 +0200183// See clause A.1.4.3. (R,-W) (optional) (1-byte)
Matteo Scandolof9d43412021-01-12 11:11:34 -0800184//
185// Line Type
Andrea Campanella10426e22021-10-15 17:58:04 +0200186// This attribute specifies the line type used in a DS3 or E3 application or when the sensed type
187// of the PPTP is configurable. Valid values are as follows.
188//
189// 0 Other
190//
191// 1 ds3 m23
192//
193// 2 ds3 syntran
194//
195// 3 ds3 Cbit parity
196//
197// 4 ds3 clear channel
198//
199// 5 e3 framed
200//
201// 6 e3 plcp
202//
203// 7 DS1
204//
205// 8 E1
206//
207// 9 J1
208//
Matteo Scandolof9d43412021-01-12 11:11:34 -0800209// (R,-W) (mandatory for DS3, E3 and multi-configuration interfaces, not applicable to other
210// interfaces) (1-byte)
211//
212type PhysicalPathTerminationPointCesUni struct {
213 ManagedEntityDefinition
214 Attributes AttributeValueMap
215}
216
Elia Battiston9bfe1102022-02-03 10:38:03 +0100217// Attribute name constants
218
219const PhysicalPathTerminationPointCesUni_ExpectedType = "ExpectedType"
220const PhysicalPathTerminationPointCesUni_SensedType = "SensedType"
221const PhysicalPathTerminationPointCesUni_CesLoopbackConfiguration = "CesLoopbackConfiguration"
222const PhysicalPathTerminationPointCesUni_AdministrativeState = "AdministrativeState"
223const PhysicalPathTerminationPointCesUni_OperationalState = "OperationalState"
224const PhysicalPathTerminationPointCesUni_Framing = "Framing"
225const PhysicalPathTerminationPointCesUni_Encoding = "Encoding"
226const PhysicalPathTerminationPointCesUni_LineLength = "LineLength"
227const PhysicalPathTerminationPointCesUni_Ds1Mode = "Ds1Mode"
228const PhysicalPathTerminationPointCesUni_Arc = "Arc"
229const PhysicalPathTerminationPointCesUni_ArcInterval = "ArcInterval"
230const PhysicalPathTerminationPointCesUni_LineType = "LineType"
231
Matteo Scandolof9d43412021-01-12 11:11:34 -0800232func init() {
233 physicalpathterminationpointcesuniBME = &ManagedEntityDefinition{
234 Name: "PhysicalPathTerminationPointCesUni",
Elia Battiston9bfe1102022-02-03 10:38:03 +0100235 ClassID: PhysicalPathTerminationPointCesUniClassID,
Matteo Scandolof9d43412021-01-12 11:11:34 -0800236 MessageTypes: mapset.NewSetWith(
237 Get,
238 Set,
239 ),
240 AllowedAttributeMask: 0xfff0,
241 AttributeDefinitions: AttributeDefinitionMap{
Elia Battiston9bfe1102022-02-03 10:38:03 +0100242 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
243 1: ByteField(PhysicalPathTerminationPointCesUni_ExpectedType, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
244 2: ByteField(PhysicalPathTerminationPointCesUni_SensedType, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, false, false, 2),
245 3: ByteField(PhysicalPathTerminationPointCesUni_CesLoopbackConfiguration, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), true, false, false, 3),
246 4: ByteField(PhysicalPathTerminationPointCesUni_AdministrativeState, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
247 5: ByteField(PhysicalPathTerminationPointCesUni_OperationalState, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), true, true, false, 5),
248 6: ByteField(PhysicalPathTerminationPointCesUni_Framing, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, true, false, 6),
249 7: ByteField(PhysicalPathTerminationPointCesUni_Encoding, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
250 8: ByteField(PhysicalPathTerminationPointCesUni_LineLength, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8),
251 9: ByteField(PhysicalPathTerminationPointCesUni_Ds1Mode, UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
252 10: ByteField(PhysicalPathTerminationPointCesUni_Arc, UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), true, true, false, 10),
253 11: ByteField(PhysicalPathTerminationPointCesUni_ArcInterval, UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
254 12: ByteField(PhysicalPathTerminationPointCesUni_LineType, UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, false, false, 12),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800255 },
256 Access: CreatedByOnu,
257 Support: UnknownSupport,
258 Alarms: AlarmMap{
259 0: "TF",
260 1: "LOS",
261 2: "LOF",
262 3: "OOF",
263 4: "RAI",
264 5: "1.5 M BAIS",
265 6: "R-INH",
266 7: "6M REC",
267 8: "6M SEND",
268 9: "6M ERR",
269 10: "6M BERR",
270 11: "34M REC",
271 12: "34M AIS",
272 13: "2M REC",
273 14: "2M AIS",
274 15: "1.5M REC",
275 16: "1.5 AIS",
276 17: "INFO0",
277 18: "45M RDI",
278 19: "45M AIS",
279 20: "AIS-CI",
280 21: "DS1 idle",
281 22: "RAI-CI",
282 },
283 }
284}
285
286// NewPhysicalPathTerminationPointCesUni (class ID 12) creates the basic
287// Managed Entity definition that is used to validate an ME of this type that
288// is received from or transmitted to the OMCC.
289func NewPhysicalPathTerminationPointCesUni(params ...ParamData) (*ManagedEntity, OmciErrors) {
290 return NewManagedEntity(*physicalpathterminationpointcesuniBME, params...)
291}