blob: dd8c881fcc6e9dcf2bc6eb56630eeafe7d5b01f3 [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 */
Andrea Campanella7167ebb2020-02-24 09:56:38 +010017 /*
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
30const VirtualEthernetInterfacePointClassID ClassID = ClassID(329)
31
32var virtualethernetinterfacepointBME *ManagedEntityDefinition
33
34// VirtualEthernetInterfacePoint (class ID #329)
35// 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
52// Managed entity ID: This attribute uniquely identifies each instance of this ME. When used
53// independently of a cardholder and circuit pack, the ONU should assign IDs in the sequence 1, 2,
54// .... When used in conjunction with a cardholder and circuit pack, this 2 byte number indicates
55// the physical position of the VEIP. The first byte is the slot ID (defined in clause 9.1.5). The
56// second byte is the port ID, with the range 1..255. The values 0 and 0xFFFF are reserved. (R)
57// (mandatory) (2 bytes)
58//
59// Administrative State
60// Administrative state: This attribute locks (1) and unlocks (0) the functions performed by this
61// ME. Administrative state is further described in clause A.1.6. (R,-W) (mandatory) (1-byte)
62//
63// Operational State
64// Operational state: This attribute indicates whether the ME is capable of performing its
65// function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
66//
67// Interdomain Name
68// Interdomain name: This attribute is a character string that provides an optional way to identify
69// the VEIP to a non-OMCI management domain. The interface may also be identified by its ME ID,
70// [b-IANA] assigned port and possibly other ways. If the vendor offers no information in this
71// attribute, it should be set to a sequence of null bytes. (R,-W) (optional) (25-bytes)
72//
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
80// IANA assigned port: This attribute contains the TCP or UDP port value as assigned by [b-IANA]
81// for the management protocol associated with this virtual Ethernet interface. This attribute is
82// to be regarded as a hint, not as a requirement that management communications use this port; the
83// actual port and protocol are specified in the associated TCP/UDP config data ME. If no port has
84// been assigned or if the management protocol is free to be chosen at run-time, this attribute
85// should be set to 0xFFFF. (R) (mandatory) (2-bytes)
86//
87type VirtualEthernetInterfacePoint struct {
88 ManagedEntityDefinition
89 Attributes AttributeValueMap
90}
91
92func init() {
93 virtualethernetinterfacepointBME = &ManagedEntityDefinition{
94 Name: "VirtualEthernetInterfacePoint",
95 ClassID: 329,
96 MessageTypes: mapset.NewSetWith(
97 Get,
98 Set,
99 ),
100 AllowedAttributeMask: 0xf800,
101 AttributeDefinitions: AttributeDefinitionMap{
102 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
103 1: ByteField("AdministrativeState", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
104 2: ByteField("OperationalState", EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2),
105 3: MultiByteField("InterdomainName", StringAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 3),
106 4: Uint16Field("TcpUdpPointer", PointerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
107 5: Uint16Field("IanaAssignedPort", UnsignedIntegerAttributeType, 0x0800, 65535, mapset.NewSetWith(Read), false, false, false, 5),
108 },
109 Access: CreatedByOnu,
110 Support: UnknownSupport,
111 }
112}
113
114// NewVirtualEthernetInterfacePoint (class ID 329) creates the basic
115// Managed Entity definition that is used to validate an ME of this type that
116// is received from or transmitted to the OMCC.
117func NewVirtualEthernetInterfacePoint(params ...ParamData) (*ManagedEntity, OmciErrors) {
118 return NewManagedEntity(*virtualethernetinterfacepointBME, params...)
119}