# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright 2024 Raritan Inc. All rights reserved.
#
# This file was generated by IdlC from LhxParameter.idl.

use strict;

package Raritan::RPC::lhxmodel::Parameter::Value;

use Raritan::RPC::lhxmodel::Parameter::Status;

sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'timestamp'} = 1 * $in->{'timestamp'};
    $encoded->{'status'} = Raritan::RPC::lhxmodel::Parameter::Status::encode($in->{'status'});
    $encoded->{'value'} = 1 * $in->{'value'};
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'timestamp'} = $in->{'timestamp'};
    $decoded->{'status'} = Raritan::RPC::lhxmodel::Parameter::Status::decode($agent, $in->{'status'});
    $decoded->{'value'} = $in->{'value'};
    return $decoded;
}

1;
