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

use strict;

package Raritan::RPC::powerlogic::Config::Settings;

sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'name'} = "$in->{'name'}";
    $encoded->{'slaveAddr'} = 1 * $in->{'slaveAddr'};
    $encoded->{'baud'} = 1 * $in->{'baud'};
    $encoded->{'parity'} = 1 * $in->{'parity'};
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'name'} = $in->{'name'};
    $decoded->{'slaveAddr'} = $in->{'slaveAddr'};
    $decoded->{'baud'} = $in->{'baud'};
    $decoded->{'parity'} = $in->{'parity'};
    return $decoded;
}

1;
