blob: c55bceb7a8c8fa2e3eebee4b2e4cd16783c1e3cd [file] [log] [blame]
Holger Hildebrandtfa074992020-03-27 15:42:06 +00001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00004 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00005 * 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
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00008 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +000011 * 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 */
David K. Bainbridged80007b2021-04-12 12:22:29 +000017/*
Holger Hildebrandtfa074992020-03-27 15:42:06 +000018 * 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 */
23
24package generated
25
26import "github.com/deckarep/golang-set"
27
28// ManagedEntityMeClassID is the 16-bit ID for the OMCI
29// Managed entity Managed entity ME
mpagenko836a1fd2021-11-01 16:12:42 +000030const ManagedEntityMeClassID = ClassID(288) // 0x0120
Holger Hildebrandtfa074992020-03-27 15:42:06 +000031
32var managedentitymeBME *ManagedEntityDefinition
33
mpagenko836a1fd2021-11-01 16:12:42 +000034// ManagedEntityMe (Class ID: #288 / 0x0120)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000035// The ME describes the details of each ME that is supported by the ONU. This ME is not included in
36// an MIB upload.
37//
38// Relationships
39// One or more MEs are related to the OMCI object entity.
40//
41// Attributes
42// Managed Entity Id
mpagenko836a1fd2021-11-01 16:12:42 +000043// This attribute uniquely identifies each instance of this ME. Its value is equal to the ME type
44// value, and is the same as the code found in the ME type table attribute of the OMCI ME and
45// Table-11.2.41. (R) (mandatory) (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000046//
47// Name
mpagenko836a1fd2021-11-01 16:12:42 +000048// This attribute contains a 25-byte ASCII coded mnemonic tag for the ME type. Strings shorter than
49// 25-bytes are padded with null characters. (R) (mandatory) (25-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000050//
51// Attributes Table
mpagenko836a1fd2021-11-01 16:12:42 +000052// This table contains pointers to the attribute MEs that describe each of this ME's attributes.
53// (R) (mandatory) (2 * X bytes, where X is the number of entries in the table.)
54//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000055// NOTE - The ME ID attribute is not included in the list, since the type of this attribute is
56// fixed.
57//
58// Access
mpagenko836a1fd2021-11-01 16:12:42 +000059// This attribute represents who creates this ME. The following code points are defined.
60//
61// 1 Created by the ONU
62//
63// 2 Created by the OLT
64//
65// 3 Created by both the ONU and OLT
66//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000067// (R) (mandatory) (1-byte)
68//
69// Alarms Table
mpagenko836a1fd2021-11-01 16:12:42 +000070// This attribute lists the alarm codes that are supported. (R) (mandatory) (Y bytes, where Y is
71// the number of entries in the table.)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000072//
73// Avcs Table
mpagenko836a1fd2021-11-01 16:12:42 +000074// This attribute lists the AVCs that are supported. (R) (mandatory) (Z bytes, where Z is the
75// number of entries in the table.)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000076//
77// Actions
mpagenko836a1fd2021-11-01 16:12:42 +000078// This attribute lists the action codes supported on this object, formatted as a bit map. The
79// action codes are the MTs from Table-11.2.2-1. The LSB represents action 0, and so on. (R)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000080// (mandatory) (4-bytes)
81//
82// Instances Table
mpagenko836a1fd2021-11-01 16:12:42 +000083// This attribute is a list of pointers to all instances of this ME. (R) (mandatory) (2 * V bytes,
84// where V is the number of entries in the table.)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000085//
86// Support
mpagenko836a1fd2021-11-01 16:12:42 +000087// This attribute represents the support capability of this ME in the ONU's implementation. This
88// attribute does not declare whether the OMCI implementation complies with the Recommendations,
89// but whether it complies with the OMCI declaration itself. The following code points are defined.
90//
91// 1 Supported (supported as defined in this object)
92//
93// 2 Unsupported (OMCI returns error code if accessed)
94//
95// 3 Partially supported (some aspects of ME supported)
96//
97// 4 Ignored (OMCI supported, but underlying function is not)
98//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000099// (R) (mandatory) (1-byte)
100//
101type ManagedEntityMe struct {
102 ManagedEntityDefinition
103 Attributes AttributeValueMap
104}
105
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000106// Attribute name constants
107
108const ManagedEntityMe_Name = "Name"
109const ManagedEntityMe_AttributesTable = "AttributesTable"
110const ManagedEntityMe_Access = "Access"
111const ManagedEntityMe_AlarmsTable = "AlarmsTable"
112const ManagedEntityMe_AvcsTable = "AvcsTable"
113const ManagedEntityMe_Actions = "Actions"
114const ManagedEntityMe_InstancesTable = "InstancesTable"
115const ManagedEntityMe_Support = "Support"
116
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000117func init() {
118 managedentitymeBME = &ManagedEntityDefinition{
119 Name: "ManagedEntityMe",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000120 ClassID: ManagedEntityMeClassID,
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000121 MessageTypes: mapset.NewSetWith(
122 Get,
123 GetNext,
124 ),
125 AllowedAttributeMask: 0xff00,
126 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000127 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
128 1: MultiByteField(ManagedEntityMe_Name, OctetsAttributeType, 0x8000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 1),
129 2: TableField(ManagedEntityMe_AttributesTable, TableAttributeType, 0x4000, TableInfo{nil, 2}, mapset.NewSetWith(Read), false, false, false, 2),
130 3: ByteField(ManagedEntityMe_Access, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
131 4: TableField(ManagedEntityMe_AlarmsTable, TableAttributeType, 0x1000, TableInfo{nil, 1}, mapset.NewSetWith(Read), false, false, false, 4),
132 5: TableField(ManagedEntityMe_AvcsTable, TableAttributeType, 0x0800, TableInfo{nil, 1}, mapset.NewSetWith(Read), false, false, false, 5),
133 6: Uint32Field(ManagedEntityMe_Actions, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
134 7: TableField(ManagedEntityMe_InstancesTable, TableAttributeType, 0x0200, TableInfo{nil, 2}, mapset.NewSetWith(Read), false, false, false, 7),
135 8: ByteField(ManagedEntityMe_Support, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000136 },
137 Access: CreatedByOnu,
138 Support: UnknownSupport,
139 }
140}
141
142// NewManagedEntityMe (class ID 288) creates the basic
143// Managed Entity definition that is used to validate an ME of this type that
144// is received from or transmitted to the OMCC.
145func NewManagedEntityMe(params ...ParamData) (*ManagedEntity, OmciErrors) {
146 return NewManagedEntity(*managedentitymeBME, params...)
147}