Net::GPSD::Server::Fake - Provides a Fake GPSD daemon server test harness.
use Net::GPSD::Server::Fake; use Net::GPSD::Server::Fake::Stationary; my $server=Net::GPSD::Server::Fake->new(); my $stationary=Net::GPSD::Server::Fake::Stationary->new(lat=>38.865826, lon=>-77.108574); $server->start($stationary);
Returns a new server
my $server=Net::GPSD::Server::Fake->new( port=>'2947', name=>'GPSD', version=>Net::GPSD::Server::Fake->VERSION, debug=>1); 0=>none, 2=>default, 2+=>verbose
Binds provider to port and starts server.
$server->start($provider);
Gets or sets GPSD protocol name. This defaults to "GPSD" as some clients are picky.
$obj->name('GPSD'); my $name=$obj->name;
Returns the current TCP port.
my $port=$obj->port;
Returns the version that the GPSD deamon reports in the L command. This default to the version of the Net::GPSD::Server::Fake->VERSION package.
my $obj=Net$obj->version; my $version=$obj->version;
Only knows a few commands
Commands must be one per line.
Can't change providers mid stream.
Providers must remember state for watcher restarts.
Providers are queryed for a new point. However, there needs to be a way for providers to be able to trigger new points.
Send issues to gpsd-dev email list
Michael R. Davis, qw/gpsd michaelrdavis com/
Copyright (c) 2006 Michael R. Davis (mrdvt92)
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
gpsd http://gpsd.berlios.de/
To install Net::GPSD::Server::Fake, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::GPSD::Server::Fake
CPAN shell
perl -MCPAN -e shell install Net::GPSD::Server::Fake
For more information on module installation, please visit the detailed CPAN module installation guide.