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

use strict;

package Raritan::RPC::peripheral::G2Production_4_0_0;

use parent qw(Raritan::RPC::RemoteObject);

use constant typeId => "peripheral.G2Production:4.0.0";

sub new {
    my ($class, $agent, $rid, $typeId) = @_;
    $typeId = $typeId || Raritan::RPC::peripheral::G2Production_4_0_0::typeId;
    return $class->SUPER::new($agent, $rid, $typeId);
}

use constant SUCCESS => 0;

use constant ERR_INVALID_PARAMS => 1;

use constant ERR_NO_CONFIG_MODE => 2;

use constant ERR_NO_DEVICE => 3;

use constant ERR_OPERATION_FAILED => 4;

sub programSerialNumber($$$) {
    my ($self, $romcode, $serial) = @_;
    my $agent = $self->{'agent'};
    my $args = {};
    $args->{'romcode'} = "$romcode";
    $args->{'serial'} = "$serial";
    my $rsp = $agent->json_rpc($self->{'rid'}, 'programSerialNumber', $args);
    my $_ret_;
    $_ret_ = $rsp->{'_ret_'};
    return $_ret_;
}

Raritan::RPC::Registry::registerProxyClass('peripheral.G2Production', 4, 0, 0, 'Raritan::RPC::peripheral::G2Production_4_0_0');
1;
