From 324de0d12567568b5c2ef6b6e4c8babb5ff01d48 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Thu, 29 Jul 2010 14:36:20 +0200 Subject: [PATCH] document data model on rfid tags --- lib/RFID/Biblio/RFID501.pm | 48 ++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/lib/RFID/Biblio/RFID501.pm b/lib/RFID/Biblio/RFID501.pm index 23464ee..333fa25 100644 --- a/lib/RFID/Biblio/RFID501.pm +++ b/lib/RFID/Biblio/RFID501.pm @@ -9,12 +9,51 @@ RFID::Biblio::RFID501 - RFID Standard for Libraries =head1 DESCRIPTION -This module tries to decode tag format as specified in document +This module tries to decode tag format as described in document RFID 501: RFID Standards for Libraries -However, document is lacking real specification, so tag decoding -was done to be compliant with 3M implementation +L + +Goal is to be compatibile with existing 3M Alphanumeric tag format +which, as far as I know, isn't specificed anywhere. My documentation about +this format is available at + +L + +=head1 Data model + +=head2 3M Alphanumeric tag + + 0 04 is 00 tt i [4 bit] = number of item in set [1 .. i .. s] + s [4 bit] = total items in set + tt [8 bit] = item type + + 1 dd dd dd dd dd [16 bytes] = barcode data + 2 dd dd dd dd + 3 dd dd dd dd + 4 dd dd dd dd + + 5 bb bl ll ll b [12 bit] = branch [unsigned] + l [20 bit] = library [unsigned] + + 6 cc cc cc cc c [32 bit] = custom signed integer + +=head2 3M Manufacturing Blank + + 0 55 55 55 55 + 1 55 55 55 55 + 2 55 55 55 55 + 3 55 55 55 55 + 4 55 55 55 55 + 5 55 55 55 55 + 6 00 00 00 00 + +=head2 Generic blank + + 0 00 00 00 00 + 1 00 00 00 00 + 2 00 00 00 00 =head1 METHODS @@ -53,10 +92,11 @@ sub to_hash { my ( $u1, $set_item, $u2, $type, $content, $br_lib, $custom ) = unpack('C4Z16Nl>',$data); my $hash = { u1 => $u1, # FIXME - u2 => $u2, # FIXME set => ( $set_item & 0xf0 ) >> 4, total => ( $set_item & 0x0f ), + u2 => $u2, # FIXME + type => $type, type_label => $item_type->{$type}, content => $content, -- 2.20.1