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