blob: f6df0c8fe330fe49b1215a293a1a64302b5013b9 [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 OmciClassId ClassID = ClassID(287)
25
26var omciBME *ManagedEntityDefinition
27
28// Omci (class ID #287)
29// This ME describes the ONU's general level of support for OMCI MEs and messages. This ME is not
30// included in an MIB upload.
31//
32// Relationships
33// One instance exists in the ONU. The ME entities are related to the OMCI entity.
34//
35// Attributes
36// Managed Entity Id
37// Managed entity ID: This attribute uniquely identifies each instance of this ME. There is only
38// one instance, number 0. (R) (mandatory) (2 bytes)
39//
40// Me Type Table
41// ME type table: This attribute lists the ME classes supported by the ONU. Each entry contains the
42// ME class value (see Table 11.2.4-1) of an ME type. (R) (mandatory) (2 * N bytes, where N is the
43// number of entries in the list.)
44//
45// Message Type Table
46// Message type table: This attribute is a list of message types (MTs) supported by the ONU. Each
47// entry contains the MT of an OMCI message (see Table 11.2.2-1). (R) (mandatory) (M bytes, where M
48// is the number of entries in the list.)
49//
50type Omci struct {
51 ManagedEntityDefinition
52 Attributes AttributeValueMap
53}
54
55func init() {
56 omciBME = &ManagedEntityDefinition{
57 Name: "Omci",
58 ClassID: 287,
59 MessageTypes: mapset.NewSetWith(
60 Get,
61 GetNext,
62 ),
63 AllowedAttributeMask: 0XC000,
64 AttributeDefinitions: AttributeDefinitionMap{
65 0: Uint16Field("ManagedEntityId", 0, mapset.NewSetWith(Read), false, false, false, false, 0),
66 1: TableField("MeTypeTable", TableInfo{0, 2}, mapset.NewSetWith(Read), false, false, false, 1),
67 2: TableField("MessageTypeTable", TableInfo{0, 1}, mapset.NewSetWith(Read), false, false, false, 2),
68 },
69 }
70}
71
72// NewOmci (class ID 287 creates the basic
73// Managed Entity definition that is used to validate an ME of this type that
74// is received from the wire, about to be sent on the wire.
75func NewOmci(params ...ParamData) (*ManagedEntity, OmciErrors) {
76 return NewManagedEntity(omciBME, params...)
77}