line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::GPSD3::Return::DEVICES; |
2
|
2
|
|
|
2
|
|
810
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
80
|
|
3
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
52
|
|
4
|
2
|
|
|
2
|
|
8
|
use base qw{Net::GPSD3::Return::Unknown}; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
538
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION='0.12'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Net::GPSD3::Return::DEVICES - Net::GPSD3 Return DEVICES Object |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 SYNOPSIS |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 DESCRIPTION |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Provides a Perl object interface to the DEVICE object returned by the GPSD daemon. |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 METHODS |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head2 class |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
Returns the object class |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head2 string |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Returns the JSON string |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head2 parent |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Return the parent Net::GPSD object |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head2 devices |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Returns a list of device data structures. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
my @device=$devices->devices; #({},...) |
37
|
|
|
|
|
|
|
my @device=$devices->devices; #[{},...] |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub devices { |
42
|
3
|
|
|
3
|
1
|
724
|
my $self=shift; |
43
|
3
|
50
|
|
|
|
9
|
$self->{"devices"}=[] unless ref($self->{"devices"}) eq "ARRAY"; |
44
|
3
|
100
|
|
|
|
8
|
return wantarray ? @{$self->{"devices"}} : $self->{"devices"}; |
|
2
|
|
|
|
|
6
|
|
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head2 Devices |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Returns a list of L objects. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
my @device=$devices->Devices; #(bless{},...) |
52
|
|
|
|
|
|
|
my @device=$devices->Devices; #[bless{},...] |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=cut |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub Devices { |
57
|
2
|
|
|
2
|
1
|
1551
|
my $self=shift; |
58
|
2
|
100
|
|
|
|
6
|
unless (defined $self->{"Devices"}) { |
59
|
1
|
|
|
|
|
5
|
$self->{"Devices"}=[ |
60
|
1
|
|
|
|
|
3
|
map {$self->parent->constructor(%$_, string=>$self->parent->encode($_))} |
61
|
1
|
|
|
|
|
3
|
grep {ref($_) eq "HASH"} $self->devices]; |
62
|
|
|
|
|
|
|
} |
63
|
2
|
100
|
|
|
|
7
|
return wantarray ? @{$self->{"Devices"}} : $self->{"Devices"}; |
|
1
|
|
|
|
|
4
|
|
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 BUGS |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Log on RT and Send to gpsd-dev email list |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 SUPPORT |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
DavisNetworks.com supports all Perl applications including this package. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Try gpsd-dev email list |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 AUTHOR |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Michael R. Davis |
79
|
|
|
|
|
|
|
CPAN ID: MRDVT |
80
|
|
|
|
|
|
|
STOP, LLC |
81
|
|
|
|
|
|
|
domain=>michaelrdavis,tld=>com,account=>perl |
82
|
|
|
|
|
|
|
http://www.stopllc.com/ |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 COPYRIGHT |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
This program is free software licensed under the... |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
The BSD License |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
The full text of the license can be found in the LICENSE file included with this module. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 SEE ALSO |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
L, L |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=cut |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
1; |