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

use strict;

package Raritan::RPC::powerlogic::PowerMeter_1_2_6::MinMaxReading;


sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'min'} = Raritan::RPC::ObjectCodec::encode($in->{'min'});
    $encoded->{'max'} = Raritan::RPC::ObjectCodec::encode($in->{'max'});
    $encoded->{'reading'} = Raritan::RPC::ObjectCodec::encode($in->{'reading'});
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'min'} = Raritan::RPC::ObjectCodec::decode($agent, $in->{'min'}, 'sensors.NumericSensor');
    $decoded->{'max'} = Raritan::RPC::ObjectCodec::decode($agent, $in->{'max'}, 'sensors.NumericSensor');
    $decoded->{'reading'} = Raritan::RPC::ObjectCodec::decode($agent, $in->{'reading'}, 'sensors.NumericSensor');
    return $decoded;
}

1;
