Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
| 3 | * Copyright 2020-present Open Networking Foundation |
| 4 | |
| 5 | * 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 |
| 8 | |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 11 | * 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 | |
| 24 | package generated |
| 25 | |
| 26 | import "github.com/deckarep/golang-set" |
| 27 | |
| 28 | // OnuTimeConfigurationClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity ONU time configuration |
| 30 | const OnuTimeConfigurationClassID = ClassID(457) // 0x01c9 |
| 31 | |
| 32 | var 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 | // |
| 58 | type OnuTimeConfiguration struct { |
| 59 | ManagedEntityDefinition |
| 60 | Attributes AttributeValueMap |
| 61 | } |
| 62 | |
| 63 | func init() { |
| 64 | onutimeconfigurationBME = &ManagedEntityDefinition{ |
| 65 | Name: "OnuTimeConfiguration", |
| 66 | ClassID: 457, |
| 67 | MessageTypes: mapset.NewSetWith( |
| 68 | Get, |
| 69 | Set, |
| 70 | ), |
| 71 | AllowedAttributeMask: 0xc000, |
| 72 | AttributeDefinitions: AttributeDefinitionMap{ |
| 73 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 74 | 1: MultiByteField("CurrentLocalOnuTime", OctetsAttributeType, 0x8000, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 1), |
| 75 | 2: Uint16Field("TimeQualificationBlock", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2), |
| 76 | }, |
| 77 | Access: CreatedByOnu, |
| 78 | Support: UnknownSupport, |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | // NewOnuTimeConfiguration (class ID 457) creates the basic |
| 83 | // Managed Entity definition that is used to validate an ME of this type that |
| 84 | // is received from or transmitted to the OMCC. |
| 85 | func NewOnuTimeConfiguration(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 86 | return NewManagedEntity(*onutimeconfigurationBME, params...) |
| 87 | } |