blob: 9f91f49f177115b112f54011103c335ad9c80572 [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// OltGClassID is the 16-bit ID for the OMCI
29// Managed entity OLT-G
30const OltGClassID ClassID = ClassID(131)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
32var oltgBME *ManagedEntityDefinition
33
34// OltG (class ID #131)
35// This optional ME identifies the OLT to which an ONU is connected. This ME provides a way for the
36// ONU to configure itself for operability with a particular OLT. It also provides a way for the
37// OLT to communicate the time of day to the ONU.
38//
39// An ONU that supports this ME automatically creates an instance of it. Immediately following the
40// start-up phase, the OLT should set the ONU to the desired configuration. Interpretation of the
41// OLT vendor ID, equipment ID and version attributes is a matter for negotiation between the two
42// vendors involved.
43//
44// Relationships
45// The single instance of this ME is associated with the ONU ME.
46//
47// Attributes
48// Managed Entity Id
49// Managed entity ID: This attribute uniquely identifies each instance of this ME. There is only
Matteo Scandolof9d43412021-01-12 11:11:34 -080050// one instance, number 0. (R) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070051//
52// Olt Vendor Id
53// OLT vendor ID: This attribute identifies the OLT vendor. It is the same as the four most
54// significant bytes of an ONU serial number specified in the respective TC layer specification.
Matteo Scandolof9d43412021-01-12 11:11:34 -080055// Upon instantiation, this attribute comprises all spaces. (R,-W) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070056//
57// Equipment Id
58// Equipment ID: This attribute may be used to identify the specific type of OLT. The default value
59// of all spaces indicates that equipment ID information is not available or applicable to the OLT
Matteo Scandolof9d43412021-01-12 11:11:34 -080060// being represented. (R,-W) (mandatory) (20-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070061//
62// Version
63// Version: This attribute identifies the version of the OLT as defined by the vendor. The default
64// left-justified ASCII string "0" (padded with trailing nulls) indicates that version information
Matteo Scandolof9d43412021-01-12 11:11:34 -080065// is not available or applicable to the OLT being represented. (R,-W) (mandatory) (14-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070066//
67// Time Of Day Information
Matteo Scandolof9d43412021-01-12 11:11:34 -080068// NOTE - In ITU-T G.987/ITU-T G.989 systems, the superframe count field of the time of day
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070069// information attribute contains the 32 LSBs of the actual counter.
70//
71type OltG struct {
72 ManagedEntityDefinition
73 Attributes AttributeValueMap
74}
75
76func init() {
77 oltgBME = &ManagedEntityDefinition{
78 Name: "OltG",
79 ClassID: 131,
80 MessageTypes: mapset.NewSetWith(
81 Get,
82 Set,
83 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -080084 AllowedAttributeMask: 0xf000,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070085 AttributeDefinitions: AttributeDefinitionMap{
Matteo Scandolof9d43412021-01-12 11:11:34 -080086 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
87 1: MultiByteField("OltVendorId", StringAttributeType, 0x8000, 4, toOctets("ICAgIA=="), mapset.NewSetWith(Read, Write), false, false, false, 1),
88 2: MultiByteField("EquipmentId", StringAttributeType, 0x4000, 20, toOctets("ICAgICAgICAgICAgICAgICAgICA="), mapset.NewSetWith(Read, Write), false, false, false, 2),
89 3: MultiByteField("Version", StringAttributeType, 0x2000, 14, toOctets("MAAAAAAAAAAAAAAAAAA="), mapset.NewSetWith(Read, Write), false, false, false, 3),
90 4: MultiByteField("TimeOfDayInformation", OctetsAttributeType, 0x1000, 14, toOctets("AAAAAAAAAAAAAAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 4),
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070091 },
Matteo Scandolof9d43412021-01-12 11:11:34 -080092 Access: CreatedByOnu,
93 Support: UnknownSupport,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070094 }
95}
96
Matteo Scandolof9d43412021-01-12 11:11:34 -080097// NewOltG (class ID 131) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070098// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -080099// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700100func NewOltG(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800101 return NewManagedEntity(*oltgBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700102}