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

use strict;

package Raritan::RPC::modbus::Device::DeviceID;

sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'vendor'} = "$in->{'vendor'}";
    $encoded->{'code'} = "$in->{'code'}";
    $encoded->{'version'} = "$in->{'version'}";
    $encoded->{'url'} = "$in->{'url'}";
    $encoded->{'name'} = "$in->{'name'}";
    $encoded->{'model'} = "$in->{'model'}";
    $encoded->{'app'} = "$in->{'app'}";
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'vendor'} = $in->{'vendor'};
    $decoded->{'code'} = $in->{'code'};
    $decoded->{'version'} = $in->{'version'};
    $decoded->{'url'} = $in->{'url'};
    $decoded->{'name'} = $in->{'name'};
    $decoded->{'model'} = $in->{'model'};
    $decoded->{'app'} = $in->{'app'};
    return $decoded;
}

1;
