blob: e0da86f5863b01c3395d30e09aa28219b110ffe8 [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Matteo Scandolof9d43412021-01-12 11:11:34 -08003 * Copyright 2020-present Open Networking Foundation
Elia Battiston9bfe1102022-02-03 10:38:03 +01004 *
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07005 * 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 Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Elia Battiston9bfe1102022-02-03 10:38:03 +010010 *
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070011 * 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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080023
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070024package generated
25
26import "github.com/deckarep/golang-set"
27
Matteo Scandolof9d43412021-01-12 11:11:34 -080028// VirtualEthernetInterfacePointClassID is the 16-bit ID for the OMCI
29// Managed entity Virtual Ethernet interface point
Andrea Campanella10426e22021-10-15 17:58:04 +020030const VirtualEthernetInterfacePointClassID = ClassID(329) // 0x0149
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
32var virtualethernetinterfacepointBME *ManagedEntityDefinition
33
Andrea Campanella10426e22021-10-15 17:58:04 +020034// VirtualEthernetInterfacePoint (Class ID: #329 / 0x0149)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070035// 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
Andrea Campanella10426e22021-10-15 17:58:04 +020052// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070058//
59// Administrative State
Andrea Campanella10426e22021-10-15 17:58:04 +020060// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070062//
63// Operational State
Andrea Campanella10426e22021-10-15 17:58:04 +020064// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070066//
67// Interdomain Name
Andrea Campanella10426e22021-10-15 17:58:04 +020068// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070072//
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
Matteo Scandolof9d43412021-01-12 11:11:34 -080077// or set to its default, a null pointer. (R,-W) (optional) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070078//
79// Iana Assigned Port
Andrea Campanella10426e22021-10-15 17:58:04 +020080// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070086//
87type VirtualEthernetInterfacePoint struct {
88 ManagedEntityDefinition
89 Attributes AttributeValueMap
90}
91
Elia Battiston9bfe1102022-02-03 10:38:03 +010092// 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
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700100func init() {
101 virtualethernetinterfacepointBME = &ManagedEntityDefinition{
102 Name: "VirtualEthernetInterfacePoint",
Elia Battiston9bfe1102022-02-03 10:38:03 +0100103 ClassID: VirtualEthernetInterfacePointClassID,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700104 MessageTypes: mapset.NewSetWith(
105 Get,
106 Set,
107 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800108 AllowedAttributeMask: 0xf800,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700109 AttributeDefinitions: AttributeDefinitionMap{
Elia Battiston9bfe1102022-02-03 10:38:03 +0100110 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),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800116 },
117 Access: CreatedByOnu,
118 Support: UnknownSupport,
119 Alarms: AlarmMap{
120 0: "Connecting function fail",
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700121 },
122 }
123}
124
Matteo Scandolof9d43412021-01-12 11:11:34 -0800125// NewVirtualEthernetInterfacePoint (class ID 329) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700126// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800127// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700128func NewVirtualEthernetInterfacePoint(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800129 return NewManagedEntity(*virtualethernetinterfacepointBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700130}