X-Git-Url: http://git.rot13.org/?p=Biblio-RFID.git;a=blobdiff_plain;f=lib%2FRFID%2FBiblio%2FReader%2FAPI.pm;h=70354d51affbda64882afaf190b23a02bf977bd1;hp=caf5eafb522b8d566ada34a53ea148cdde37de7f;hb=674d50dc757ab20cc6c0e9f3801ac201a3f724a5;hpb=ff5d9ac7eb9c61d16b50b5ccb031d6cd8967d983 diff --git a/lib/RFID/Biblio/Reader/API.pm b/lib/RFID/Biblio/Reader/API.pm index caf5eaf..70354d5 100644 --- a/lib/RFID/Biblio/Reader/API.pm +++ b/lib/RFID/Biblio/Reader/API.pm @@ -9,6 +9,44 @@ RFID::Biblio::Reader::API - low-level RFID reader documentation =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 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