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

use strict;

package Raritan::RPC::modbus::GatewayMgr::RtuSettings;

sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'defaultAddr'} = 1 * $in->{'defaultAddr'};
    $encoded->{'speed'} = 1 * $in->{'speed'};
    $encoded->{'parity'} = 1 * $in->{'parity'};
    return $encoded;
}

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

1;
