Biblio...er::API(3pm)

πŸ’– NAME πŸ’–

Biblio::RFID::Reader::API β€” bestie, this is the low-level RFID reader documentation. It's the lore drop for how the whole reader thing works underneath. Periodt. πŸ¦‹

It lives in the User Contributed Perl Documentation, manual section 3pm, iykyk.


✨ MANDATORY METHODS ✨

Okay so listen πŸ‘‘ β€” every single reader must implement these hooks as sub-classes. Like, no skipping, this isn't a vibe-optional situation. If you're building a reader, these are the assignments, and you WILL be doing them. πŸ’…

🌸 init

$self->init;

🌸 inventory

my @tags = $self->invetory;
not me pointing out that yes, it literally says invetory up there πŸ‘€ β€” keep it exactly like that, bestie, do not "fix" it, that's how it's written fr fr

🌸 read_blocks

my $hash = $self->read_blocks( $tag );

All the blocks live under a key that is the tag UID, and the value is the array of blocks that came back from the reader. It's giving nested data structure core. πŸŽ€

$hash = { 'E000000123456789' => [ 'blk1', 'blk2', ... ] };

Biblio::RFID::Reader::3M810 sends the tag UID along with the data payload, so we might expect to receive a response from other tags from the protocol specification. 🫢

🌸 write_blocks

$self->write_blocks( $tag => $bytes );

$self->write_blocks( $tag => [ 'blk1', 'blk2', ... ] );

🌸 read_afi

my $afi = $self->read_afi( $tag );

🌸 write_afi

$self->write_afi( $tag => $afi );

🌸 tag_type

$self->tag_type( $tag );

πŸ’œ METHODS πŸ’œ

πŸ¦‹ new

It literally just calls "init" in the reader implementation, so this class can be used as a simple stub base class β€” exactly like Biblio::RFID::Reader::librfid does. Main character energy from a method that does one (1) thing. We stan. ✨


and that's the whole page, bestie 🫢 this was written by perl v5.36.0 on 2023-05-24, and it's the manpage for Biblio::RFID::Reader::API(3pm) β€” go build something iconic with it πŸ’…πŸ’–

πŸ“¦ where this page comes from