line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::GPSD3::Return::POLL; |
2
|
2
|
|
|
2
|
|
13
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
91
|
|
3
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
138
|
|
4
|
2
|
|
|
2
|
|
13
|
use base qw{Net::GPSD3::Return::Unknown::Timestamp}; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
1608
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION='0.18'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Net::GPSD3::Return::POLL - Net::GPSD3 Return POLL Object |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 SYNOPSIS |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
use Net::GPSD3; |
15
|
|
|
|
|
|
|
use Data::Dumper qw{Dumper}; |
16
|
|
|
|
|
|
|
my $gpsd = Net::GPSD3->new; |
17
|
|
|
|
|
|
|
my $poll = $gpsd->poll; |
18
|
|
|
|
|
|
|
print Dumper($poll); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 DESCRIPTION |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
Provides a Perl object interface to the POLL object returned by the GPSD daemon. |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 METHODS |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head2 class |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Returns the object class |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head2 string |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
Returns the JSON string |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head2 parent |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Return the parent L object |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head2 time |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head2 timestamp |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head2 datetime |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head2 active |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=cut |
47
|
|
|
|
|
|
|
|
48
|
2
|
|
|
2
|
1
|
11
|
sub active {shift->{"active"}}; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head2 fix, tpv |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Returns the first fix from the Fixes array or undef if none. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
my $fix=$poll->fix #isa Net::GPSD3::Return::TPV or undef |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Note: I will try to keep this method consistant |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=cut |
59
|
|
|
|
|
|
|
|
60
|
2
|
|
|
2
|
1
|
8
|
sub fix {shift->Fixes->[0]}; |
61
|
0
|
|
|
0
|
1
|
0
|
sub tpv {shift->Fixes->[0]}; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head2 Fixes |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Object wrapper around JSON data |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
my $fix=$poll->Fixes #isa [] of Net::GPSD3::Return::TPV objects |
68
|
|
|
|
|
|
|
my @fix=$poll->Fixes #isa () of Net::GPSD3::Return::TPV objects |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Note: I'm not sure why this is an array from the protocol but do not count on this staying the same |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=cut |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub Fixes { |
75
|
8
|
|
|
8
|
1
|
15
|
my $self=shift; |
76
|
8
|
100
|
|
|
|
33
|
$self->{"Fixes"}=[map {$self->parent->constructor(%$_, string=>$self->parent->encode($_))} $self->_fixes] |
|
2
|
|
|
|
|
9
|
|
77
|
|
|
|
|
|
|
unless defined $self->{"Fixes"}; |
78
|
8
|
50
|
|
|
|
71
|
return wantarray ? @{$self->{"Fixes"}} : $self->{"Fixes"}; |
|
0
|
|
|
|
|
0
|
|
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
sub _fixes { |
82
|
8
|
|
|
8
|
|
15
|
my $self=shift; |
83
|
8
|
100
|
|
|
|
26
|
$self->{"fixes"}=delete($self->{"tpv"}) if exists $self->{"tpv"}; #RT 73489 |
84
|
8
|
50
|
|
|
|
24
|
$self->{"fixes"}=[] unless ref($self->{"fixes"}) eq "ARRAY"; |
85
|
8
|
100
|
|
|
|
36
|
return wantarray ? @{$self->{"fixes"}} : $self->{"fixes"}; |
|
2
|
|
|
|
|
7
|
|
86
|
|
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head2 sky |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Returns the first object from the Skyviews array or undef if none. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
my $sky=$poll->sky #isa Net::GPSD3::Return::SKY or undef |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Note: I will try to keep this method consistant |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=cut |
97
|
|
|
|
|
|
|
|
98
|
2
|
|
|
2
|
1
|
10
|
sub sky {shift->Skyviews->[0]}; |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head2 Skyviews |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Object wrapper around JSON data |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
my $sky=$poll->Skyviews #isa [] of Net::GPSD3::Return::SKY objects |
105
|
|
|
|
|
|
|
my @sky=$poll->Skyviews #isa () of Net::GPSD3::Return::SKY objects |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Note: I'm not sure why this is an array from the protocol but do not count on this staying the same |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=cut |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
sub Skyviews { |
112
|
10
|
|
|
10
|
1
|
19
|
my $self=shift; |
113
|
10
|
100
|
|
|
|
53
|
$self->{"Skyviews"}=[map {$self->parent->constructor(%$_, string=>$self->parent->encode($_))} $self->_skyviews] |
|
2
|
|
|
|
|
10
|
|
114
|
|
|
|
|
|
|
unless defined $self->{"Skyviews"}; |
115
|
10
|
50
|
|
|
|
62
|
return wantarray ? @{$self->{"Skyviews"}} : $self->{"Skyviews"}; |
|
0
|
|
|
|
|
0
|
|
116
|
|
|
|
|
|
|
} |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
sub _skyviews { |
119
|
8
|
|
|
8
|
|
16
|
my $self=shift; |
120
|
8
|
100
|
|
|
|
22
|
$self->{"skyviews"}=delete($self->{"sky"}) if exists $self->{"sky"}; #RT 73489 |
121
|
8
|
50
|
|
|
|
25
|
$self->{"skyviews"}=[] unless ref($self->{"skyviews"}) eq "ARRAY"; |
122
|
8
|
100
|
|
|
|
36
|
return wantarray ? @{$self->{"skyviews"}} : $self->{"skyviews"}; |
|
2
|
|
|
|
|
8
|
|
123
|
|
|
|
|
|
|
} |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=head2 Gst |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
Object wrapper around JSON data |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
my $gst=$poll->Gst #isa [] of Net::GPSD3::Return::GST objects |
130
|
|
|
|
|
|
|
my @gst=$poll->Gst #isa () of Net::GPSD3::Return::GST objects |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
Note: I'm not sure why this is an array from the protocol but do not count on this staying the same |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=cut |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
sub Gst { |
137
|
0
|
|
|
0
|
1
|
|
my $self=shift; |
138
|
0
|
0
|
|
|
|
|
$self->{"Gst"}=[map {$self->parent->constructor(%$_, string=>$self->parent->encode($_))} $self->_gst] |
|
0
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
unless defined $self->{"Gst"}; |
140
|
0
|
0
|
|
|
|
|
return wantarray ? @{$self->{"Gst"}} : $self->{"Gst"}; |
|
0
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
} |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
sub _gst { |
144
|
0
|
|
|
0
|
|
|
my $self=shift; |
145
|
0
|
0
|
|
|
|
|
$self->{"gst"}=[] unless ref($self->{"gst"}) eq "ARRAY"; |
146
|
0
|
0
|
|
|
|
|
return wantarray ? @{$self->{"gst"}} : $self->{"gst"}; |
|
0
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
} |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
=head1 BUGS |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
Log on RT and send to gpsd-dev email list |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
=head1 SUPPORT |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
DavisNetworks.com supports all Perl applications including this package. |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
Try gpsd-dev email list |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
=head1 AUTHOR |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
Michael R. Davis |
162
|
|
|
|
|
|
|
CPAN ID: MRDVT |
163
|
|
|
|
|
|
|
STOP, LLC |
164
|
|
|
|
|
|
|
domain=>michaelrdavis,tld=>com,account=>perl |
165
|
|
|
|
|
|
|
http://www.stopllc.com/ |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
=head1 COPYRIGHT |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
This program is free software licensed under the... |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
The BSD License |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
The full text of the license can be found in the LICENSE file included with this module. |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
=head1 SEE ALSO |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
L, L |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
=cut |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
1; |