# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright 2025 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'} = 1 * $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;
