=head1 NAME
-RFID::Biblio - support serial RFID devices
+RFID::Biblio - easy to use API for writing RFID enabled appliaction
=cut
-our $VERSION = '0.01';
+our $VERSION = '0.02';
my $debug = 0;
Perhaps a little code snippet.
- use RFID::Biblio;
+ use RFID::Biblio;
- my $rfid = RFID::Biblio->new(
+ my $rfid = RFID::Biblio->new(
device => '/dev/ttyUSB0', # with fallback to RFID_DEVICE
);
+
+ # invetory tags in reader range and read data from them
my $visible = $rfid->scan;
-=head1 SUBROUTINES/METHODS
+=head1 METHODS
=head2 new
+Open serial port (if needed) and init reader
+
=cut
sub new {
$self->port;
- $self->init;
-
- return $self;
+ $self->init && return $self;
}
=head2 port
}
-=head1 MANDATORY IMPLEMENTATIONS
+=head1 READER IMPLEMENTATION
Each reader must implement following hooks as sub-classes.
$hash = { 'E000000123456789' => [ 'blk1', 'blk2', ... ] };
-L<RFID::Biblio::3M810> sends tag UID with data payload, so we might expect
+L<RFID::Biblio::Reader::3M810> sends tag UID with data payload, so we might expect
to receive response from other tags from protocol specification,
=head2 write_blocks
sub hex_tag { uc(unpack('H16', shift)) }
+=head1 SUPPORTED READERS
+
+Support for different RFID readers is implemented in subclasses:
+
+=head2 3M 810
+
+L<RFID::Biblio::Reader::3M810>
+
+=head2 CPR-M02
+
+L<RFID::Biblio::Reader::CPRM02>
+
+=head2 librfid
+
+L<RFID::Biblio::Reader::librfid>
+
=head1 AUTHOR
Dobrica Pavlinusic, C<< <dpavlin at rot13.org> >>