package Net::GPSD3;
use strict;
use warnings;
use base qw{Net::GPSD3::Base};
use JSON::XS qw{};
use IO::Socket::INET6 qw{};
use Net::GPSD3::Return::Unknown;
use Net::GPSD3::Cache;
use DateTime
ACKAGE__;
=head1 NAME
Net::GPSD3 - Interface to the gpsd server daemon protocol versions 3 (JSON).
=head1 SYNOPSIS
=head2 Watch Interface
use Net::GPSD3;
my $gpsd=Net::GPSD3->new;
an open source GPS daemon from http://www.catb.org/gpsd/ Support for Version 3 of the protocol (JSON) was added to the daemon in version 2.90. If your daemon is before 2.90 (protocol 2.X), please u
ct returned by the GPSD daemon.
An example JSON object:
=head1 METHODS PROPERTIES
=head2 class
Returns the object class
=head2 string
Returns the JSON string
=head2 parent
Return the parent Ne
GPSD daemon.
=head1 METHODS
=head2 class
Returns the object class
=head2 string
Returns the JSON string
=head2 parent
Return the parent Net::GPSD object
=head2 devices
Returns a list of devi
=cut
sub parent {shift->{"parent"}};
=head2 class
Returns the class string for the particular JSON message. Classes in all upper case are from gpsd. Classes with initial capital letter are from
n classes should use camel case.
=cut
sub class {shift->{"class"}};
=head2 string
This is the JSON string as passed over the TCP connection.
=cut
sub string {shift->{"string"}};
=head1 BUGS
Lo
SD daemon.
An example JSON string:
{"PRN":15,"el":77,"az":123,"ss":0, "used":false},
=head1 METHODS
=head2 class
Returns the object class
=head2 string
Returns the JSON string
=head2 parent
Random Number Identifier
=cut
sub PRN {shift->{"PRN"}};
*prn=\&PRN;
=head2 used
Returns a L<JSON::XS::Boolean> true or false object.
=cut
sub used {shift->{"used"}};
=head2 az, azimuth
Retur
GPSD daemon.
=head1 METHODS
=head2 class
Returns the object class
=head2 string
Returns the JSON string
=head2 parent
Return the parent Net::GPSD object
=head2 message
Textual error message.
object interface to the Time-Velocity-Position (TVP) object returned by the GPSD daemon.
Example JSON objects:
=head3 Protocol 3.1 Versions
{
"class":"TPV",
"tag":"MID2",
"device":"/d
}
=head1 METHODS PROPERTIES
=head2 class
Returns the object class
=head2 string
Returns the JSON string
=head2 parent
Return the parent Net::GPSD object
=head2 device
Name of originating dev
GPSD daemon.
=head1 METHODS
=head2 class
Returns the object class
=head2 string
Returns the JSON string
=head2 parent
Return the parent L<Net::GPSD3> object
=head2 time
=head2 timestamp
=he
t
sub fix {shift->Fixes->[0]};
sub tpv {shift->Fixes->[0]};
=head2 Fixes
Object wrapper around JSON data
my $fix=$poll->Fixes #isa [] of Net::GPSD3::Return::TPV objects
my @fix=$poll->Fixes #i
method consistant
=cut
sub sky {shift->Skyviews->[0]};
=head2 Skyviews
Object wrapper around JSON data
my $sky=$poll->Skyviews #isa [] of Net::GPSD3::Return::SKY objects
my @sky=$poll->Skyvi
TION
Provides a Perl object interface to the SKY object returned by the GPSD daemon.
An example JSON object:
=head3 Protcol 3.1 versions
{
"class":"SKY",
"tag":"MID4",
"device":"/dev
}
=head1 METHODS PROPERTIES
=head2 class
Returns the object class
=head2 string
Returns the JSON string
=head2 parent
Return the parent Net::GPSD object
=head2 device
=cut
sub device {shift
GPSD daemon.
=head1 METHODS
=head2 class
Returns the object class
=head2 string
Returns the JSON string
=head2 parent
Return the parent L<Net::GPSD3> object
=head2 enabled
=cut
sub enabled
le (deprecated)
=cut
sub enable {shift->enabled(@_)}; #bad protocol name
=head2 json
=cut
sub json {shift->{"json"}};
=head2 nmea
=cut
sub nmea {shift->{"nmea"}};
=head2 raw
=cut
sub raw {s
}
=head1 METHODS PROPERTIES
=head2 class
Returns the object class
=head2 string
Returns the JSON string
=head2 parent
Returns the parent L<Net::GPSD3> object
=head2 device
=cut
sub device {
GPSD daemon.
=head1 METHODS
=head2 class
Returns the object class
=head2 string
Returns the JSON string
=head2 parent
Return the parent L<Net::GPSD3> object
=head2 device
Name the device for
GPSD daemon.
=head1 METHODS
=head2 class
Returns the object class
=head2 string
Returns the JSON string
=head2 parent
Return the parent L<Net::GPSD3> object
=head2 release
=cut
sub release