blob: 58d8f6a6d245256bcd403f9d843be03603184e88 [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
4
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
Matteo Scandolof9d43412021-01-12 11:11:34 -08008
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Matteo Scandolof9d43412021-01-12 11:11:34 -080010
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 */
Girish Gowdra161d27a2021-05-05 12:01:44 -070017/*
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070018 * 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// UniGClassID is the 16-bit ID for the OMCI
29// Managed entity UNI-G
30const UniGClassID ClassID = ClassID(264)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
32var unigBME *ManagedEntityDefinition
33
34// UniG (class ID #264)
35// This ME organizes data associated with UNIs supported by GEM. One instance of the UNI-G ME
36// exists for each UNI supported by the ONU.
37//
38// The ONU automatically creates or deletes instances of this ME upon the creation or deletion of a
39// real or virtual circuit pack ME, one per port.
40//
41// Relationships
42// An instance of the UNI-G ME exists for each instance of a PPTP ME.
43//
44// Attributes
45// Managed Entity Id
46// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
Matteo Scandolof9d43412021-01-12 11:11:34 -080047// identical ID, this ME is implicitly linked to an instance of a PPTP. (R) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070048//
49// Deprecated
50// Deprecated: This attribute is not used. It should be set to 0 by the OLT and ignored by the ONU.
Matteo Scandolof9d43412021-01-12 11:11:34 -080051// (R,-W) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070052//
53// Administrative State
Matteo Scandolof9d43412021-01-12 11:11:34 -080054// NOTE - PPTP MEs also have an administrative state attribute. The user port is unlocked only if
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070055// both administrative state attributes are set to unlocked. It is recommended that this attribute
56// not be used: that the OLT set it to 0 and that the ONU ignore it.
57//
58// Management Capability
Matteo Scandolof9d43412021-01-12 11:11:34 -080059// (R) (optional) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070060//
61// Non_Omci Management Identifier
62// Non-OMCI management identifier: If a PPTP can be managed either directly by the OMCI or a non-
63// OMCI management environment, this attribute specifies how it is in fact to be managed. This
Matteo Scandolof9d43412021-01-12 11:11:34 -080064// attribute is either 0 (default-=-OMCI management), or it is a pointer to a VEIP, which in turn
65// links to a non-OMCI management environment. (R,-W) (optional) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070066//
67// Relay Agent Options
68// 2/3/4:atm/123.4567
69//
70type UniG struct {
71 ManagedEntityDefinition
72 Attributes AttributeValueMap
73}
74
75func init() {
76 unigBME = &ManagedEntityDefinition{
77 Name: "UniG",
78 ClassID: 264,
79 MessageTypes: mapset.NewSetWith(
80 Get,
81 Set,
82 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -080083 AllowedAttributeMask: 0xf800,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070084 AttributeDefinitions: AttributeDefinitionMap{
Matteo Scandolof9d43412021-01-12 11:11:34 -080085 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
86 1: Uint16Field("Deprecated", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, true, 1),
87 2: ByteField("AdministrativeState", EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
88 3: ByteField("ManagementCapability", EnumerationAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, true, false, 3),
89 4: Uint16Field("NonOmciManagementIdentifier", PointerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
90 5: Uint16Field("RelayAgentOptions", PointerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5),
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070091 },
Matteo Scandolof9d43412021-01-12 11:11:34 -080092 Access: CreatedByOnu,
93 Support: UnknownSupport,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070094 }
95}
96
Matteo Scandolof9d43412021-01-12 11:11:34 -080097// NewUniG (class ID 264) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070098// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -080099// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700100func NewUniG(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800101 return NewManagedEntity(*unigBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700102}