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