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

use strict;

package Raritan::RPC::net::WlanInfo;


sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'associated'} = ($in->{'associated'}) ? JSON::true : JSON::false;
    $encoded->{'ssid'} = "$in->{'ssid'}";
    $encoded->{'bssid'} = "$in->{'bssid'}";
    $encoded->{'channel'} = 1 * $in->{'channel'};
    $encoded->{'channelWidth'} = $in->{'channelWidth'};
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'associated'} = ($in->{'associated'}) ? 1 : 0;
    $decoded->{'ssid'} = $in->{'ssid'};
    $decoded->{'bssid'} = $in->{'bssid'};
    $decoded->{'channel'} = $in->{'channel'};
    $decoded->{'channelWidth'} = $in->{'channelWidth'};
    return $decoded;
}

1;
