blob: e0da86f5863b01c3395d30e09aa28219b110ffe8 [file] [log] [blame]
Holger Hildebrandtfa074992020-03-27 15:42:06 +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 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +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 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +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 */
Himani Chawlaac1f5ad2021-02-04 21:21:54 +053017/*
Holger Hildebrandtfa074992020-03-27 15:42:06 +000018 * 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
mpagenko836a1fd2021-11-01 16:12:42 +000030const VirtualEthernetInterfacePointClassID = ClassID(329) // 0x0149
Holger Hildebrandtfa074992020-03-27 15:42:06 +000031
32var virtualethernetinterfacepointBME *ManagedEntityDefinition
33
mpagenko836a1fd2021-11-01 16:12:42 +000034// VirtualEthernetInterfacePoint (Class ID: #329 / 0x0149)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000035// 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
mpagenko836a1fd2021-11-01 16:12:42 +000052// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000058//
59// Administrative State
mpagenko836a1fd2021-11-01 16:12:42 +000060// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000062//
63// Operational State
mpagenko836a1fd2021-11-01 16:12:42 +000064// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000066//
67// Interdomain Name
mpagenko836a1fd2021-11-01 16:12:42 +000068// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000072//
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
mpagenko836a1fd2021-11-01 16:12:42 +000080// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000086//
87type VirtualEthernetInterfacePoint struct {
88 ManagedEntityDefinition
89 Attributes AttributeValueMap
90}
91
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000092// 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
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000100func init() {
101 virtualethernetinterfacepointBME = &ManagedEntityDefinition{
102 Name: "VirtualEthernetInterfacePoint",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000103 ClassID: VirtualEthernetInterfacePointClassID,
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000104 MessageTypes: mapset.NewSetWith(
105 Get,
106 Set,
107 ),
108 AllowedAttributeMask: 0xf800,
109 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000110 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),
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000116 },
117 Access: CreatedByOnu,
118 Support: UnknownSupport,
Himani Chawlaac1f5ad2021-02-04 21:21:54 +0530119 Alarms: AlarmMap{
120 0: "Connecting function fail",
121 },
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000122 }
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}