1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240
|
# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright 2020 Raritan Inc. All rights reserved.
#
# This file was generated by IdlC from Sensor.idl.
use strict;
package Raritan::RPC::sensors::Sensor_4_0_1;
use parent qw(Raritan::RPC::RemoteObject);
use constant typeId => "sensors.Sensor:4.0.1";
sub new {
my ($class, $agent, $rid, $typeId) = @_;
$typeId = $typeId || Raritan::RPC::sensors::Sensor_4_0_1::typeId;
return $class->SUPER::new($agent, $rid, $typeId);
}
use constant ERR_NOT_SUPPORTED => 1;
use constant NUMERIC => 0;
use constant DISCRETE_ON_OFF => 1;
use constant DISCRETE_MULTI => 2;
use constant UNSPECIFIED => 0;
use constant VOLTAGE => 1;
use constant CURRENT => 2;
use constant UNBALANCE_CURRENT => 3;
use constant POWER => 4;
use constant POWER_FACTOR => 5;
use constant ENERGY => 6;
use constant FREQUENCY => 7;
use constant TEMPERATURE => 8;
use constant HUMIDITY => 9;
use constant AIR_FLOW => 10;
use constant AIR_PRESSURE => 11;
use constant CONTACT_CLOSURE => 12;
use constant ON_OFF_SENSOR => 13;
use constant TRIP_SENSOR => 14;
use constant VIBRATION => 15;
use constant WATER_LEAK => 16;
use constant SMOKE_DETECTOR => 17;
use constant TOTAL_HARMONIC_DISTORTION => 18;
use constant MASS => 19;
use constant ELECTRICAL_RESISTANCE => 20;
use constant FLUX => 21;
use constant LUMINOUS_INTENSITY => 22;
use constant ACCELERATION => 23;
use constant MAGNETIC_FLUX_DENSITY => 24;
use constant ELECTRIC_FIELD_STRENGTH => 25;
use constant MAGNETIC_FIELD_STRENGTH => 26;
use constant ANGLE => 27;
use constant SELECTION => 28;
use constant FAULT_STATE => 29;
use constant POWER_QUALITY => 30;
use constant ROTATIONAL_SPEED => 31;
use constant LUMINOUS_ENERGY => 32;
use constant LUMINOUS_FLUX => 33;
use constant ILLUMINANCE => 34;
use constant LUMINOUS_EMITTANCE => 35;
use constant MOTION => 36;
use constant OCCUPANCY => 37;
use constant TAMPER => 38;
use constant DRY_CONTACT => 39;
use constant POWERED_DRY_CONTACT => 40;
use constant ABSOLUTE_HUMIDITY => 41;
use constant NONE => 0;
use constant VOLT => 1;
use constant AMPERE => 2;
use constant WATT => 3;
use constant VOLT_AMP => 4;
use constant WATT_HOUR => 5;
use constant VOLT_AMP_HOUR => 6;
use constant DEGREE_CELSIUS => 7;
use constant HZ => 8;
use constant PERCENT => 9;
use constant METER_PER_SEC => 10;
use constant PASCAL => 11;
use constant G => 12;
use constant RPM => 13;
use constant METER => 14;
use constant HOUR => 15;
use constant MINUTE => 16;
use constant SECOND => 17;
use constant VOLT_AMP_REACTIVE => 18;
use constant VOLT_AMP_REACTIVE_HOUR => 19;
use constant GRAM => 20;
use constant OHM => 21;
use constant LITERS_PER_HOUR => 22;
use constant CANDELA => 23;
use constant METER_PER_SQARE_SEC => 24;
use constant TESLA => 25;
use constant VOLT_PER_METER => 26;
use constant VOLT_PER_AMPERE => 27;
use constant DEGREE => 28;
use constant DEGREE_FAHRENHEIT => 29;
use constant KELVIN => 30;
use constant JOULE => 31;
use constant COULOMB => 32;
use constant NIT => 33;
use constant LUMEN => 34;
use constant LUMEN_SECOND => 35;
use constant LUX => 36;
use constant PSI => 37;
use constant NEWTON => 38;
use constant FOOT => 39;
use constant FOOT_PER_SEC => 40;
use constant CUBIC_METER => 41;
use constant RADIANT => 42;
use constant STERADIANT => 43;
use constant HENRY => 44;
use constant FARAD => 45;
use constant MOL => 46;
use constant BECQUEREL => 47;
use constant GRAY => 48;
use constant SIEVERT => 49;
use constant G_PER_CUBIC_METER => 50;
use Raritan::RPC::sensors::Sensor_4_0_1::TypeSpec;
sub getTypeSpec($) {
my ($self) = @_;
my $agent = $self->{'agent'};
my $args = {};
my $rsp = $agent->json_rpc($self->{'rid'}, 'getTypeSpec', $args);
my $_ret_;
$_ret_ = Raritan::RPC::sensors::Sensor_4_0_1::TypeSpec::decode($agent, $rsp->{'_ret_'});
return $_ret_;
}
sub setType($$$) {
my ($self, $type, $unit) = @_;
my $agent = $self->{'agent'};
my $args = {};
$args->{'type'} = 1 * $type;
$args->{'unit'} = 1 * $unit;
my $rsp = $agent->json_rpc($self->{'rid'}, 'setType', $args);
my $_ret_;
$_ret_ = $rsp->{'_ret_'};
return $_ret_;
}
Raritan::RPC::Registry::registerProxyClass('sensors.Sensor', 4, 0, 1, 'Raritan::RPC::sensors::Sensor_4_0_1');
1;
|