blob: 91354b504d6690571c28c9677cb216c0f935cd64 [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Andrea Campanella7167ebb2020-02-24 09:56:38 +01003 * Copyright 2020-present Open Networking Foundation
4
Chip Boling6e27b352020-02-14 09:10:01 -06005 * 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
Andrea Campanella7167ebb2020-02-24 09:56:38 +01008
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Andrea Campanella7167ebb2020-02-24 09:56:38 +010010
Chip Boling6e27b352020-02-14 09:10:01 -060011 * 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. Bainbridgeadf422d2021-04-09 16:06:41 +000017/*
Chip Boling6e27b352020-02-14 09:10:01 -060018 * 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
Chip Boling610117d2021-09-09 11:24:34 -050030const ManagedEntityMeClassID = ClassID(288) // 0x0120
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var managedentitymeBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// ManagedEntityMe (Class ID: #288 / 0x0120)
Chip Boling6e27b352020-02-14 09:10:01 -060035// 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
Chip Boling610117d2021-09-09 11:24:34 -050043// 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)
Chip Boling6e27b352020-02-14 09:10:01 -060046//
47// Name
Chip Boling610117d2021-09-09 11:24:34 -050048// 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)
Chip Boling6e27b352020-02-14 09:10:01 -060050//
51// Attributes Table
Chip Boling610117d2021-09-09 11:24:34 -050052// 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//
Chip Boling6e27b352020-02-14 09:10:01 -060055// NOTE - The ME ID attribute is not included in the list, since the type of this attribute is
56// fixed.
57//
58// Access
Chip Boling610117d2021-09-09 11:24:34 -050059// 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//
Chip Boling6e27b352020-02-14 09:10:01 -060067// (R) (mandatory) (1-byte)
68//
69// Alarms Table
Chip Boling610117d2021-09-09 11:24:34 -050070// This attribute lists the alarm codes that are supported. (R) (mandatory) (Y bytes, where Y is
71// the number of entries in the table.)
Chip Boling6e27b352020-02-14 09:10:01 -060072//
73// Avcs Table
Chip Boling610117d2021-09-09 11:24:34 -050074// This attribute lists the AVCs that are supported. (R) (mandatory) (Z bytes, where Z is the
75// number of entries in the table.)
Chip Boling6e27b352020-02-14 09:10:01 -060076//
77// Actions
Chip Boling610117d2021-09-09 11:24:34 -050078// 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)
Chip Boling6e27b352020-02-14 09:10:01 -060080// (mandatory) (4-bytes)
81//
82// Instances Table
Chip Boling610117d2021-09-09 11:24:34 -050083// 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.)
Chip Boling6e27b352020-02-14 09:10:01 -060085//
86// Support
Chip Boling610117d2021-09-09 11:24:34 -050087// 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//
Chip Boling6e27b352020-02-14 09:10:01 -060099// (R) (mandatory) (1-byte)
100//
101type ManagedEntityMe struct {
102 ManagedEntityDefinition
103 Attributes AttributeValueMap
104}
105
106func init() {
107 managedentitymeBME = &ManagedEntityDefinition{
108 Name: "ManagedEntityMe",
109 ClassID: 288,
110 MessageTypes: mapset.NewSetWith(
111 Get,
112 GetNext,
113 ),
114 AllowedAttributeMask: 0xff00,
115 AttributeDefinitions: AttributeDefinitionMap{
116 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
117 1: MultiByteField("Name", OctetsAttributeType, 0x8000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 1),
118 2: TableField("AttributesTable", TableAttributeType, 0x4000, TableInfo{nil, 2}, mapset.NewSetWith(Read), false, false, false, 2),
119 3: ByteField("Access", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
120 4: TableField("AlarmsTable", TableAttributeType, 0x1000, TableInfo{nil, 1}, mapset.NewSetWith(Read), false, false, false, 4),
121 5: TableField("AvcsTable", TableAttributeType, 0x0800, TableInfo{nil, 1}, mapset.NewSetWith(Read), false, false, false, 5),
122 6: Uint32Field("Actions", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
123 7: TableField("InstancesTable", TableAttributeType, 0x0200, TableInfo{nil, 2}, mapset.NewSetWith(Read), false, false, false, 7),
124 8: ByteField("Support", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
125 },
126 Access: CreatedByOnu,
127 Support: UnknownSupport,
128 }
129}
130
131// NewManagedEntityMe (class ID 288) creates the basic
132// Managed Entity definition that is used to validate an ME of this type that
133// is received from or transmitted to the OMCC.
134func NewManagedEntityMe(params ...ParamData) (*ManagedEntity, OmciErrors) {
135 return NewManagedEntity(*managedentitymeBME, params...)
136}