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