improve documentation
[Biblio-RFID.git] / lib / RFID / Biblio / RFID501.pm
index a6eb2d5..131d980 100644 (file)
@@ -57,6 +57,26 @@ L<http://saturn.ffzg.hr/rot13/index.cgi?hitchhikers_guide_to_rfid>
  1   00 00 00 00
  2   00 00 00 00
 
+=head1 Security
+
+AFI byte on RFID tag is used for security.
+
+In my case, we have RFID door which can only read AFI bytes from tag and issue
+alarm sound or ignore it depending on value of byte.
+
+=over 8 
+
+=item 0xD7 214
+
+secured item (door will beep)
+
+=item 0xDA 218
+
+unsecured (door will ignore it)
+
+=back
+
+
 =head1 METHODS
 
 =head2 to_hash
@@ -67,7 +87,9 @@ L<http://saturn.ffzg.hr/rot13/index.cgi?hitchhikers_guide_to_rfid>
 
 =head2 from_hash
 
-  my $blocks = RFID::Biblio::Decode::RFID->from_hash( $hash );
+  my $blocks = RFID::Biblio::Decode::RFID->from_hash({ content => "1301234567" });
+
+=head2 blank_3m
 
 =head2 blank
 
@@ -145,10 +167,12 @@ sub from_hash {
        );
 }
 
-sub blank {
-
-       return ( "\x55" x ( 5 * 4 ) ) . ( "\x00" x 4 );
+sub blank_3m {
+       return ( "\x55" x ( 6 * 4 ) ) . ( "\x00" x 4 );
+}
 
+sub blank {
+       return "\x00" x ( 4 * 3 );
 }
 
 1;