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

use strict;

package Raritan::RPC::pdumodel::CtrlStatistic_2_0_0;

sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'mainCSumErrCnt'} = 1 * $in->{'mainCSumErrCnt'};
    $encoded->{'subCSumErrCnt'} = 1 * $in->{'subCSumErrCnt'};
    $encoded->{'timeoutCnt'} = 1 * $in->{'timeoutCnt'};
    $encoded->{'resetCnt'} = 1 * $in->{'resetCnt'};
    $encoded->{'emResetCnt'} = 1 * $in->{'emResetCnt'};
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'mainCSumErrCnt'} = $in->{'mainCSumErrCnt'};
    $decoded->{'subCSumErrCnt'} = $in->{'subCSumErrCnt'};
    $decoded->{'timeoutCnt'} = $in->{'timeoutCnt'};
    $decoded->{'resetCnt'} = $in->{'resetCnt'};
    $decoded->{'emResetCnt'} = $in->{'emResetCnt'};
    return $decoded;
}

1;
