blob: d02bf93208781025b1e91f2faaf692cbc932b9dd [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 OltGClassId ClassID = ClassID(131)
25
26var oltgBME *ManagedEntityDefinition
27
28// OltG (class ID #131)
29// This optional ME identifies the OLT to which an ONU is connected. This ME provides a way for the
30// ONU to configure itself for operability with a particular OLT. It also provides a way for the
31// OLT to communicate the time of day to the ONU.
32//
33// An ONU that supports this ME automatically creates an instance of it. Immediately following the
34// start-up phase, the OLT should set the ONU to the desired configuration. Interpretation of the
35// OLT vendor ID, equipment ID and version attributes is a matter for negotiation between the two
36// vendors involved.
37//
38// Relationships
39// The single instance of this ME is associated with the ONU ME.
40//
41// Attributes
42// Managed Entity Id
43// Managed entity ID: This attribute uniquely identifies each instance of this ME. There is only
44// one instance, number 0. (R) (mandatory) (2 bytes)
45//
46// Olt Vendor Id
47// OLT vendor ID: This attribute identifies the OLT vendor. It is the same as the four most
48// significant bytes of an ONU serial number specified in the respective TC layer specification.
49// Upon instantiation, this attribute comprises all spaces. (R, W) (mandatory) (4 bytes)
50//
51// Equipment Id
52// Equipment ID: This attribute may be used to identify the specific type of OLT. The default value
53// of all spaces indicates that equipment ID information is not available or applicable to the OLT
54// being represented. (R, W) (mandatory) (20 bytes)
55//
56// Version
57// Version: This attribute identifies the version of the OLT as defined by the vendor. The default
58// left-justified ASCII string "0" (padded with trailing nulls) indicates that version information
59// is not available or applicable to the OLT being represented. (R, W) (mandatory) (14 bytes)
60//
61// Time Of Day Information
62// NOTE – In ITU-T G.987/ITU-T G.989 systems, the superframe count field of the time of day
63// information attribute contains the 32 LSBs of the actual counter.
64//
65type OltG struct {
66 ManagedEntityDefinition
67 Attributes AttributeValueMap
68}
69
70func init() {
71 oltgBME = &ManagedEntityDefinition{
72 Name: "OltG",
73 ClassID: 131,
74 MessageTypes: mapset.NewSetWith(
75 Get,
76 Set,
77 ),
78 AllowedAttributeMask: 0XF000,
79 AttributeDefinitions: AttributeDefinitionMap{
80 0: Uint16Field("ManagedEntityId", 0, mapset.NewSetWith(Read), false, false, false, false, 0),
81 1: Uint32Field("OltVendorId", 0, mapset.NewSetWith(Read, Write), false, false, false, false, 1),
82 2: MultiByteField("EquipmentId", 20, nil, mapset.NewSetWith(Read, Write), false, false, false, false, 2),
83 3: MultiByteField("Version", 14, nil, mapset.NewSetWith(Read, Write), false, false, false, false, 3),
84 4: MultiByteField("TimeOfDayInformation", 14, nil, mapset.NewSetWith(Read, Write), false, false, true, false, 4),
85 },
86 }
87}
88
89// NewOltG (class ID 131 creates the basic
90// Managed Entity definition that is used to validate an ME of this type that
91// is received from the wire, about to be sent on the wire.
92func NewOltG(params ...ParamData) (*ManagedEntity, OmciErrors) {
93 return NewManagedEntity(oltgBME, params...)
94}