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
|
# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright 2020 Raritan Inc. All rights reserved.
#
# This file was generated by IdlC from LhxParameter.idl.
use strict;
package Raritan::RPC::lhxmodel::Parameter::MetaData;
sub encode {
my ($in) = @_;
my $encoded = {};
$encoded->{'unit'} = $in->{'unit'};
$encoded->{'id'} = "$in->{'id'}";
$encoded->{'defaultValue'} = 1 * $in->{'defaultValue'};
$encoded->{'min'} = 1 * $in->{'min'};
$encoded->{'max'} = 1 * $in->{'max'};
$encoded->{'read_only'} = ($in->{'read_only'}) ? JSON::true : JSON::false;
$encoded->{'decDigits'} = 1 * $in->{'decDigits'};
return $encoded;
}
sub decode {
my ($agent, $in) = @_;
my $decoded = {};
$decoded->{'unit'} = $in->{'unit'};
$decoded->{'id'} = $in->{'id'};
$decoded->{'defaultValue'} = $in->{'defaultValue'};
$decoded->{'min'} = $in->{'min'};
$decoded->{'max'} = $in->{'max'};
$decoded->{'read_only'} = ($in->{'read_only'}) ? 1 : 0;
$decoded->{'decDigits'} = $in->{'decDigits'};
return $decoded;
}
1;
|