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 ReCommonAmplifierParametersClassId ClassID = ClassID(328) |
| 25 | |
| 26 | var recommonamplifierparametersBME *ManagedEntityDefinition |
| 27 | |
| 28 | // ReCommonAmplifierParameters (class ID #328) |
| 29 | // This ME organizes data associated with each OA supported by the RE. The management ONU |
| 30 | // automatically creates one instance of this ME for each upstream or downstream OA. |
| 31 | // |
| 32 | // Relationships |
| 33 | // An instance of this ME is associated with an instance of the RE downstream amplifier or RE |
| 34 | // upstream amplifier ME. |
| 35 | // |
| 36 | // Attributes |
| 37 | // Managed Entity Id |
| 38 | // NOTE – The type of the linked ME can be determined by uniqueness of slot and port. |
| 39 | // |
| 40 | // Gain |
| 41 | // Gain: This attribute reports the current measurement of the OA's gain, in decibels. Its value is |
| 42 | // a 2s complement integer with 0.25 dB granularity, and with a range from –32 dB to 31.5 dB. The |
| 43 | // value 0x7F indicates that the current measured gain is 0, i.e., negative infinity in decibels |
| 44 | // terms. (R) (optional) (1 byte) |
| 45 | // |
| 46 | // Lower Gain Threshold |
| 47 | // Lower gain threshold: This attribute specifies the gain the RE uses to declare the low gain |
| 48 | // alarm. Valid values are 0 dB (coded as 0x00) to 63.5 dB (coded as 0xFE). The default value 0xFF |
| 49 | // selects the RE's internal policy. (R, W) (optional) (1 byte) |
| 50 | // |
| 51 | // Upper Gain Threshold |
| 52 | // Upper gain threshold: This attribute specifies the gain the RE uses to declare the high gain |
| 53 | // alarm. Valid values are 0 dB (coded as 0x00) to 63.5 dB (coded as 0xFE). The default value 0xFF |
| 54 | // selects the RE's internal policy. (R, W) (optional) (1 byte) |
| 55 | // |
| 56 | // Target Gain |
| 57 | // Target gain: This attribute specifies the target gain, when the operational mode of the parent |
| 58 | // RE downstream or upstream amplifier is set to constant gain mode. Valid values are 0 dB (coded |
| 59 | // as 0x00) to 63.5 dB (coded as 0xFE). The default value 0xFF selects the RE's internal policy. |
| 60 | // (R, W) (optional) (1 byte) |
| 61 | // |
| 62 | // Device Temperature |
| 63 | // Device temperature: This attribute reports the temperature in degrees Celcius of the active |
| 64 | // device (SOA or pump) in the OA. Its value is a 2s complement integer with granularity 1/256 °C. |
| 65 | // (R) (optional) (2 bytes) |
| 66 | // |
| 67 | // Lower Device Temperature Threshold |
| 68 | // Lower device temperature threshold: This attribute is a 2s complement integer that specifies the |
| 69 | // temperature the RE uses to declare the low temperature alarm. Valid values are –64 to +63 °C in |
| 70 | // 0.5 °C increments. The default value 0x7F selects the RE's internal policy. (R, W) (optional) |
| 71 | // (1 byte) |
| 72 | // |
| 73 | // Upper Device Temperature Threshold |
| 74 | // Upper device temperature threshold: This attribute is a 2s complement integer that specifies the |
| 75 | // temperature the RE uses to declare the high temperature alarm. Valid values are –64 to +63 °C in |
| 76 | // 0.5 °C increments. The default value 0x7F selects the RE's internal policy. (R, W) (optional) |
| 77 | // (1 byte) |
| 78 | // |
| 79 | // Device Bias Current |
| 80 | // Device bias current: This attribute contains the measured bias current applied to the SOA or |
| 81 | // pump laser. Its value is an unsigned integer with granularity 2 mA. Valid values are 0 to |
| 82 | // 512 mA. (R) (optional) (1 byte) |
| 83 | // |
| 84 | // Amplifier Saturation Output Power |
| 85 | // Amplifier saturation output power: This attribute reports the saturation output power of the |
| 86 | // amplifier as specified by the manufacturer. Its value is an unsigned integer referred to 1 mW |
| 87 | // (i.e., dBm), with 0.1 dB granularity. (R) (optional) (2 bytes) |
| 88 | // |
| 89 | // Amplifier Noise Figure |
| 90 | // Amplifier noise figure: This attribute reports the intrinsic noise figure of the amplifier, as |
| 91 | // specified by the manufacturer. Its value is an unsigned integer with 0.1 dB granularity (R) |
| 92 | // (optional) (1 byte) |
| 93 | // |
| 94 | // Amplifier Saturation Gain |
| 95 | // Amplifier saturation gain: This attribute reports the gain of the amplifier at saturation, as |
| 96 | // specified by the manufacturer. Its value is an unsigned integer with 0.25 dB granularity, and |
| 97 | // with a range from 0 to 63.75 dB. (R) (optional) (1 byte) |
| 98 | // |
| 99 | type ReCommonAmplifierParameters struct { |
| 100 | ManagedEntityDefinition |
| 101 | Attributes AttributeValueMap |
| 102 | } |
| 103 | |
| 104 | func init() { |
| 105 | recommonamplifierparametersBME = &ManagedEntityDefinition{ |
| 106 | Name: "ReCommonAmplifierParameters", |
| 107 | ClassID: 328, |
| 108 | MessageTypes: mapset.NewSetWith( |
| 109 | Get, |
| 110 | Set, |
| 111 | ), |
| 112 | AllowedAttributeMask: 0XFFE0, |
| 113 | AttributeDefinitions: AttributeDefinitionMap{ |
| 114 | 0: Uint16Field("ManagedEntityId", 0, mapset.NewSetWith(Read), false, false, false, false, 0), |
| 115 | 1: ByteField("Gain", 0, mapset.NewSetWith(Read), false, false, true, false, 1), |
| 116 | 2: ByteField("LowerGainThreshold", 0, mapset.NewSetWith(Read, Write), false, false, true, false, 2), |
| 117 | 3: ByteField("UpperGainThreshold", 0, mapset.NewSetWith(Read, Write), false, false, true, false, 3), |
| 118 | 4: ByteField("TargetGain", 0, mapset.NewSetWith(Read, Write), false, false, true, false, 4), |
| 119 | 5: Uint16Field("DeviceTemperature", 0, mapset.NewSetWith(Read), false, false, true, false, 5), |
| 120 | 6: ByteField("LowerDeviceTemperatureThreshold", 0, mapset.NewSetWith(Read, Write), false, false, true, false, 6), |
| 121 | 7: ByteField("UpperDeviceTemperatureThreshold", 0, mapset.NewSetWith(Read, Write), false, false, true, false, 7), |
| 122 | 8: ByteField("DeviceBiasCurrent", 0, mapset.NewSetWith(Read), false, false, true, false, 8), |
| 123 | 9: Uint16Field("AmplifierSaturationOutputPower", 0, mapset.NewSetWith(Read), false, false, true, false, 9), |
| 124 | 10: ByteField("AmplifierNoiseFigure", 0, mapset.NewSetWith(Read), false, false, true, false, 10), |
| 125 | 11: ByteField("AmplifierSaturationGain", 0, mapset.NewSetWith(Read), false, false, true, false, 11), |
| 126 | }, |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | // NewReCommonAmplifierParameters (class ID 328 creates the basic |
| 131 | // Managed Entity definition that is used to validate an ME of this type that |
| 132 | // is received from the wire, about to be sent on the wire. |
| 133 | func NewReCommonAmplifierParameters(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 134 | return NewManagedEntity(recommonamplifierparametersBME, params...) |
| 135 | } |