Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 3 | * Copyright 2020-present Open Networking Foundation |
| 4 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 5 | * 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 |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 8 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 10 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 11 | * 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 Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 23 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 24 | package generated |
| 25 | |
| 26 | import "github.com/deckarep/golang-set" |
| 27 | |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 28 | // VirtualEthernetInterfacePointClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Virtual Ethernet interface point |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 30 | const VirtualEthernetInterfacePointClassID = ClassID(329) // 0x0149 |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 31 | |
| 32 | var virtualethernetinterfacepointBME *ManagedEntityDefinition |
| 33 | |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 34 | // VirtualEthernetInterfacePoint (Class ID: #329 / 0x0149) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 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 |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 52 | // 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 Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 58 | // |
| 59 | // Administrative State |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 60 | // 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 Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 62 | // |
| 63 | // Operational State |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 64 | // 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 Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 66 | // |
| 67 | // Interdomain Name |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 68 | // 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 Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 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 |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 77 | // or set to its default, a null pointer. (R,-W) (optional) (2-bytes) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 78 | // |
| 79 | // Iana Assigned Port |
Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 80 | // 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 Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 86 | // |
| 87 | type VirtualEthernetInterfacePoint struct { |
| 88 | ManagedEntityDefinition |
| 89 | Attributes AttributeValueMap |
| 90 | } |
| 91 | |
| 92 | func init() { |
| 93 | virtualethernetinterfacepointBME = &ManagedEntityDefinition{ |
| 94 | Name: "VirtualEthernetInterfacePoint", |
| 95 | ClassID: 329, |
| 96 | MessageTypes: mapset.NewSetWith( |
| 97 | Get, |
| 98 | Set, |
| 99 | ), |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 100 | AllowedAttributeMask: 0xf800, |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 101 | AttributeDefinitions: AttributeDefinitionMap{ |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 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 | Alarms: AlarmMap{ |
| 112 | 0: "Connecting function fail", |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 113 | }, |
| 114 | } |
| 115 | } |
| 116 | |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 117 | // NewVirtualEthernetInterfacePoint (class ID 329) creates the basic |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 118 | // Managed Entity definition that is used to validate an ME of this type that |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 119 | // is received from or transmitted to the OMCC. |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 120 | func NewVirtualEthernetInterfacePoint(params ...ParamData) (*ManagedEntity, OmciErrors) { |
Matteo Scandolo | f9d4341 | 2021-01-12 11:11:34 -0800 | [diff] [blame] | 121 | return NewManagedEntity(*virtualethernetinterfacepointBME, params...) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 122 | } |