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

use strict;

package Raritan::RPC::peripheral::PosElement_5_0_0;


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

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'portType'} = ($in->{'portType'} < 13 ? $in->{'portType'} : 7);
    $decoded->{'port'} = $in->{'port'};
    return $decoded;
}

1;
