blob: e405e66285bbebd7b127716c08c3a521fbfaae90 [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 AttributeMeClassId ClassID = ClassID(289)
25
26var attributemeBME *ManagedEntityDefinition
27
28// AttributeMe (class ID #289)
29// This ME describes a particular attribute type that is supported by the ONU. This ME is not
30// included in an MIB upload.
31//
32// Relationships
33// One or more attribute entities are related to each ME entity. More than one ME entity can refer
34// to a given attribute entity.
35//
36// Attributes
37// Managed Entity Id
38// Managed entity ID: This attribute uniquely identifies each instance of this ME. This number is
39// the same as the one that appears in the attributes table in the ME. Only one instance of each
40// unique attribute need be created. The ONU can assign attribute numbering as it pleases, out of
41// the pool of 64K IDs; however, it is suggested that the numbering follow a rational scheme to aid
42// human readability. (R) (mandatory) (2 bytes)
43//
44// Name
45// Name: This attribute contains a 25 byte mnemonic tag for the attribute. Strings shorter than
46// 25 bytes are padded with null characters. (R) (mandatory) (25 bytes)
47//
48// Size
49// Size: This attribute contains the size of the attribute, in bytes. The value 0 indicates that
50// the attribute can have a variable/unknown size. (R) (mandatory) (2 bytes)
51//
52// Access
53// (R) (mandatory) (1 byte)
54//
55// Format
56// (R) (mandatory) (1 byte)
57//
58// Lower Limit
59// Lower limit: This attribute provides the lowest value for the attribute. Valid for numeric types
60// (pointer, signed integer, unsigned integer) only. For attributes smaller than 4 bytes, the
61// desired numeric value is expressed in 4 byte representation (for example, the 2s complement
62// 1 byte integer 0xFE is expressed as 0xFFFF FFFE; the unsigned 1 byte integer 0xFE is expressed
63// as 0x0000 00FE). (R) (mandatory) (4 bytes)
64//
65// Upper Limit
66// Upper limit: This attribute provides the highest value for the attribute. It has the same
67// validity and format as the lower limit attribute. (R) (mandatory) (4 bytes)
68//
69// Bit Field
70// Bit field: This attribute is a mask of the supported bits in a bit field attribute, valid for
71// bit field type only. A 1 in any position signifies that its code point is supported, while 0
72// indicates that it is not supported. For bit fields smaller than 4 bytes, the attribute is
73// aligned at the least significant end of the mask. (R) (mandatory) (4 bytes)
74//
75// Code Points Table
76// Code points table: This attribute lists the code points supported by an enumerated attribute.
77// (R) (mandatory) (2 * Q bytes, where Q is the number of entries in the table.)
78//
79// Support
80// (R) (mandatory) (1 byte)
81//
82type AttributeMe struct {
83 ManagedEntityDefinition
84 Attributes AttributeValueMap
85}
86
87func init() {
88 attributemeBME = &ManagedEntityDefinition{
89 Name: "AttributeMe",
90 ClassID: 289,
91 MessageTypes: mapset.NewSetWith(
92 Get,
93 GetNext,
94 ),
95 AllowedAttributeMask: 0XFF80,
96 AttributeDefinitions: AttributeDefinitionMap{
97 0: Uint16Field("ManagedEntityId", 0, mapset.NewSetWith(Read), false, false, false, false, 0),
98 1: MultiByteField("Name", 25, nil, mapset.NewSetWith(Read), false, false, false, false, 1),
99 2: Uint16Field("Size", 0, mapset.NewSetWith(Read), false, false, false, false, 2),
100 3: ByteField("Access", 0, mapset.NewSetWith(Read), false, false, false, false, 3),
101 4: ByteField("Format", 0, mapset.NewSetWith(Read), false, false, false, false, 4),
102 5: Uint32Field("LowerLimit", 0, mapset.NewSetWith(Read), false, false, false, false, 5),
103 6: Uint32Field("UpperLimit", 0, mapset.NewSetWith(Read), false, false, false, false, 6),
104 7: Uint32Field("BitField", 0, mapset.NewSetWith(Read), false, false, false, false, 7),
105 8: TableField("CodePointsTable", TableInfo{0, 2}, mapset.NewSetWith(Read), false, false, false, 8),
106 9: ByteField("Support", 0, mapset.NewSetWith(Read), false, false, false, false, 9),
107 },
108 }
109}
110
111// NewAttributeMe (class ID 289 creates the basic
112// Managed Entity definition that is used to validate an ME of this type that
113// is received from the wire, about to be sent on the wire.
114func NewAttributeMe(params ...ParamData) (*ManagedEntity, OmciErrors) {
115 return NewManagedEntity(attributemeBME, params...)
116}