blob: c475d961e2466389202f89a9ef562b9ca030729f [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// ManagedEntityMeClassID is the 16-bit ID for the OMCI
26// Managed entity Managed entity ME
27const ManagedEntityMeClassID ClassID = ClassID(288)
28
29var managedentitymeBME *ManagedEntityDefinition
30
31// ManagedEntityMe (class ID #288)
32// The ME describes the details of each ME that is supported by the ONU. This ME is not included in
33// an MIB upload.
34//
35// Relationships
36// One or more MEs are related to the OMCI object entity.
37//
38// Attributes
39// Managed Entity Id
40// Managed entity ID: This attribute uniquely identifies each instance of this ME. Its value is
41// equal to the ME type value, and is the same as the code found in the ME type table attribute of
42// the OMCI ME and Table-11.2.41. (R) (mandatory) (2-bytes)
43//
44// Name
45// Name: This attribute contains a 25-byte ASCII coded mnemonic tag for the ME type. Strings
46// shorter than 25-bytes are padded with null characters. (R) (mandatory) (25-bytes)
47//
48// Attributes Table
49// NOTE - The ME ID attribute is not included in the list, since the type of this attribute is
50// fixed.
51//
52// Access
53// (R) (mandatory) (1-byte)
54//
55// Alarms Table
56// Alarms table: This attribute lists the alarm codes that are supported. (R) (mandatory) (Y bytes,
57// where Y is the number of entries in the table.)
58//
59// Avcs Table
60// AVCs table: This attribute lists the AVCs that are supported. (R) (mandatory) (Z bytes, where Z
61// is the number of entries in the table.)
62//
63// Actions
64// Actions: This attribute lists the action codes supported on this object, formatted as a bit map.
65// The action codes are the MTs from Table-11.2.2-1. The LSB represents action 0, and so on. (R)
66// (mandatory) (4-bytes)
67//
68// Instances Table
69// Instances table: This attribute is a list of pointers to all instances of this ME. (R)
70// (mandatory) (2 * V bytes, where V is the number of entries in the table.)
71//
72// Support
73// (R) (mandatory) (1-byte)
74//
75type ManagedEntityMe struct {
76 ManagedEntityDefinition
77 Attributes AttributeValueMap
78}
79
80func init() {
81 managedentitymeBME = &ManagedEntityDefinition{
82 Name: "ManagedEntityMe",
83 ClassID: 288,
84 MessageTypes: mapset.NewSetWith(
85 Get,
86 GetNext,
87 ),
88 AllowedAttributeMask: 0xff00,
89 AttributeDefinitions: AttributeDefinitionMap{
90 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
91 1: MultiByteField("Name", OctetsAttributeType, 0x8000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 1),
92 2: TableField("AttributesTable", TableAttributeType, 0x4000, TableInfo{nil, 2}, mapset.NewSetWith(Read), false, false, false, 2),
93 3: ByteField("Access", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
94 4: TableField("AlarmsTable", TableAttributeType, 0x1000, TableInfo{nil, 1}, mapset.NewSetWith(Read), false, false, false, 4),
95 5: TableField("AvcsTable", TableAttributeType, 0x0800, TableInfo{nil, 1}, mapset.NewSetWith(Read), false, false, false, 5),
96 6: Uint32Field("Actions", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
97 7: TableField("InstancesTable", TableAttributeType, 0x0200, TableInfo{nil, 2}, mapset.NewSetWith(Read), false, false, false, 7),
98 8: ByteField("Support", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
99 },
100 Access: CreatedByOnu,
101 Support: UnknownSupport,
102 }
103}
104
105// NewManagedEntityMe (class ID 288) creates the basic
106// Managed Entity definition that is used to validate an ME of this type that
107// is received from or transmitted to the OMCC.
108func NewManagedEntityMe(params ...ParamData) (*ManagedEntity, OmciErrors) {
109 return NewManagedEntity(*managedentitymeBME, params...)
110}