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

use strict;

package Raritan::RPC::serial::SerialPort::State;


sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'state'} = 1 * $in->{'state'};
    $encoded->{'deviceName'} = "$in->{'deviceName'}";
    return $encoded;
}

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

1;
