#!/usr/bin/perl

=head1 NAME dw6000-getvalue

dw6000-getvalue - get and output value(s) from a DW6000 satellite modem

=head1 SYNOPSIS

 dw6000-getvalue value [value ..]

=head1 DESCRIPTION

Communicates with a DW6000 satellite modem and retreives the listed values
from it.

For a list of all supported values with descriptions, run the command with no
parameters.

=cut

use SatUtils::DW6000;
use strict;
use warnings;

my $s=SatUtils::DW6000->new;
my %vals=$s->getvalues;

if (! @ARGV) {
	print "usage: dw6000-getvalue value [value ..]\n\n";
	print "Known values:\n";
	foreach my $v (sort keys %vals) {
		print $v."\n";
	}
	exit;
}

foreach (@ARGV) {
	print $vals{$_}."\n";
}

=head1 AUTHOR

Joey Hess <joey@kitenet.net>

=cut
