blob: 0480bd626e01a7b128d21eb0f17ada99b8b86f6f [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
Elia Battiston9bfe1102022-02-03 10:38:03 +01004 *
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
Elia Battiston9bfe1102022-02-03 10:38:03 +01008 *
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Elia Battiston9bfe1102022-02-03 10:38:03 +010010 *
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 */
Girish Gowdra161d27a2021-05-05 12:01:44 -070017/*
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
Andrea Campanella10426e22021-10-15 17:58:04 +020030const OmciClassID = ClassID(287) // 0x011f
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
32var omciBME *ManagedEntityDefinition
33
Andrea Campanella10426e22021-10-15 17:58:04 +020034// Omci (Class ID: #287 / 0x011f)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070035// 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
Andrea Campanella10426e22021-10-15 17:58:04 +020043// This attribute uniquely identifies each instance of this ME. There is only one instance, number
44// 0. (R) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070045//
46// Me Type Table
Andrea Campanella10426e22021-10-15 17:58:04 +020047// This attribute lists the ME classes supported by the ONU. Each entry contains the ME class value
48// (see Table 11.2.4-1) of an ME type. (R) (mandatory) (2 * N bytes, where N is the number of
49// entries in the list.)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070050//
51// Message Type Table
Andrea Campanella10426e22021-10-15 17:58:04 +020052// This attribute is a list of message types (MTs) supported by the ONU. Each entry contains the MT
53// of an OMCI message (see Table-11.2.2-1). (R) (mandatory) (M bytes, where M is the number of
54// entries in the list.)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070055//
56type Omci struct {
57 ManagedEntityDefinition
58 Attributes AttributeValueMap
59}
60
Elia Battiston9bfe1102022-02-03 10:38:03 +010061// Attribute name constants
62
63const Omci_MeTypeTable = "MeTypeTable"
64const Omci_MessageTypeTable = "MessageTypeTable"
65
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070066func init() {
67 omciBME = &ManagedEntityDefinition{
68 Name: "Omci",
Elia Battiston9bfe1102022-02-03 10:38:03 +010069 ClassID: OmciClassID,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070070 MessageTypes: mapset.NewSetWith(
71 Get,
72 GetNext,
73 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -080074 AllowedAttributeMask: 0xc000,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070075 AttributeDefinitions: AttributeDefinitionMap{
Elia Battiston9bfe1102022-02-03 10:38:03 +010076 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
77 1: TableField(Omci_MeTypeTable, TableAttributeType, 0x8000, TableInfo{nil, 2}, mapset.NewSetWith(Read), false, false, false, 1),
78 2: TableField(Omci_MessageTypeTable, TableAttributeType, 0x4000, TableInfo{nil, 1}, mapset.NewSetWith(Read), false, false, false, 2),
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070079 },
Matteo Scandolof9d43412021-01-12 11:11:34 -080080 Access: CreatedByOnu,
81 Support: UnknownSupport,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070082 }
83}
84
Matteo Scandolof9d43412021-01-12 11:11:34 -080085// NewOmci (class ID 287) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070086// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -080087// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070088func NewOmci(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -080089 return NewManagedEntity(*omciBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070090}