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

use strict;

package Raritan::RPC::test::MyEvent;

use constant typeId => "test.MyEvent:1.0.0";
use Raritan::RPC::idl::Event;

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::idl::Event::encode($in);
    $encoded->{'name'} = "$in->{'name'}";
    $encoded->{'value'} = 1 * $in->{'value'};
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = Raritan::RPC::idl::Event::decode($agent, $in);
    $decoded->{'name'} = $in->{'name'};
    $decoded->{'value'} = $in->{'value'};
    return $decoded;
}

Raritan::RPC::Registry::registerCodecClass('test.MyEvent', 1, 0, 0, 'Raritan::RPC::test::MyEvent');
1;
