blob: c72fbf0bd2836124987ccc52466a43157db7c665 [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 */
Chip Boling34ebcb62021-02-02 12:13:58 -060017/*
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// PhysicalPathTerminationPointEthernetUniClassID is the 16-bit ID for the OMCI
29// Managed entity Physical path termination point Ethernet UNI
Chip Boling610117d2021-09-09 11:24:34 -050030const PhysicalPathTerminationPointEthernetUniClassID = ClassID(11) // 0x000b
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var physicalpathterminationpointethernetuniBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// PhysicalPathTerminationPointEthernetUni (Class ID: #11 / 0x000b)
Chip Boling6e27b352020-02-14 09:10:01 -060035// 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
Chip Boling610117d2021-09-09 11:24:34 -050058// 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)
Chip Boling6e27b352020-02-14 09:10:01 -060061//
62// Expected Type
Chip Boling610117d2021-09-09 11:24:34 -050063// 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//
Chip Boling6e27b352020-02-14 09:10:01 -060069// Upon ME instantiation, the ONU sets this attribute to 0. (R,-W) (mandatory) (1-byte)
70//
71// Sensed Type
Chip Boling610117d2021-09-09 11:24:34 -050072// 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//
Chip Boling6e27b352020-02-14 09:10:01 -060077// (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
Chip Boling610117d2021-09-09 11:24:34 -050081// This attribute sets the following Ethernet port configuration.
82//
Chip Boling6e27b352020-02-14 09:10:01 -060083// 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
Chip Boling610117d2021-09-09 11:24:34 -050087// 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//
Chip Boling6e27b352020-02-14 09:10:01 -060098// Upon ME instantiation, the ONU sets this attribute to 0. (R,-W) (mandatory) (1-byte)
99//
100// Administrative State
Chip Boling610117d2021-09-09 11:24:34 -0500101// 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)
Chip Boling6e27b352020-02-14 09:10:01 -0600103//
104// Operational State
Chip Boling610117d2021-09-09 11:24:34 -0500105// 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)
Chip Boling6e27b352020-02-14 09:10:01 -0600107//
108// Configuration Ind
Chip Boling610117d2021-09-09 11:24:34 -0500109// 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//
Chip Boling6e27b352020-02-14 09:10:01 -0600133// 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
Chip Boling610117d2021-09-09 11:24:34 -0500138// 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)
Chip Boling6e27b352020-02-14 09:10:01 -0600141//
142// Dte Or Dce Ind
Chip Boling610117d2021-09-09 11:24:34 -0500143// 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//
Chip Boling6e27b352020-02-14 09:10:01 -0600151// (R,-W) (mandatory) (1-byte)
152//
153// Pause Time
Chip Boling610117d2021-09-09 11:24:34 -0500154// 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
Chip Boling6e27b352020-02-14 09:10:01 -0600156// 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
Chip Boling610117d2021-09-09 11:24:34 -0500160// 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//
Chip Boling6e27b352020-02-14 09:10:01 -0600170// Upon ME instantiation, the ONU sets this attribute to 2. (R,-W) (optional) (1-byte)
171//
172// Arc
Chip Boling610117d2021-09-09 11:24:34 -0500173// See clause A.1.4.3. (R,-W) (optional) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -0600174//
175// Arc Interval
Chip Boling610117d2021-09-09 11:24:34 -0500176// See clause A.1.4.3. (R,-W) (optional) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -0600177//
178// Pppoe Filter
Chip Boling610117d2021-09-09 11:24:34 -0500179// 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)
Chip Boling6e27b352020-02-14 09:10:01 -0600182//
183// Power Control
Chip Boling610117d2021-09-09 11:24:34 -0500184// 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//
Chip Boling6e27b352020-02-14 09:10:01 -0600188// 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
196func init() {
197 physicalpathterminationpointethernetuniBME = &ManagedEntityDefinition{
198 Name: "PhysicalPathTerminationPointEthernetUni",
199 ClassID: 11,
200 MessageTypes: mapset.NewSetWith(
201 Get,
202 Set,
203 ),
204 AllowedAttributeMask: 0xfffe,
205 AttributeDefinitions: AttributeDefinitionMap{
206 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
207 1: ByteField("ExpectedType", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
208 2: ByteField("SensedType", EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, false, false, 2),
209 3: ByteField("AutoDetectionConfiguration", EnumerationAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
210 4: ByteField("EthernetLoopbackConfiguration", EnumerationAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
211 5: ByteField("AdministrativeState", EnumerationAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
212 6: ByteField("OperationalState", EnumerationAttributeType, 0x0400, 0, mapset.NewSetWith(Read), true, true, false, 6),
213 7: ByteField("ConfigurationInd", EnumerationAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
214 8: Uint16Field("MaxFrameSize", UnsignedIntegerAttributeType, 0x0100, 1518, mapset.NewSetWith(Read, Write), false, false, false, 8),
215 9: ByteField("DteOrDceInd", EnumerationAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, false, false, 9),
216 10: Uint16Field("PauseTime", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10),
217 11: ByteField("BridgedOrIpInd", EnumerationAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
218 12: ByteField("Arc", EnumerationAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), true, true, false, 12),
219 13: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
220 14: ByteField("PppoeFilter", EnumerationAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14),
221 15: ByteField("PowerControl", EnumerationAttributeType, 0x0002, 0, mapset.NewSetWith(Read, Write), false, true, false, 15),
222 },
223 Access: CreatedByOnu,
224 Support: UnknownSupport,
Chip Boling34ebcb62021-02-02 12:13:58 -0600225 Alarms: AlarmMap{
226 0: "LAN-LOS",
227 },
Chip Boling6e27b352020-02-14 09:10:01 -0600228 }
229}
230
231// NewPhysicalPathTerminationPointEthernetUni (class ID 11) creates the basic
232// Managed Entity definition that is used to validate an ME of this type that
233// is received from or transmitted to the OMCC.
234func NewPhysicalPathTerminationPointEthernetUni(params ...ParamData) (*ManagedEntity, OmciErrors) {
235 return NewManagedEntity(*physicalpathterminationpointethernetuniBME, params...)
236}