line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package RFID::Matrics::Reader::TCP;
|
2
|
|
|
|
|
|
|
@ISA = qw(RFID::Matrics::Reader RFID::Reader::TCP Exporter);
|
3
|
2
|
|
|
2
|
|
46227
|
use RFID::Matrics::Reader; $VERSION=$RFID::Matrics::Reader::VERSION;
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
135
|
|
4
|
2
|
|
|
2
|
|
2763
|
use RFID::Reader::TCP;
|
|
2
|
|
|
|
|
81178
|
|
|
2
|
|
|
|
|
77
|
|
5
|
2
|
|
|
2
|
|
20
|
use Exporter;
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
188
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# Written by Scott Gifford
|
8
|
|
|
|
|
|
|
# Copyright (C) 2004 The Regents of the University of Michigan.
|
9
|
|
|
|
|
|
|
# See the file LICENSE included with the distribution for license
|
10
|
|
|
|
|
|
|
# information.
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 NAME
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
RFID::Matrics::Reader::TCP - Implement L over a TCP connection
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 SYNOPSIS
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
This class takes a host and port to connect to, connects to it, and
|
19
|
|
|
|
|
|
|
implements the Matrics RFID protocol over that connection. It is
|
20
|
|
|
|
|
|
|
designed to use a serial-to-Ethernet adapter plugged into the serial
|
21
|
|
|
|
|
|
|
port of the reader; I tested it with the I from Moxa.
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
An example:
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
use RFID::Matrics::Reader::TCP;
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $reader =
|
28
|
|
|
|
|
|
|
RFID::Matrics::Reader::TCP->new(PeerAddr => 1.2.3.4,
|
29
|
|
|
|
|
|
|
PeerPort => 4001,
|
30
|
|
|
|
|
|
|
Node => 4,
|
31
|
|
|
|
|
|
|
Antenna => MATRICS_ANT_1,
|
32
|
|
|
|
|
|
|
Debug => 1,
|
33
|
|
|
|
|
|
|
Timeout => CMD_TIMEOUT,
|
34
|
|
|
|
|
|
|
)
|
35
|
|
|
|
|
|
|
or die "Couldn't create reader object.\n";
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 DESCRIPTION
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
This class is built on top of
|
40
|
|
|
|
|
|
|
L and
|
41
|
|
|
|
|
|
|
L.
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=cut
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
our @EXPORT_OK = @RFID::Matrics::Reader::EXPORT_OK;
|
46
|
|
|
|
|
|
|
our %EXPORT_TAGS = %RFID::Matrics::Reader::EXPORT_TAGS;
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head2 Constructor
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head3 new
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
This constructor accepts all arguments to the constructor for
|
53
|
|
|
|
|
|
|
L. All other parameters are
|
54
|
|
|
|
|
|
|
passed along to L.
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=cut
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 SEE ALSO
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
L, L,
|
61
|
|
|
|
|
|
|
L,
|
62
|
|
|
|
|
|
|
L.
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 AUTHOR
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Scott Gifford ,
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Copyright (C) 2004 The Regents of the University of Michigan.
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
See the file LICENSE included with the distribution for license
|
71
|
|
|
|
|
|
|
information.
|
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=cut
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
1;
|