Compile-time configuration
One header decides what a reader build contains. Flags off here are absent from the binary, not disabled in it: the fare module compiles to nothing at all in a Fluid gate, and there is no runtime switch that could turn it back on.
The module flags
| Flag | Here | Adds | Flash |
|---|---|---|---|
| CARDROM_FARE | off | Fare tables, the section-to-fare lookup, and the value field in the record. Turning it on changes what a record means and needs your own network to agree. | 18 KiB |
| CARDROM_PURSE | off | A stored value area in the EEPROM at 0x0010, its counters, and the deduct and top-up commands. Requires CARDROM_FARE. | 26 KiB |
| CARDROM_HOLDER_AREA | on | READ_FREE and WRITE_FREE, and the 7.6 KB the holder writes. | 4 KiB |
| CARDROM_MERGE | on | MERGE over the contact pads, and the transfer of records between two cards. | 7 KiB |
| CARDROM_MERGE_FOREIGN | on | Taking in a library, tool lending or membership card, which lands in the holder's area. | 3 KiB |
| CARDROM_CLOSED_GATE | off | The door logic for a gate that stands shut and opens on a valid presentation. A Fluid gate is half-open, so this is absent. | 11 KiB |
| CARDROM_INSPECTION | off | The handheld inspection mode, for a network that checks cards aboard. No service here is inspected. | 9 KiB |
| CARDROM_PANEL_FULL | on | All twelve languages in the panel. Off, the build comes with two and falls back. | 62 KiB |
| CARDROM_UNVERIFIED_COUNT | on | Counting a record whose seal cannot be checked, and marking it in the log. Off, such a record is ignored. | 1 KiB |
CARDROM_FARE and CARDROM_PURSE are part of the standard and pass the conformance suite. They are compiled out of every reader and every personalisation run in the Republic, because travel here takes no fare and Article 69(2) leaves nothing for a purse to hold.
Limits and sizes
| Constant | Here | Meaning |
|---|---|---|
| CARDROM_DEADLINE_MS | 300 | The transaction deadline. The door task refuses a transaction that missed it. |
| CARDROM_RECORD_DAYS | 90 | What EXPIRE cuts at. |
| CARDROM_MAX_COUNT | 9 | People one record may cover. |
| CARDROM_AUTH_RETRIES | 3 | Failures before the key reference is refused for 200 ms. |
| CARDROM_FRAME_COIL | 264 | Largest frame over the coil, bytes. |
| CARDROM_FRAME_PADS | 1032 | Largest frame over the contact pads, bytes. |
| CARDROM_NETWORK_KEYS | 8 | Foreign network keys a gate holds, for checking seals written elsewhere. |
| CARDROM_LOG_ENTRIES | 4096 | Entries a gate keeps before it rolls. Identifiers are dropped from the log within seven days. |
Personalisation
A card is personalised once, at the mint, and the same header drives it. PERSO_PURSE_AREA leaves the sixteen reserved bytes at 0x0010 zero here; a fork that compiles the purse in claims them. PERSO_HOLDER_AREA sets the size of the holder's area, 7,782 bytes here, and zero on a card that offers none.
Everything else on the card is fixed by the standard: the ROM block, the record ring, the wear reserve and the commit journal. A personalisation run that changes those produces a card the conformance suite rejects.