blob: a47b10e1955a3ed993a81d9fa8d4ca6113d4f3bc [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
8 * Unless required by applicable law or agreed to in writing, software
9 * distributed under the License is distributed on an "AS IS" BASIS,
10 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 * See the License for the specific language governing permissions and
12 * limitations under the License.
13 */
14/*
15 * NOTE: This file was generated, manual edits will be overwritten!
16 *
17 * Generated by 'goCodeGenerator.py':
18 * https://github.com/cboling/OMCI-parser/README.md
19 */
20
21package generated
22
23import "github.com/deckarep/golang-set"
24
25// VirtualEthernetInterfacePointClassID is the 16-bit ID for the OMCI
26// Managed entity Virtual Ethernet interface point
27const VirtualEthernetInterfacePointClassID ClassID = ClassID(329)
28
29var virtualethernetinterfacepointBME *ManagedEntityDefinition
30
31// VirtualEthernetInterfacePoint (class ID #329)
32// This ME represents the data plane hand-off point in an ONU to a separate (non-OMCI) management
33// domain. The VEIP is managed by the OMCI, and is potentially known to the non-OMCI management
34// domain. One or more Ethernet traffic flows are present at this boundary.
35//
36// Instances of this ME are automatically created and deleted by the ONU. This is necessary because
37// the required downstream priority queues are subject to physical implementation constraints. The
38// OLT may use one or more of the VEIPs created by the ONU.
39//
40// It is expected that the ONU will create one VEIP for each non-OMCI management domain. At the
41// vendor's discretion, a VEIP may be created for each traffic class.
42//
43// Relationships
44// An instance of this ME is associated with an instance of a virtual Ethernet interface between
45// OMCI and non-OMCI management domains.
46//
47// Attributes
48// Managed Entity Id
49// Managed entity ID: This attribute uniquely identifies each instance of this ME. When used
50// independently of a cardholder and circuit pack, the ONU should assign IDs in the sequence 1, 2,
51// .... When used in conjunction with a cardholder and circuit pack, this 2 byte number indicates
52// the physical position of the VEIP. The first byte is the slot ID (defined in clause 9.1.5). The
53// second byte is the port ID, with the range 1..255. The values 0 and 0xFFFF are reserved. (R)
54// (mandatory) (2 bytes)
55//
56// Administrative State
57// Administrative state: This attribute locks (1) and unlocks (0) the functions performed by this
58// ME. Administrative state is further described in clause A.1.6. (R,-W) (mandatory) (1-byte)
59//
60// Operational State
61// Operational state: This attribute indicates whether the ME is capable of performing its
62// function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
63//
64// Interdomain Name
65// Interdomain name: This attribute is a character string that provides an optional way to identify
66// the VEIP to a non-OMCI management domain. The interface may also be identified by its ME ID,
67// [b-IANA] assigned port and possibly other ways. If the vendor offers no information in this
68// attribute, it should be set to a sequence of null bytes. (R,-W) (optional) (25-bytes)
69//
70// Tcp_Udp Pointer
71// TCP/UDP pointer: This attribute points to an instance of the TCP/UDP config data ME, which
72// provides for OMCI management of the non-OMCI management domain's IP connectivity. If no OMCI
73// management of the non-OMCI domain's IP connectivity is required, this attribute may be omitted
74// or set to its default, a null pointer. (R,-W) (optional) (2-bytes)
75//
76// Iana Assigned Port
77// IANA assigned port: This attribute contains the TCP or UDP port value as assigned by [b-IANA]
78// for the management protocol associated with this virtual Ethernet interface. This attribute is
79// to be regarded as a hint, not as a requirement that management communications use this port; the
80// actual port and protocol are specified in the associated TCP/UDP config data ME. If no port has
81// been assigned or if the management protocol is free to be chosen at run-time, this attribute
82// should be set to 0xFFFF. (R) (mandatory) (2-bytes)
83//
84type VirtualEthernetInterfacePoint struct {
85 ManagedEntityDefinition
86 Attributes AttributeValueMap
87}
88
89func init() {
90 virtualethernetinterfacepointBME = &ManagedEntityDefinition{
91 Name: "VirtualEthernetInterfacePoint",
92 ClassID: 329,
93 MessageTypes: mapset.NewSetWith(
94 Get,
95 Set,
96 ),
97 AllowedAttributeMask: 0xf800,
98 AttributeDefinitions: AttributeDefinitionMap{
99 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
100 1: ByteField("AdministrativeState", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
101 2: ByteField("OperationalState", EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2),
102 3: MultiByteField("InterdomainName", StringAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 3),
103 4: Uint16Field("TcpUdpPointer", PointerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
104 5: Uint16Field("IanaAssignedPort", UnsignedIntegerAttributeType, 0x0800, 65535, mapset.NewSetWith(Read), false, false, false, 5),
105 },
106 Access: CreatedByOnu,
107 Support: UnknownSupport,
108 }
109}
110
111// NewVirtualEthernetInterfacePoint (class ID 329) creates the basic
112// Managed Entity definition that is used to validate an ME of this type that
113// is received from or transmitted to the OMCC.
114func NewVirtualEthernetInterfacePoint(params ...ParamData) (*ManagedEntity, OmciErrors) {
115 return NewManagedEntity(*virtualethernetinterfacepointBME, params...)
116}