Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [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 | // TimeStatusMessageClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Time Status Message |
| 30 | const TimeStatusMessageClassID = ClassID(440) // 0x01b8 |
| 31 | |
| 32 | var timestatusmessageBME *ManagedEntityDefinition |
| 33 | |
| 34 | // TimeStatusMessage (Class ID: #440 / 0x01b8) |
| 35 | // This ME provides status and characterization information for the time-transmitting node and its |
| 36 | // grandmaster. An ONU that supports time synchronization automatically creates an instance of this |
| 37 | // ME. The best practise is to set all the attributes at the same time. |
| 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 | // Domain Number |
| 48 | // Using the format of clause 7.1 of [IEEE 1588]. The default value is 0. (R, W) (mandatory) (1 |
| 49 | // byte) |
| 50 | // |
| 51 | // Flag Field |
| 52 | // The field format is given in the table. Value 1 represents "true". (R, W) (mandatory) (1 byte) |
| 53 | // |
| 54 | // Currentutcoffset |
| 55 | // Provides the UTC offset value between the TAI and UTC timescales (UTC Offset-= TAI-- UTC), as |
| 56 | // specified in clause 7.2.3 of [IEEE 1588]. (R, W) (mandatory) (2 bytes) |
| 57 | // |
| 58 | // Priority1 |
| 59 | // As specified in clause 7.6.2.2 of [IEEE 1588]. (R, W) (mandatory) (1 byte) |
| 60 | // |
| 61 | // Clockclass |
| 62 | // Provides the clockClass information denoting the traceability of the time distributed by the |
| 63 | // grandmaster clock, as specified in clause 7.6.2.4 of [IEEE 1588]. (R, W) (mandatory) (1 byte) |
| 64 | // |
| 65 | // Accuracy |
| 66 | // Indicates the expected accuracy of a clock when it is the grandmaster, as specified in clause |
| 67 | // 7.6.2.5 of [IEEE 1588]. (R, W) (mandatory) (1 byte) |
| 68 | // |
| 69 | // Offsetscaledlogvariance |
| 70 | // Provides the estimate of the time variance, as specified in clause-7.6.3 of [IEEE 1588]. (R, W) |
| 71 | // (mandatory) (2 bytes) |
| 72 | // |
| 73 | // Priority2 |
| 74 | // As specified in clause 7.6.2.3 of [IEEE 1588]. (R, W) (mandatory) (1 byte) |
| 75 | // |
| 76 | // Grandmaster ID: The clockIdentity attribute of the grandmaster, taken from the IEEE EUI64 |
| 77 | // individual assigned numbers. (R, W) (mandatory) (8 bytes) |
| 78 | // |
| 79 | // Steps removed: Provides the number of boundary clocks between the local clock and the master. |
| 80 | // (R, W) (mandatory) (2 bytes) |
| 81 | // |
| 82 | // Time source: Indicates the source of time used by the grandmaster clock, as specified in clause |
| 83 | // 7.6.2.6 of [IEEE 1588]. (R, W) (mandatory) (1 byte) |
| 84 | // |
| 85 | type TimeStatusMessage struct { |
| 86 | ManagedEntityDefinition |
| 87 | Attributes AttributeValueMap |
| 88 | } |
| 89 | |
| 90 | func init() { |
| 91 | timestatusmessageBME = &ManagedEntityDefinition{ |
| 92 | Name: "TimeStatusMessage", |
| 93 | ClassID: 440, |
| 94 | MessageTypes: mapset.NewSetWith( |
| 95 | Get, |
| 96 | Set, |
| 97 | ), |
| 98 | AllowedAttributeMask: 0xff00, |
| 99 | AttributeDefinitions: AttributeDefinitionMap{ |
| 100 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 101 | 1: ByteField("DomainNumber", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1), |
| 102 | 2: ByteField("FlagField", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2), |
| 103 | 3: Uint16Field("Currentutcoffset", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3), |
| 104 | 4: ByteField("Priority1", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4), |
| 105 | 5: ByteField("Clockclass", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5), |
| 106 | 6: ByteField("Accuracy", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6), |
| 107 | 7: Uint16Field("Offsetscaledlogvariance", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7), |
| 108 | 8: ByteField("Priority2", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8), |
| 109 | }, |
| 110 | Access: CreatedByOnu, |
| 111 | Support: UnknownSupport, |
| 112 | Alarms: AlarmMap{ |
| 113 | 0: "Clock unlock", |
| 114 | 1: "ESMC loss", |
| 115 | 2: "Time unlock", |
| 116 | }, |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | // NewTimeStatusMessage (class ID 440) creates the basic |
| 121 | // Managed Entity definition that is used to validate an ME of this type that |
| 122 | // is received from or transmitted to the OMCC. |
| 123 | func NewTimeStatusMessage(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 124 | return NewManagedEntity(*timestatusmessageBME, params...) |
| 125 | } |