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

use strict;

package Raritan::RPC::peripheral::GatewaySensorManager::ModbusValueEncoding32;

use constant typeId => "peripheral.GatewaySensorManager.ModbusValueEncoding32:1.0.0";
use Raritan::RPC::peripheral::GatewaySensorManager::ModbusValueEncoding16;

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::peripheral::GatewaySensorManager::ModbusValueEncoding16::encode($in);
    $encoded->{'endianness'} = 1 * $in->{'endianness'};
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = Raritan::RPC::peripheral::GatewaySensorManager::ModbusValueEncoding16::decode($agent, $in);
    $decoded->{'endianness'} = $in->{'endianness'};
    return $decoded;
}

Raritan::RPC::Registry::registerCodecClass('peripheral.GatewaySensorManager.ModbusValueEncoding32', 1, 0, 0, 'Raritan::RPC::peripheral::GatewaySensorManager::ModbusValueEncoding32');
1;
