blob: ad594e09c709aa57e20b443c3524c4c5c4e410ef [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// UniGClassID is the 16-bit ID for the OMCI
26// Managed entity UNI-G
27const UniGClassID ClassID = ClassID(264)
28
29var unigBME *ManagedEntityDefinition
30
31// UniG (class ID #264)
32// This ME organizes data associated with UNIs supported by GEM. One instance of the UNI-G ME
33// exists for each UNI supported by the ONU.
34//
35// The ONU automatically creates or deletes instances of this ME upon the creation or deletion of a
36// real or virtual circuit pack ME, one per port.
37//
38// Relationships
39// An instance of the UNI-G ME exists for each instance of a PPTP ME.
40//
41// Attributes
42// Managed Entity Id
43// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
44// identical ID, this ME is implicitly linked to an instance of a PPTP. (R) (mandatory) (2-bytes)
45//
46// Deprecated
47// Deprecated: This attribute is not used. It should be set to 0 by the OLT and ignored by the ONU.
48// (R,-W) (mandatory) (2-bytes)
49//
50// Administrative State
51// NOTE - PPTP MEs also have an administrative state attribute. The user port is unlocked only if
52// both administrative state attributes are set to unlocked. It is recommended that this attribute
53// not be used: that the OLT set it to 0 and that the ONU ignore it.
54//
55// Management Capability
56// (R) (optional) (1-byte)
57//
58// Non_Omci Management Identifier
59// Non-OMCI management identifier: If a PPTP can be managed either directly by the OMCI or a non-
60// OMCI management environment, this attribute specifies how it is in fact to be managed. This
61// attribute is either 0 (default-=-OMCI management), or it is a pointer to a VEIP, which in turn
62// links to a non-OMCI management environment. (R,-W) (optional) (2-bytes)
63//
64// Relay Agent Options
65// 2/3/4:atm/123.4567
66//
67type UniG struct {
68 ManagedEntityDefinition
69 Attributes AttributeValueMap
70}
71
72func init() {
73 unigBME = &ManagedEntityDefinition{
74 Name: "UniG",
75 ClassID: 264,
76 MessageTypes: mapset.NewSetWith(
77 Get,
78 Set,
79 ),
80 AllowedAttributeMask: 0xf800,
81 AttributeDefinitions: AttributeDefinitionMap{
82 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
83 1: Uint16Field("Deprecated", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, true, 1),
84 2: ByteField("AdministrativeState", EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
85 3: ByteField("ManagementCapability", EnumerationAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, true, false, 3),
86 4: Uint16Field("NonOmciManagementIdentifier", PointerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
87 5: Uint16Field("RelayAgentOptions", PointerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5),
88 },
89 Access: CreatedByOnu,
90 Support: UnknownSupport,
91 }
92}
93
94// NewUniG (class ID 264) creates the basic
95// Managed Entity definition that is used to validate an ME of this type that
96// is received from or transmitted to the OMCC.
97func NewUniG(params ...ParamData) (*ManagedEntity, OmciErrors) {
98 return NewManagedEntity(*unigBME, params...)
99}