Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 1 | /* |
| 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 | */ |
| 20 | package generated |
| 21 | |
| 22 | import "github.com/deckarep/golang-set" |
| 23 | |
| 24 | const ReDownstreamAmplifierClassId ClassID = ClassID(316) |
| 25 | |
| 26 | var redownstreamamplifierBME *ManagedEntityDefinition |
| 27 | |
| 28 | // ReDownstreamAmplifier (class ID #316) |
| 29 | // This ME organizes data associated with each OA for downstream data supported by the RE. The |
| 30 | // management ONU automatically creates one instance of this ME for each downstream OA as follows. |
| 31 | // |
| 32 | // • When the RE has mid-span PON RE downstream OA ports built into its factory configuration. |
| 33 | // |
| 34 | // • When a cardholder is provisioned to expect a circuit pack of the mid-span PON RE downstream OA |
| 35 | // type. |
| 36 | // |
| 37 | // • When a cardholder provisioned for plug-and-play is equipped with a circuit pack of the midspan |
| 38 | // PON RE downstream OA type. Note that the installation of a plug-and-play card may indicate the |
| 39 | // presence of a mid-span PON RE downstream OA via equipment ID as well as its type attribute, and |
| 40 | // indeed may cause the management ONU to instantiate a port-mapping package to specify the ports |
| 41 | // precisely. |
| 42 | // |
| 43 | // The management ONU automatically deletes instances of this ME when a cardholder is neither |
| 44 | // provisioned to expect a mid-span PON RE downstream OA circuit pack, nor is it equipped with a |
| 45 | // mid-span PON RE downstream OA circuit pack. |
| 46 | // |
| 47 | // Relationships |
| 48 | // An instance of this ME is associated with a downstream OA and with an instance of a circuit |
| 49 | // pack. If the RE includes OEO regeneration in either direction, the RE downstream amplifier is |
| 50 | // also associated with an RE ANI-G. Refer to clause 9.14.1 for further discussion. |
| 51 | // |
| 52 | // Attributes |
| 53 | // Managed Entity Id |
| 54 | // NOTE 1 – This ME ID may be identical to that of an RE ANI-G if it shares the same physical slot- |
| 55 | // port. |
| 56 | // |
| 57 | // Administrative State |
| 58 | // NOTE 2– When an RE supports multiple PONs, or protected access to a single PON, its primary |
| 59 | // ANI-G cannot be completely shut down, due to a loss of the management communications capability. |
| 60 | // Complete blocking of service and removal of power may nevertheless be appropriate for secondary |
| 61 | // RE ANI-Gs. Administrative lock suppresses alarms and notifications for both primary and |
| 62 | // secondary RE ANI-Gs. Administrative lock suppresses alarms and notifications for an RE |
| 63 | // downstream amplifier, be it either primary or secondary. |
| 64 | // |
| 65 | // Operational State |
| 66 | // Operational state: This attribute indicates whether the ME is capable of performing its |
| 67 | // function. Valid values are enabled (0) and disabled (1). (R) (optional) (1 byte) |
| 68 | // |
| 69 | // Arc |
| 70 | // ARC: See clause A.1.4.3. (R, W) (optional) (1 byte) |
| 71 | // |
| 72 | // Arc Interval |
| 73 | // ARC interval: See clause A.1.4.3. (R, W) (optional) (1 byte) |
| 74 | // |
| 75 | // Operational Mode |
| 76 | // (R,W) (mandatory) (1 byte) |
| 77 | // |
| 78 | // Input Optical Signal Level |
| 79 | // Input optical signal level: This attribute reports the current measurement of the input optical |
| 80 | // signal power of the downstream OA. Its value is a 2s complement integer referred to 1 mW (i.e., |
| 81 | // dBm), with 0.002 dB granularity. (R) (optional) (2 bytes) |
| 82 | // |
| 83 | // Lower Input Optical Threshold |
| 84 | // Lower input optical threshold: This attribute specifies the optical level the RE uses to declare |
| 85 | // the low received optical power alarm. Valid values are –127 dBm (coded as 254) to 0 dBm (coded |
| 86 | // as 0) in 0.5 dB increments. The default value 0xFF selects the RE's internal policy. (R, W) |
| 87 | // (optional) (1 byte) |
| 88 | // |
| 89 | // Upper Input Optical Threshold |
| 90 | // Upper input optical threshold: This attribute specifies the optical level the RE uses to declare |
| 91 | // the high received optical power alarm. Valid values are –127 dBm (coded as 254) to 0 dBm (coded |
| 92 | // as 0) in 0.5 dB increments. The default value 0xFF selects the RE's internal policy. (R, W) |
| 93 | // (optional) (1 byte) |
| 94 | // |
| 95 | // Output Optical Signal Level |
| 96 | // Output optical signal level: This attribute reports the current measurement of the mean optical |
| 97 | // launch power of the downstream OA. Its value is a 2s complement integer referred to 1 mW (i.e., |
| 98 | // dBm), with 0.002 dB granularity. (R) (optional) (2 bytes) |
| 99 | // |
| 100 | // Lower Output Optical Threshold |
| 101 | // Lower output optical threshold: This attribute specifies the minimum mean optical launch power |
| 102 | // that the RE uses to declare the low transmit optical power alarm. Its value is a 2s complement |
| 103 | // integer referred to 1 mW (i.e., dBm), with 0.5 dB granularity. The default value 0x7F selects |
| 104 | // the RE's internal policy. (R, W) (optional) (1 byte) |
| 105 | // |
| 106 | // Upper Output Optical Threshold |
| 107 | // Upper output optical threshold: This attribute specifies the maximum mean optical launch power |
| 108 | // that the RE uses to declare the high transmit optical power alarm. Its value is a 2s complement |
| 109 | // integer referred to 1 mW (i.e., dBm), with 0.5 dB granularity. The default value 0x7F selects |
| 110 | // the RE's internal policy. (R, W) (optional) (1 byte) |
| 111 | // |
| 112 | // R'S' Splitter Coupling Ratio |
| 113 | // R'S' splitter coupling ratio: This attribute reports the coupling ratio of the splitter at the |
| 114 | // R'/S' interface that connects the embedded management ONU and the amplifiers to the OTL. Valid |
| 115 | // values are 99:1 (coded as 99 decimal) to 1:99 (coded as 1 decimal), where the first value is the |
| 116 | // value encoded and is the percentage of the optical signal connected to the amplifier. The |
| 117 | // default value 0xFF indicates that there is no splitter connected to this upstream/downstream |
| 118 | // amplifier pair. (R) (optional) (1 byte) |
| 119 | // |
| 120 | type ReDownstreamAmplifier struct { |
| 121 | ManagedEntityDefinition |
| 122 | Attributes AttributeValueMap |
| 123 | } |
| 124 | |
| 125 | func init() { |
| 126 | redownstreamamplifierBME = &ManagedEntityDefinition{ |
| 127 | Name: "ReDownstreamAmplifier", |
| 128 | ClassID: 316, |
| 129 | MessageTypes: mapset.NewSetWith( |
| 130 | Get, |
| 131 | Set, |
| 132 | Test, |
| 133 | ), |
| 134 | AllowedAttributeMask: 0XFFF0, |
| 135 | AttributeDefinitions: AttributeDefinitionMap{ |
| 136 | 0: Uint16Field("ManagedEntityId", 0, mapset.NewSetWith(Read), false, false, false, false, 0), |
| 137 | 1: ByteField("AdministrativeState", 0, mapset.NewSetWith(Read, Write), false, false, false, false, 1), |
| 138 | 2: ByteField("OperationalState", 0, mapset.NewSetWith(Read), true, false, true, false, 2), |
| 139 | 3: ByteField("Arc", 0, mapset.NewSetWith(Read, Write), true, false, true, false, 3), |
| 140 | 4: ByteField("ArcInterval", 0, mapset.NewSetWith(Read, Write), false, false, true, false, 4), |
| 141 | 5: ByteField("OperationalMode", 0, mapset.NewSetWith(Read, Write), false, false, false, false, 5), |
| 142 | 6: Uint16Field("InputOpticalSignalLevel", 0, mapset.NewSetWith(Read), false, false, true, false, 6), |
| 143 | 7: ByteField("LowerInputOpticalThreshold", 0, mapset.NewSetWith(Read, Write), false, false, true, false, 7), |
| 144 | 8: ByteField("UpperInputOpticalThreshold", 0, mapset.NewSetWith(Read, Write), false, false, true, false, 8), |
| 145 | 9: Uint16Field("OutputOpticalSignalLevel", 0, mapset.NewSetWith(Read), false, false, true, false, 9), |
| 146 | 10: ByteField("LowerOutputOpticalThreshold", 0, mapset.NewSetWith(Read, Write), false, false, true, false, 10), |
| 147 | 11: ByteField("UpperOutputOpticalThreshold", 0, mapset.NewSetWith(Read, Write), false, false, true, false, 11), |
| 148 | 12: ByteField("R'S'SplitterCouplingRatio", 0, mapset.NewSetWith(Read), false, false, true, false, 12), |
| 149 | }, |
| 150 | } |
| 151 | } |
| 152 | |
| 153 | // NewReDownstreamAmplifier (class ID 316 creates the basic |
| 154 | // Managed Entity definition that is used to validate an ME of this type that |
| 155 | // is received from the wire, about to be sent on the wire. |
| 156 | func NewReDownstreamAmplifier(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 157 | return NewManagedEntity(redownstreamamplifierBME, params...) |
| 158 | } |