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

use strict;

package Raritan::RPC::sensors::NumericSensor_4_0_5::ReadingChangedEvent;

use constant typeId => "sensors.NumericSensor_4_0_5.ReadingChangedEvent:1.0.0";
use Raritan::RPC::sensors::NumericSensor_4_0_5::Reading;
use Raritan::RPC::idl::Event;

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::idl::Event::encode($in);
    $encoded->{'newReading'} = Raritan::RPC::sensors::NumericSensor_4_0_5::Reading::encode($in->{'newReading'});
    return $encoded;
}

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

Raritan::RPC::Registry::registerCodecClass('sensors.NumericSensor_4_0_5.ReadingChangedEvent', 1, 0, 0, 'Raritan::RPC::sensors::NumericSensor_4_0_5::ReadingChangedEvent');
1;
