NAME

RFID::Matrics::Tag - Object representing a single proprietary Matrics tag.

SYNOPSIS

These objects are usually returned by an RFID::Matrics::Reader object:

    use RFID::Matrics::Tag qw(tag2txt);

    my $rff = RFID::Matrics::Reader->new->readfullfield(antenna => MATRICS_ANT_1);
    foreach my $tag (@{$pp->{utags}})
    {
	print "I see tag $tag->{id}\n";
    }

But you can create your own if you want:

    my $tag = RFID::Matrics::Tag->new(type => MATRICS_TAGTYPE_EPC,
				      id = "c80507a8009609de");
    print "Tag is $tag->{id}\n";

DESCRIPTION

Constants

Tag Type Constants

The constants MATRICS_TAGTYPE_EPC, MATRICS_TAGTYPE_MATRICS, and MATRICS_TAGTYPE_OLDMATRICS are recognized tag types. They can be imported into your namespace with the :tagtypes tag.

Constructor

new

Creates a new RFID::Matrics::Tag object. Takes a hash containing various settings as its parameters:

id_bits

A binary string containing the tag's ID. This is the representation used natively by the reader; it will be automatically generated if it is not given but id is.

id

A hex string containing the tag's ID. This is the human-readable representation; it will be automatically generated if it is not given but id_bits is.

type

The type of tag this is. See the Constants section of this page for recognized tag types.

Utility Functions

tagcmp

A comparison function for sort. Compares the ID numbers of two tags, and returns -1 if the first ID is lower, 0 if they are the same, or 1 if the first ID is higher.

SEE ALSO

RFID::Tag, RFID::EPC::Tag, RFID::Matrics::Reader, http://www.eecs.umich.edu/~wherefid/code/rfid-perl/.

AUTHOR

Scott Gifford <gifford@umich.edu>, <sgifford@suspectclass.com>

Copyright (C) 2004 The Regents of the University of Michigan.

See the file LICENSE included with the distribution for license information.