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

use strict;

package Raritan::RPC::pdumodel::Ade::MetaData;

sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'adeType'} = "$in->{'adeType'}";
    $encoded->{'channels'} = 1 * $in->{'channels'};
    $encoded->{'currentDivider'} = 1 * $in->{'currentDivider'};
    $encoded->{'voltageDivider'} = 1 * $in->{'voltageDivider'};
    $encoded->{'energyDivider'} = 1 * $in->{'energyDivider'};
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'adeType'} = $in->{'adeType'};
    $decoded->{'channels'} = $in->{'channels'};
    $decoded->{'currentDivider'} = $in->{'currentDivider'};
    $decoded->{'voltageDivider'} = $in->{'voltageDivider'};
    $decoded->{'energyDivider'} = $in->{'energyDivider'};
    return $decoded;
}

1;
