Biblio...Serial(3pm)

πŸ’– Biblio::RFID::Reader::Serial β€” bestie edition πŸ’–

okay so this is Biblio::RFID::Reader::Serial, from the User Contributed Perl Documentation section, and she's on 3pm. she's the base class for serial RFID readers β€” and also for serial-over-TCP ones, because she contains multitudes ✨


🌸 NAME 🌸

Biblio::RFID::Reader::Serial β€” the base class for serial readers, or serial-over-TCP readers. she's the blueprint the other reader classes build on, and she ate πŸ’…


πŸŽ€ METHODS πŸŽ€

πŸ¦‹ new

Opens the serial port (if that's even needed) and inits the reader. that's it, that's the whole job. she's lowkey doing the most important part 🫢

πŸ¦‹ port

she goes looking for USB serial ports at /dev/ttyUSB* and regular serial ports at /dev/ttyS*, and tries to open them. no cap, she's out here doing a whole vibe check on your hardware πŸ”₯

my $serial_obj = $self->port;

only want her to try one specific device? iconic, just set the environment variable:

RFID_DEVICE=/dev/ttyUSB1

and if you're feeling fancy and want a serial connection over a TCP socket instead, you have to export this environment variable:

RFID_TCP=hostname:port
fr fr, it's hostname:port β€” the hostname, then a colon, then the port. don't skip the colon bestie 😭

✨ SEE ALSO ✨

  • Biblio::RFID::Reader::3M810 πŸ’™
  • Biblio::RFID::Reader::CPRM01 πŸ’™
  • Biblio::RFID::Reader::API πŸ’™

go read those next, they're the rest of the friend group 🌈


sign-off time πŸŽ€ this little masterpiece shipped with perl v5.36.0 and it's dated 2023-05-24. she's been serving since then and she's still that girl πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from