blob: e0da86f5863b01c3395d30e09aa28219b110ffe8 [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
Chip Boling8cdd6392022-01-27 08:43:37 -06004 *
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
Chip Boling8cdd6392022-01-27 08:43:37 -06008 *
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Chip Boling8cdd6392022-01-27 08:43:37 -060010 *
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// VirtualEthernetInterfacePointClassID is the 16-bit ID for the OMCI
29// Managed entity Virtual Ethernet interface point
Chip Boling610117d2021-09-09 11:24:34 -050030const VirtualEthernetInterfacePointClassID = ClassID(329) // 0x0149
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var virtualethernetinterfacepointBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// VirtualEthernetInterfacePoint (Class ID: #329 / 0x0149)
Chip Boling6e27b352020-02-14 09:10:01 -060035// This ME represents the data plane hand-off point in an ONU to a separate (non-OMCI) management
36// domain. The VEIP is managed by the OMCI, and is potentially known to the non-OMCI management
37// domain. One or more Ethernet traffic flows are present at this boundary.
38//
39// Instances of this ME are automatically created and deleted by the ONU. This is necessary because
40// the required downstream priority queues are subject to physical implementation constraints. The
41// OLT may use one or more of the VEIPs created by the ONU.
42//
43// It is expected that the ONU will create one VEIP for each non-OMCI management domain. At the
44// vendor's discretion, a VEIP may be created for each traffic class.
45//
46// Relationships
47// An instance of this ME is associated with an instance of a virtual Ethernet interface between
48// OMCI and non-OMCI management domains.
49//
50// Attributes
51// Managed Entity Id
Chip Boling610117d2021-09-09 11:24:34 -050052// This attribute uniquely identifies each instance of this ME. When used independently of a
53// cardholder and circuit pack, the ONU should assign IDs in the sequence 1, 2, .... When used in
54// conjunction with a cardholder and circuit pack, this 2 byte number indicates the physical
55// position of the VEIP. The first byte is the slot ID (defined in clause 9.1.5). The second byte
56// is the port ID, with the range 1..255. The values 0 and 0xFFFF are reserved. (R) (mandatory) (2
57// bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060058//
59// Administrative State
Chip Boling610117d2021-09-09 11:24:34 -050060// This attribute locks (1) and unlocks (0) the functions performed by this ME. Administrative
61// state is further described in clause A.1.6. (R,-W) (mandatory) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -060062//
63// Operational State
Chip Boling610117d2021-09-09 11:24:34 -050064// This attribute indicates whether the ME is capable of performing its function. Valid values are
65// enabled (0) and disabled (1). (R) (optional) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -060066//
67// Interdomain Name
Chip Boling610117d2021-09-09 11:24:34 -050068// This attribute is a character string that provides an optional way to identify the VEIP to a
69// non-OMCI management domain. The interface may also be identified by its ME ID, [b-IANA]
70// assigned port and possibly other ways. If the vendor offers no information in this attribute, it
71// should be set to a sequence of null bytes. (R,-W) (optional) (25-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060072//
73// Tcp_Udp Pointer
74// TCP/UDP pointer: This attribute points to an instance of the TCP/UDP config data ME, which
75// provides for OMCI management of the non-OMCI management domain's IP connectivity. If no OMCI
76// management of the non-OMCI domain's IP connectivity is required, this attribute may be omitted
77// or set to its default, a null pointer. (R,-W) (optional) (2-bytes)
78//
79// Iana Assigned Port
Chip Boling610117d2021-09-09 11:24:34 -050080// This attribute contains the TCP or UDP port value as assigned by [b-IANA] for the management
81// protocol associated with this virtual Ethernet interface. This attribute is to be regarded as a
82// hint, not as a requirement that management communications use this port; the actual port and
83// protocol are specified in the associated TCP/UDP config data ME. If no port has been assigned or
84// if the management protocol is free to be chosen at run-time, this attribute should be set to
85// 0xFFFF. (R) (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060086//
87type VirtualEthernetInterfacePoint struct {
88 ManagedEntityDefinition
89 Attributes AttributeValueMap
90}
91
Chip Boling8cdd6392022-01-27 08:43:37 -060092// Attribute name constants
93
94const VirtualEthernetInterfacePoint_AdministrativeState = "AdministrativeState"
95const VirtualEthernetInterfacePoint_OperationalState = "OperationalState"
96const VirtualEthernetInterfacePoint_InterdomainName = "InterdomainName"
97const VirtualEthernetInterfacePoint_TcpUdpPointer = "TcpUdpPointer"
98const VirtualEthernetInterfacePoint_IanaAssignedPort = "IanaAssignedPort"
99
Chip Boling6e27b352020-02-14 09:10:01 -0600100func init() {
101 virtualethernetinterfacepointBME = &ManagedEntityDefinition{
102 Name: "VirtualEthernetInterfacePoint",
Chip Boling8cdd6392022-01-27 08:43:37 -0600103 ClassID: VirtualEthernetInterfacePointClassID,
Chip Boling6e27b352020-02-14 09:10:01 -0600104 MessageTypes: mapset.NewSetWith(
105 Get,
106 Set,
107 ),
108 AllowedAttributeMask: 0xf800,
109 AttributeDefinitions: AttributeDefinitionMap{
Chip Boling8cdd6392022-01-27 08:43:37 -0600110 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
111 1: ByteField(VirtualEthernetInterfacePoint_AdministrativeState, EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
112 2: ByteField(VirtualEthernetInterfacePoint_OperationalState, EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2),
113 3: MultiByteField(VirtualEthernetInterfacePoint_InterdomainName, StringAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 3),
114 4: Uint16Field(VirtualEthernetInterfacePoint_TcpUdpPointer, PointerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
115 5: Uint16Field(VirtualEthernetInterfacePoint_IanaAssignedPort, UnsignedIntegerAttributeType, 0x0800, 65535, mapset.NewSetWith(Read), false, false, false, 5),
Chip Boling6e27b352020-02-14 09:10:01 -0600116 },
117 Access: CreatedByOnu,
118 Support: UnknownSupport,
Chip Boling34ebcb62021-02-02 12:13:58 -0600119 Alarms: AlarmMap{
120 0: "Connecting function fail",
121 },
Chip Boling6e27b352020-02-14 09:10:01 -0600122 }
123}
124
125// NewVirtualEthernetInterfacePoint (class ID 329) creates the basic
126// Managed Entity definition that is used to validate an ME of this type that
127// is received from or transmitted to the OMCC.
128func NewVirtualEthernetInterfacePoint(params ...ParamData) (*ManagedEntity, OmciErrors) {
129 return NewManagedEntity(*virtualethernetinterfacepointBME, params...)
130}