blob: bc6e38be98780a117ef9d31c517337b88e664bfe [file] [log] [blame]
Andrea Campanella10426e22021-10-15 17:58:04 +02001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Elia Battiston9bfe1102022-02-03 10:38:03 +01004 *
Andrea Campanella10426e22021-10-15 17:58:04 +02005 * 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 *
Andrea Campanella10426e22021-10-15 17:58:04 +02009 * http://www.apache.org/licenses/LICENSE-2.0
Elia Battiston9bfe1102022-02-03 10:38:03 +010010 *
Andrea Campanella10426e22021-10-15 17:58:04 +020011 * 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 */
17/*
18 * 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 */
23
24package generated
25
26import "github.com/deckarep/golang-set"
27
28// OnuTimeConfigurationClassID is the 16-bit ID for the OMCI
29// Managed entity ONU time configuration
30const OnuTimeConfigurationClassID = ClassID(457) // 0x01c9
31
32var onutimeconfigurationBME *ManagedEntityDefinition
33
34// OnuTimeConfiguration (Class ID: #457 / 0x01c9)
35// This ME provides characterization and manipulation of OLT timestamp information. An ONU that
36// uses OLTbased time synchronization methods automatically creates an instance of this ME. There
37// is no intention that this ME be used to establish a precise time of day reference.
38//
39// Relationships
40// The single instance of this ME is associated with the ONU ME.
41//
42// Attributes
43// Managed Entity Id
44// This attribute uniquely identifies each instance of this ME. There is only one instance, number
45// 0. (R) (mandatory) (2 bytes)
46//
47// Current Local Onu Time
48// If the ONU has a real-time clock, it returns the local ONU time. This attribute returns the
49// current ONU time. The local ONU time and synchronize time time-format is the same. (R)
50// (mandatory) (7 bytes)
51//
52// Time Qualification Block
53// This attribute describes the time-qualification to be applied to the ONU RTC local time. The
54// following fields are supported:
55//
56// (R, W) (mandatory) (2 bytes)
57//
58type OnuTimeConfiguration struct {
59 ManagedEntityDefinition
60 Attributes AttributeValueMap
61}
62
Elia Battiston9bfe1102022-02-03 10:38:03 +010063// Attribute name constants
64
65const OnuTimeConfiguration_CurrentLocalOnuTime = "CurrentLocalOnuTime"
66const OnuTimeConfiguration_TimeQualificationBlock = "TimeQualificationBlock"
67
Andrea Campanella10426e22021-10-15 17:58:04 +020068func init() {
69 onutimeconfigurationBME = &ManagedEntityDefinition{
70 Name: "OnuTimeConfiguration",
Elia Battiston9bfe1102022-02-03 10:38:03 +010071 ClassID: OnuTimeConfigurationClassID,
Andrea Campanella10426e22021-10-15 17:58:04 +020072 MessageTypes: mapset.NewSetWith(
73 Get,
74 Set,
75 ),
76 AllowedAttributeMask: 0xc000,
77 AttributeDefinitions: AttributeDefinitionMap{
Elia Battiston9bfe1102022-02-03 10:38:03 +010078 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
79 1: MultiByteField(OnuTimeConfiguration_CurrentLocalOnuTime, OctetsAttributeType, 0x8000, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 1),
80 2: Uint16Field(OnuTimeConfiguration_TimeQualificationBlock, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
Andrea Campanella10426e22021-10-15 17:58:04 +020081 },
82 Access: CreatedByOnu,
83 Support: UnknownSupport,
84 }
85}
86
87// NewOnuTimeConfiguration (class ID 457) creates the basic
88// Managed Entity definition that is used to validate an ME of this type that
89// is received from or transmitted to the OMCC.
90func NewOnuTimeConfiguration(params ...ParamData) (*ManagedEntity, OmciErrors) {
91 return NewManagedEntity(*onutimeconfigurationBME, params...)
92}