blob: 331674ba8a4c4102cebac9854f0487ca31612c4f [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Matteo Scandolof9d43412021-01-12 11:11:34 -08003 * Copyright 2020-present Open Networking Foundation
4
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07005 * 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
Matteo Scandolof9d43412021-01-12 11:11:34 -08008
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Matteo Scandolof9d43412021-01-12 11:11:34 -080010
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070011 * 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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080017 /*
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070018 * 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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080023
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070024package generated
25
26import "github.com/deckarep/golang-set"
27
Matteo Scandolof9d43412021-01-12 11:11:34 -080028// OmciClassID is the 16-bit ID for the OMCI
29// Managed entity OMCI
30const OmciClassID ClassID = ClassID(287)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
32var omciBME *ManagedEntityDefinition
33
34// Omci (class ID #287)
35// This ME describes the ONU's general level of support for OMCI MEs and messages. This ME is not
36// included in an MIB upload.
37//
38// Relationships
39// One instance exists in the ONU. The ME entities are related to the OMCI entity.
40//
41// Attributes
42// Managed Entity Id
43// Managed entity ID: This attribute uniquely identifies each instance of this ME. There is only
Matteo Scandolof9d43412021-01-12 11:11:34 -080044// one instance, number 0. (R) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070045//
46// Me Type Table
47// ME type table: This attribute lists the ME classes supported by the ONU. Each entry contains the
48// ME class value (see Table 11.2.4-1) of an ME type. (R) (mandatory) (2 * N bytes, where N is the
49// number of entries in the list.)
50//
51// Message Type Table
52// Message type table: This attribute is a list of message types (MTs) supported by the ONU. Each
Matteo Scandolof9d43412021-01-12 11:11:34 -080053// entry contains the MT of an OMCI message (see Table-11.2.2-1). (R) (mandatory) (M bytes, where M
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070054// is the number of entries in the list.)
55//
56type Omci struct {
57 ManagedEntityDefinition
58 Attributes AttributeValueMap
59}
60
61func init() {
62 omciBME = &ManagedEntityDefinition{
63 Name: "Omci",
64 ClassID: 287,
65 MessageTypes: mapset.NewSetWith(
66 Get,
67 GetNext,
68 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -080069 AllowedAttributeMask: 0xc000,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070070 AttributeDefinitions: AttributeDefinitionMap{
Matteo Scandolof9d43412021-01-12 11:11:34 -080071 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
72 1: TableField("MeTypeTable", TableAttributeType, 0x8000, TableInfo{nil, 2}, mapset.NewSetWith(Read), false, false, false, 1),
73 2: TableField("MessageTypeTable", TableAttributeType, 0x4000, TableInfo{nil, 1}, mapset.NewSetWith(Read), false, false, false, 2),
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070074 },
Matteo Scandolof9d43412021-01-12 11:11:34 -080075 Access: CreatedByOnu,
76 Support: UnknownSupport,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070077 }
78}
79
Matteo Scandolof9d43412021-01-12 11:11:34 -080080// NewOmci (class ID 287) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070081// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -080082// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070083func NewOmci(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -080084 return NewManagedEntity(*omciBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070085}