cleanup documentation
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 6 Aug 2010 19:53:10 +0000 (21:53 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 6 Aug 2010 19:53:10 +0000 (21:53 +0200)
Changes
README
lib/RFID/Biblio.pm
lib/RFID/Biblio/Reader.pm
lib/RFID/Biblio/Reader/3M810.pm
lib/RFID/Biblio/Reader/API.pm

diff --git a/Changes b/Changes
index fe7dcca..68c25de 100644 (file)
--- a/Changes
+++ b/Changes
@@ -3,3 +3,5 @@ Revision history for RFID-Biblio
 0.01    Date/time
         First version, released on an unsuspecting world.
 
 0.01    Date/time
         First version, released on an unsuspecting world.
 
+0.02   2010-08-06
+               Second API revision with RFID::Biblio::Reader as main class
diff --git a/README b/README
index 3e9e5ed..8ea5cd1 100644 (file)
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
 RFID-Biblio
 
 RFID-Biblio
 
-This is set of tools to use different RFID readers for library use.
+perl tools to use different RFID readers for library use
 
 Main idea is to develop simple API to reader, and than provide useful
 abstractions on top of it to quickly write applications to respond on
 
 Main idea is to develop simple API to reader, and than provide useful
 abstractions on top of it to quickly write applications to respond on
index 1139a0c..2e3b977 100644 (file)
@@ -10,7 +10,7 @@ use Data::Dump qw(dump);
 
 =head1 NAME
 
 
 =head1 NAME
 
-RFID::Biblio - easy to use API for writing RFID enabled appliaction
+RFID::Biblio - perl tools to use different RFID readers for library use 
 
 =cut
 
 
 =cut
 
@@ -21,49 +21,40 @@ my $debug = 0;
 
 =head1 SYNOPSIS
 
 
 =head1 SYNOPSIS
 
-This module tries to support USB serial RFID readers wsing simple API
-which is sutable for direct mapping to REST JSONP service.
+Main idea is to develop simple API to reader, and than provide useful
+abstractions on top of it to quickly write applications to respond on
+tags which come in range of RFID reader using L<RFID::Biblio::Reader>.
 
 
-For implementing application take a look at L<RFID::Biblio::Reader>
-
-=head1 READER IMPLEMENTATION
-
-Each reader must implement following hooks as sub-classes.
-
-=head2 init
-
-  $self->init;
-
-=head2 inventory
-
-  my @tags = $self->invetory;
-
-=head2 read_blocks
+Writing support for new RFID readers should be easy.
+L<RFID::Biblio::Reader::API> provides documentation on writing support
+for different readers.
 
 
-  my $hash = $self->read_blocks( $tag );
+Currently, two serial RFID readers based on L<RFID::Biblio::Reader::Serial>
+are implemented:
 
 
-All blocks are under key which is tag UID with array of blocks returned from reader
-
-  $hash = { 'E000000123456789' => [ 'blk1', 'blk2', ... ] };
-
-L<RFID::Biblio::Reader::3M810> sends tag UID with data payload, so we might expect
-to receive response from other tags from protocol specification, 
+=over 4
 
 
-=head2 write_blocks
+=item *
 
 
-  $self->write_blocks( $tag => $bytes );
+L<RFID::Biblio::Reader::3M810>
 
 
-  $self->write_blocks( $tag => [ 'blk1', 'blk2', ... ] );
+=item *
 
 
-=head2 read_afi
+L<RFID::Biblio::Reader::CPRM02>
 
 
-  my $afi = $self->read_afi( $tag );
+=back
 
 
-=head2 write_afi
+There is also simple read-only reader using shell commands in
+L<RFID::Biblio::Reader::librfid>.
 
 
-  $self->write_afi( $tag => $afi );
+For implementing application take a look at L<RFID::Biblio::Reader>
 
 
+C<scripts/RFID-JSONP-server.pl> is example of such application. It's local
+interface to RFID reader and JSONP REST server.
 
 
+C<examples/koha-rfid.js> is jQuery based JavaScript code which can be inserted
+in Koha Library System to provide overlay with tags in range and
+check-in/check-out form-fill functionality.
 
 =head1 EXPORT
 
 
 =head1 EXPORT
 
index 9b3e5cc..68af963 100644 (file)
@@ -10,7 +10,7 @@ use RFID::Biblio;
 
 =head1 NAME
 
 
 =head1 NAME
 
-RFID::Biblio::Reader - autodetect supported readers
+RFID::Biblio::Reader - simple way to write RFID applications in perl
 
 =head1 FUNCTIONS
 
 
 =head1 FUNCTIONS
 
index d959e57..2031d8b 100644 (file)
@@ -6,11 +6,11 @@ RFID::Biblio::Reader::3M810 - support for 3M 810 RFID reader
 
 =head1 DESCRIPTION
 
 
 =head1 DESCRIPTION
 
-This module implement serial protocol (over USB/serial adapter) with 3M 810 RFID
-reader, often used in library applications.
+This module uses L<RFID::Biblio::Reader::Serial> over USB/serial adapter
+with 3M 810 RFID reader, often used in library applications.
 
 
-This is most complete implementation which supports full API defined
-in L<RFID::Biblio>. This include scanning for all tags in reader
+This is most mature implementation which supports full API defined
+in L<RFID::Biblio::Reader::API>. This include scanning for all tags in reader
 range, reading and writing of data, and AFI security manipulation.
 
 This implementation is developed using Portmon on Windows to capture serial traffic
 range, reading and writing of data, and AFI security manipulation.
 
 This implementation is developed using Portmon on Windows to capture serial traffic
@@ -19,6 +19,9 @@ L<http://technet.microsoft.com/en-us/sysinternals/bb896644.aspx>
 Checksum for this reader is developed using help from C<selwyn>
 L<http://stackoverflow.com/questions/149617/how-could-i-guess-a-checksum-algorithm>
 
 Checksum for this reader is developed using help from C<selwyn>
 L<http://stackoverflow.com/questions/149617/how-could-i-guess-a-checksum-algorithm>
 
+More inforation about process of reverse engeeniring protocol with
+this reader is available at L<http://blog.rot13.org/rfid/>
+
 =cut
 
 use warnings;
 =cut
 
 use warnings;
@@ -148,12 +151,6 @@ cmd(
 )});
 }
 
 )});
 }
 
