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

use strict;

package Raritan::RPC::devsettings::Modbus::TcpSettings;

sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'readonly'} = ($in->{'readonly'}) ? JSON::true : JSON::false;
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'readonly'} = ($in->{'readonly'}) ? 1 : 0;
    return $decoded;
}

1;
