---
name: "Biblio::RFID::Reader::API"
section: "3pm"
platform: "linux"
package: "libbiblio-rfid-perl"
version: "0.05-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Biblio::RFID::Reader::API"
---

# Biblio::RFID::Reader::API(3pm)

low-level RFID reader documentation

## NAME

Biblio::RFID::Reader::API - low-level RFID reader documentation

## MANDATORY METHODS

Each reader must implement following hooks as sub-classes.

### init

```
  $self->init;
```

### inventory

```
  my @tags = $self->invetory;
```

### read\_blocks

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

All blocks are under key which is tag UID with array of blocks returned from reader

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

Biblio::RFID::Reader::3M810 sends tag UID with data payload, so we might expect to receive response from other tags from 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

Just calls `"init"` in reader implementation so this class can be used as simple stub base class like Biblio::RFID::Reader::librfid does