-=head2 inventory
-
-  my @tags = inventory;
-
-=cut
-
 sub inventory {
 
        my @tags;
 sub inventory {
 
        my @tags;
@@ -320,3 +317,9 @@ sub write_afi {
 }
 
 1
 }
 
 1
+
+__END__
+
+=head1 SEE ALSO
+
+L<RFID::Biblio::Reader::API>
index caf5eaf..70354d5 100644 (file)
@@ -9,6 +9,44 @@ RFID::Biblio::Reader::API - low-level RFID reader documentation
 
 =cut
 
 
 =cut
 
+=head1 MANDATORY METHODS
+
+Each reader must implement following hooks as sub-classes.
+
+=head2 init
+
+  $self->init;
+
+=head2 inventory
+
+  my @tags = $self->invetory;
+
+=head2 read_blocks
+
+  my $hash = $self->read_blocks( $tag );
+
+All blocks are under key which is tag UID with array of blocks returned from reader
+
+  $hash = { 'E000000123456789' => [ 'blk1', 'blk2', ... ] };
+
+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
+
+  $self->write_blocks( $tag => $bytes );
+
+  $self->write_blocks( $tag => [ 'blk1', 'blk2', ... ] );
+
+=head2 read_afi
+
+  my $afi = $self->read_afi( $tag );
+
+=head2 write_afi
+
+  $self->write_afi( $tag => $afi );
+
+
 =head1 METHODS
 
 =head2 new
 =head1 METHODS
 
 =head2 new