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

use strict;

package Raritan::RPC::pdumodel::SensorLogger::TimedRecord;

use Raritan::RPC::pdumodel::SensorLogger::Record;

sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'timestamp'} = 1 * $in->{'timestamp'};
    $encoded->{'record'} = Raritan::RPC::pdumodel::SensorLogger::Record::encode($in->{'record'});
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'timestamp'} = $in->{'timestamp'};
    $decoded->{'record'} = Raritan::RPC::pdumodel::SensorLogger::Record::decode($agent, $in->{'record'});
    return $decoded;
}

1;
