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

use strict;

package Raritan::RPC::peripheral::GatewaySensorManager_2_0_1::InterpretationRuleRAW;

use constant typeId => "peripheral.GatewaySensorManager_2_0_1.InterpretationRuleRAW:1.0.0";
use Raritan::RPC::peripheral::GatewaySensorManager_2_0_1::InterpretationRuleInvertable;

sub encode {
    my ($in) = @_;
    my $encoded = Raritan::RPC::peripheral::GatewaySensorManager_2_0_1::InterpretationRuleInvertable::encode($in);
    $encoded->{'value'} = 1 * $in->{'value'};
    $encoded->{'mask'} = 1 * $in->{'mask'};
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = Raritan::RPC::peripheral::GatewaySensorManager_2_0_1::InterpretationRuleInvertable::decode($agent, $in);
    $decoded->{'value'} = $in->{'value'};
    $decoded->{'mask'} = $in->{'mask'};
    return $decoded;
}

Raritan::RPC::Registry::registerCodecClass('peripheral.GatewaySensorManager_2_0_1.InterpretationRuleRAW', 1, 0, 0, 'Raritan::RPC::peripheral::GatewaySensorManager_2_0_1::InterpretationRuleRAW');
1;
