blob: a92489945fb9e33f81fa92208cc868f855449a3d [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// PhysicalPathTerminationPointEthernetUniClassID is the 16-bit ID for the OMCI
29// Managed entity Physical path termination point Ethernet UNI
Andrea Campanella10426e22021-10-15 17:58:04 +020030const PhysicalPathTerminationPointEthernetUniClassID = ClassID(11) // 0x000b
Matteo Scandolof9d43412021-01-12 11:11:34 -080031
32var physicalpathterminationpointethernetuniBME *ManagedEntityDefinition
33
Andrea Campanella10426e22021-10-15 17:58:04 +020034// PhysicalPathTerminationPointEthernetUni (Class ID: #11 / 0x000b)
Matteo Scandolof9d43412021-01-12 11:11:34 -080035// This ME represents the point at an Ethernet UNI where the physical path terminates and Ethernet
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 Ethernet ports built into its factory configuration;
41//
42// o when a cardholder is provisioned to expect a circuit pack of the Ethernet type;
43//
44// o when a cardholder provisioned for plug-and-play is equipped with a circuit pack of the
45// Ethernet type. Note that the installation of a plug-and-play card may indicate the presence of
46// Ethernet ports via equipment ID as well as its type, and indeed may cause the ONU to instantiate
47// a port-mapping package that specifies Ethernet ports.
48//
49// The ONU automatically deletes instances of this ME when a cardholder is neither provisioned to
50// expect an Ethernet circuit pack, nor is it equipped with an Ethernet circuit pack.
51//
52// Relationships
53// An instance of this ME is associated with each instance of a pre-provisioned or real Ethernet
54// port.
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// This attribute supports pre-provisioning. It is coded as follows:
64//
65// 0 Autosense
66//
67// 1 to 254 One of the values from Table-9.1.5-1 that is compatible with an Ethernet circuit pack
68//
Matteo Scandolof9d43412021-01-12 11:11:34 -080069// Upon ME instantiation, the ONU sets this attribute to 0. (R,-W) (mandatory) (1-byte)
70//
71// Sensed Type
Andrea Campanella10426e22021-10-15 17:58:04 +020072// When a circuit pack is present, this attribute represents its type as one of the values from
73// Table-9.1.5-1. If the value of the expected type is not 0, then the value of the sensed type
74// should be the same as the value of the expected type. Upon ME instantiation, the ONU sets this
75// attribute to 0. See also the note in the following AVC table.
76//
Matteo Scandolof9d43412021-01-12 11:11:34 -080077// (R) (mandatory if the ONU supports circuit packs with configurable interface types, e.g., 10/100
78// BASE-T card) (1-byte)
79//
80// Auto Detection Configuration
Andrea Campanella10426e22021-10-15 17:58:04 +020081// This attribute sets the following Ethernet port configuration.
82//
Matteo Scandolof9d43412021-01-12 11:11:34 -080083// Upon ME instantiation, the ONU sets this attribute to 0. (R,-W) (mandatory for interfaces with
84// autodetection options) (1-byte)
85//
86// Ethernet Loopback Configuration
Andrea Campanella10426e22021-10-15 17:58:04 +020087// This attribute sets the following Ethernet loopback configuration.
88//
89// 0 No loopback
90//
91// 3 Loop 3, loopback of downstream traffic after PHY transceiver. Loop-3 is depicted in Figure
92// 9.5.1-1.
93//
94// Note that normal bridge behaviour may defeat the loopback signal unless broadcast MAC addresses
95// are used. Although it does not reach the physical interface, [IEEE 802.1ag] loopback is
96// preferred.
97//
Matteo Scandolof9d43412021-01-12 11:11:34 -080098// Upon ME instantiation, the ONU sets this attribute to 0. (R,-W) (mandatory) (1-byte)
99//
100// Administrative State
Andrea Campanella10426e22021-10-15 17:58:04 +0200101// This attribute locks (1) and unlocks (0) the functions performed by this ME. Administrative
102// state is further described in clause A.1.6. (R,-W) (mandatory) (1-byte)
Matteo Scandolof9d43412021-01-12 11:11:34 -0800103//
104// Operational State
Andrea Campanella10426e22021-10-15 17:58:04 +0200105// This attribute indicates whether the ME is capable of performing its function. Valid values are
106// enabled (0) and disabled (1). (R) (optional) (1-byte)
Matteo Scandolof9d43412021-01-12 11:11:34 -0800107//
108// Configuration Ind
Andrea Campanella10426e22021-10-15 17:58:04 +0200109// This attribute indicates the configuration status of the Ethernet UNI.
110//
111// 0x01 10BASE-T full duplex
112//
113// 0x02 100BASE-T full duplex
114//
115// 0x03 Gigabit Ethernet full duplex
116//
117// 0x04 10Gb/s Ethernet full duplex
118//
119// 0x05 2.5Gb/s Ethernet full duplex
120//
121// 0x06 5Gb/s Ethernet full duplex
122//
123// 0x07 25Gb/s Ethernet full duplex
124//
125// 0x08 40Gb/s Ethernet full duplex
126//
127// 0x11 10BASE-T half duplex
128//
129// 0x12 100BASE-T half duplex
130//
131// 0x13 Gigabit Ethernet half duplex
132//
Matteo Scandolof9d43412021-01-12 11:11:34 -0800133// The value 0 indicates that the configuration status is unknown (e.g., Ethernet link is not
134// established or the circuit pack is not yet installed). Upon ME instantiation, the ONU sets this
135// attribute to 0. (R) (mandatory) (1-byte)
136//
137// Max Frame Size
Andrea Campanella10426e22021-10-15 17:58:04 +0200138// This attribute denotes the maximum frame size allowed across this interface. Upon ME
139// instantiation, the ONU sets the attribute to 1518. (R,-W) (mandatory for G-PON, optional for
140// ITU-T G.986 systems) (2 bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -0800141//
142// Dte Or Dce Ind
Andrea Campanella10426e22021-10-15 17:58:04 +0200143// This attribute specifies the following Ethernet interface wiring.
144//
145// 0 DCE or MDI-X (default).
146//
147// 1 DTE or MDI.
148//
149// 2 Automatic selection
150//
Matteo Scandolof9d43412021-01-12 11:11:34 -0800151// (R,-W) (mandatory) (1-byte)
152//
153// Pause Time
Andrea Campanella10426e22021-10-15 17:58:04 +0200154// This attribute allows the PPTP to ask the subscriber terminal to temporarily suspend sending
155// data. Units are in pause quanta (1 pause quantum is 512 bit times of the particular
Matteo Scandolof9d43412021-01-12 11:11:34 -0800156// implementation). Values: 0..0xFFFF. Upon ME instantiation, the ONU sets this attribute to 0.
157// (R,-W) (optional) (2-bytes)
158//
159// Bridged Or Ip Ind
Andrea Campanella10426e22021-10-15 17:58:04 +0200160// This attribute specifies whether the Ethernet interface is bridged or derived from an IP router
161// function.
162//
163// 0 Bridged
164//
165// 1 IP router
166//
167// 2 Depends on the parent circuit pack. 2 means that the circuit pack's bridged or IP ind
168// attribute is either 0 or 1.
169//
Matteo Scandolof9d43412021-01-12 11:11:34 -0800170// Upon ME instantiation, the ONU sets this attribute to 2. (R,-W) (optional) (1-byte)
171//
172// Arc
Andrea Campanella10426e22021-10-15 17:58:04 +0200173// See clause A.1.4.3. (R,-W) (optional) (1-byte)
Matteo Scandolof9d43412021-01-12 11:11:34 -0800174//
175// Arc Interval
Andrea Campanella10426e22021-10-15 17:58:04 +0200176// See clause A.1.4.3. (R,-W) (optional) (1-byte)
Matteo Scandolof9d43412021-01-12 11:11:34 -0800177//
178// Pppoe Filter
Andrea Campanella10426e22021-10-15 17:58:04 +0200179// This attribute controls filtering of PPPoE packets on this Ethernet port. The value 0 allows
180// packets of all types. The value 1 discards everything but PPPoE packets. The default value is 0.
181// (R,-W) (optional) (1-byte)
Matteo Scandolof9d43412021-01-12 11:11:34 -0800182//
183// Power Control
Andrea Campanella10426e22021-10-15 17:58:04 +0200184// This attribute controls whether power is provided to an external equipment over the Ethernet
185// PPTP. The value 1 enables power over the Ethernet port. The default value 0 disables power feed.
186// (R,-W) (optional) (1-byte)
187//
Matteo Scandolof9d43412021-01-12 11:11:34 -0800188// NOTE - This attribute is the equivalent of the acPSEAdminControl variable defined in clause
189// 30.9.1.2.1 of [IEEE 802.3]. Other variables related to PoE appear in the PoE control ME.
190//
191type PhysicalPathTerminationPointEthernetUni struct {
192 ManagedEntityDefinition
193 Attributes AttributeValueMap
194}
195
Elia Battiston9bfe1102022-02-03 10:38:03 +0100196// Attribute name constants
197
198const PhysicalPathTerminationPointEthernetUni_ExpectedType = "ExpectedType"
199const PhysicalPathTerminationPointEthernetUni_SensedType = "SensedType"
200const PhysicalPathTerminationPointEthernetUni_AutoDetectionConfiguration = "AutoDetectionConfiguration"
201const PhysicalPathTerminationPointEthernetUni_EthernetLoopbackConfiguration = "EthernetLoopbackConfiguration"
202const PhysicalPathTerminationPointEthernetUni_AdministrativeState = "AdministrativeState"
203const PhysicalPathTerminationPointEthernetUni_OperationalState = "OperationalState"
204const PhysicalPathTerminationPointEthernetUni_ConfigurationInd = "ConfigurationInd"
205const PhysicalPathTerminationPointEthernetUni_MaxFrameSize = "MaxFrameSize"
206const PhysicalPathTerminationPointEthernetUni_DteOrDceInd = "DteOrDceInd"
207const PhysicalPathTerminationPointEthernetUni_PauseTime = "PauseTime"
208const PhysicalPathTerminationPointEthernetUni_BridgedOrIpInd = "BridgedOrIpInd"
209const PhysicalPathTerminationPointEthernetUni_Arc = "Arc"
210const PhysicalPathTerminationPointEthernetUni_ArcInterval = "ArcInterval"
211const PhysicalPathTerminationPointEthernetUni_PppoeFilter = "PppoeFilter"
212const PhysicalPathTerminationPointEthernetUni_PowerControl = "PowerControl"
213
Matteo Scandolof9d43412021-01-12 11:11:34 -0800214func init() {
215 physicalpathterminationpointethernetuniBME = &ManagedEntityDefinition{
216 Name: "PhysicalPathTerminationPointEthernetUni",
Elia Battiston9bfe1102022-02-03 10:38:03 +0100217 ClassID: PhysicalPathTerminationPointEthernetUniClassID,
Matteo Scandolof9d43412021-01-12 11:11:34 -0800218 MessageTypes: mapset.NewSetWith(
219 Get,
220 Set,
221 ),
222 AllowedAttributeMask: 0xfffe,
223 AttributeDefinitions: AttributeDefinitionMap{
Elia Battiston9bfe1102022-02-03 10:38:03 +0100224 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
225 1: ByteField(PhysicalPathTerminationPointEthernetUni_ExpectedType, EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
226 2: ByteField(PhysicalPathTerminationPointEthernetUni_SensedType, EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, false, false, 2),
227 3: ByteField(PhysicalPathTerminationPointEthernetUni_AutoDetectionConfiguration, EnumerationAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
228 4: ByteField(PhysicalPathTerminationPointEthernetUni_EthernetLoopbackConfiguration, EnumerationAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
229 5: ByteField(PhysicalPathTerminationPointEthernetUni_AdministrativeState, EnumerationAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
230 6: ByteField(PhysicalPathTerminationPointEthernetUni_OperationalState, EnumerationAttributeType, 0x0400, 0, mapset.NewSetWith(Read), true, true, false, 6),
231 7: ByteField(PhysicalPathTerminationPointEthernetUni_ConfigurationInd, EnumerationAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
232 8: Uint16Field(PhysicalPathTerminationPointEthernetUni_MaxFrameSize, UnsignedIntegerAttributeType, 0x0100, 1518, mapset.NewSetWith(Read, Write), false, false, false, 8),
233 9: ByteField(PhysicalPathTerminationPointEthernetUni_DteOrDceInd, EnumerationAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, false, false, 9),
234 10: Uint16Field(PhysicalPathTerminationPointEthernetUni_PauseTime, UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10),
235 11: ByteField(PhysicalPathTerminationPointEthernetUni_BridgedOrIpInd, EnumerationAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
236 12: ByteField(PhysicalPathTerminationPointEthernetUni_Arc, EnumerationAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), true, true, false, 12),
237 13: ByteField(PhysicalPathTerminationPointEthernetUni_ArcInterval, UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
238 14: ByteField(PhysicalPathTerminationPointEthernetUni_PppoeFilter, EnumerationAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14),
239 15: ByteField(PhysicalPathTerminationPointEthernetUni_PowerControl, EnumerationAttributeType, 0x0002, 0, mapset.NewSetWith(Read, Write), false, true, false, 15),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800240 },
241 Access: CreatedByOnu,
242 Support: UnknownSupport,
243 Alarms: AlarmMap{
244 0: "LAN-LOS",
245 },
246 }
247}
248
249// NewPhysicalPathTerminationPointEthernetUni (class ID 11) creates the basic
250// Managed Entity definition that is used to validate an ME of this type that
251// is received from or transmitted to the OMCC.
252func NewPhysicalPathTerminationPointEthernetUni(params ...ParamData) (*ManagedEntity, OmciErrors) {
253 return NewManagedEntity(*physicalpathterminationpointethernetuniBME, params...)
254}