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