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
|
# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright 2020 Raritan Inc. All rights reserved.
#
# This file was generated by IdlC from Firmware.idl.
use strict;
package Raritan::RPC::firmware::ImageStatus;
sub encode {
my ($in) = @_;
my $encoded = {};
$encoded->{'state'} = $in->{'state'};
$encoded->{'error_message'} = "$in->{'error_message'}";
$encoded->{'time_started'} = 1 * $in->{'time_started'};
$encoded->{'size_total'} = 1 * $in->{'size_total'};
$encoded->{'size_done'} = 1 * $in->{'size_done'};
return $encoded;
}
sub decode {
my ($agent, $in) = @_;
my $decoded = {};
$decoded->{'state'} = $in->{'state'};
$decoded->{'error_message'} = $in->{'error_message'};
$decoded->{'time_started'} = $in->{'time_started'};
$decoded->{'size_total'} = $in->{'size_total'};
$decoded->{'size_done'} = $in->{'size_done'};
return $decoded;
}
1;
|