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