M5Unit-RFID 0.2.0 git rev:79c1939
Loading...
Searching...
No Matches
m5::unit::UnitJRD4035 Class Reference

UHF-RFID unit based on the JRD-4035 module (magicRF M100) More...

#include <unit_JRD4035.hpp>

Inheritance diagram for m5::unit::UnitJRD4035:
m5::unit::UHFRFIDComponent

Classes

struct  config_t
 Settings for begin. More...
 

Public Member Functions

virtual bool begin () override
 
virtual bool sleep () override
 Put the module into low power sleep.
 
virtual bool writeSelectParameter (const m5::uhf::Bank bank, const uint32_t pointer_bits, const uint8_t *mask, const size_t mask_len) override
 Store the mask that picks out one tag.
 
virtual bool writeSelectEnabled (const bool enable) override
 Apply the stored mask to tag operations, or stop applying it.
 
virtual TagResult readTagMemory (std::vector< uint8_t > &out, const m5::uhf::Bank bank, const uint16_t word_address, const uint16_t word_count, const uint32_t access_password) override
 Read word_count 16-bit words from bank, starting at word_address.
 
virtual TagResult writeTagMemory (const m5::uhf::Bank bank, const uint16_t word_address, const uint8_t *data, const size_t len, const uint32_t access_password) override
 Write len bytes to bank, starting at word_address.
 
virtual TagResult lockTagMemory (const uint32_t payload, const uint32_t access_password) override
 Apply a 20-bit Gen2 lock payload.
 
virtual TagResult killTag (const uint32_t kill_password) override
 Kill the addressed tag permanently.
 
virtual TagResult blockPermalock (std::vector< uint8_t > &out, const m5::uhf::Bank bank, const uint16_t block_pointer, const uint8_t block_range, const uint8_t *mask, const size_t mask_len, const uint32_t access_password, const bool allow_permanent) override
 Read or set which blocks of a bank are permanently locked.
 
virtual TagResult qtCommand (uint16_t &control, const bool write, const bool persistent, const uint32_t access_password) override
 Read or write the QT control word of the addressed tag.
 
virtual TagResult nxpChangeConfig (uint16_t &config, const uint16_t toggle, const uint32_t access_password) override
 Read the Config-Word of an NXP UCODE G2X, or invert bits of it.
 
virtual TagResult nxpChangeEAS (const bool enable, const uint32_t access_password) override
 Set or clear the Product Status Flag of an NXP UCODE G2X.
 
virtual bool nxpEASAlarm (std::vector< uint8_t > &alarm) override
 Ask the field whether any tag has its Product Status Flag asserted.
 
virtual TagResult nxpReadProtect (const bool protect, const uint32_t access_password) override
 Turn the read protection of an NXP UCODE G2X on or off.
 
virtual m5::uhf::Reason classify (const uint8_t error_code) const override
 Say what one of this reader's error codes means in EPC Gen2 terms.
 
Settings for begin
config_t config () const
 Gets the configuration.
 
void config (const config_t &cfg)
 Sets the configuration.
 
Reader settings
virtual bool readModuleInformation (m5::uhf::ModuleInformation &info) override
 Read the module information.
 
virtual bool readTransmitPower (int16_t &dbm100) override
 Read the transmit power in 1/100 dBm.
 
virtual bool writeTransmitPower (const int16_t dbm100) override
 Write the transmit power in 1/100 dBm.
 
virtual bool readRegion (m5::uhf::Region &region) override
 Read the operating region.
 
virtual bool writeRegion (const m5::uhf::Region region) override
 Write the operating region.
 
virtual bool readChannel (uint8_t &index) override
 Read the operating channel index.
 
virtual bool writeChannel (const uint8_t index) override
 Write the operating channel index.
 
virtual bool writeAutomaticFrequencyHopping (const bool enable) override
 Enable or disable automatic frequency hopping.
 
virtual bool writeContinuousCarrier (const bool enable) override
 Turn the unmodulated carrier on or off.
 
virtual bool readQueryParameters (m5::uhf::QueryParameters &qp) override
 Read the query parameters.
 
virtual bool writeQueryParameters (const m5::uhf::QueryParameters &qp) override
 Write the query parameters.
 
virtual bool writeAutoSleepTime (const uint8_t minutes) override
 Write the inactivity period after which the module sleeps automatically.
 
virtual bool writeIdle (const bool enter, const uint8_t minutes=0) override
 Put the module into IDLE, or bring it out.
 
virtual bool wake () override
 Wake the module from low power sleep.
 
virtual bool writeOperatingChannels (const std::vector< uint8_t > &channels) override
 Replace the channel list used for automatic frequency hopping.
 
virtual bool readBlockingSignal (m5::uhf::ChannelLevels &levels) override
 Measure the blocking signal on every channel of the operating region.
 
virtual bool readChannelRSSI (m5::uhf::ChannelLevels &levels) override
 Measure the RSSI on every channel of the operating region.
 
virtual bool readSelectParameter (m5::uhf::SelectParameter &sp) override
 Read back the select mask the reader holds.
 
Receiver tuning, specific to this chip
bool readDemodulatorParameters (m100::DemodulatorParameters &dp)
 Read the receiver demodulator settings.
 
bool writeDemodulatorParameters (const m100::DemodulatorParameters &dp)
 Write the receiver demodulator settings.
 
- Public Member Functions inherited from m5::unit::UHFRFIDComponent
virtual void update (const bool force=false) override
 
config_t config () const
 Gets the configuration.
 
void config (const config_t &cfg)
 Sets the configuration.
 
bool startPolling (const uint16_t count)
 Start continuous polling.
 
bool stopPolling ()
 Stop continuous polling.
 
bool inPolling () const
 In continuous polling?
 
unsigned long lastFrameAt () const
 Timestamp (m5::utility::millis()) of the most recently arrived frame.
 
size_t available () const
 Number of queued tag notifications.
 
const m5::uhf::Tagoldest () const
 Oldest queued tag.
 
void discard ()
 Discard the oldest queued tag.
 
void flush ()
 Discard all queued tags.
 
uint32_t dropped () const
 Number of tag notifications dropped due to queue overflow.
 
void clearDropped ()
 Clear the dropped counter.
 

Protected Member Functions

virtual bool pump (const uint32_t timeout_ms) override
 
virtual bool start_polling_command (const uint16_t count) override
 
virtual bool stop_polling_command () override
 
bool send_command (const uint8_t command, const uint8_t *param, const uint16_t param_len)
 
bool send_and_wait (m100::Frame &response, const uint8_t command, const uint8_t *param, const uint16_t param_len, const uint32_t timeout_ms=0, const uint8_t answer_command=0)
 
bool read_frame (m100::Frame &out, const uint32_t timeout_ms)
 
void flush_rx ()
 
void route_frame (const m100::Frame &f)
 
void resynchronize ()
 
bool read_module_information_kind (std::string &out, const uint8_t kind)
 
bool read_channel_levels (m5::uhf::ChannelLevels &levels, const uint8_t command)
 
bool succeeded (const m100::Frame &response, const char *what) const
 
TagResult tag_carried_it_out (const m100::Frame &response, const char *what) const
 
TagResult send_tag_operation (m100::Frame &response, const uint8_t command, const uint8_t *param, const uint16_t param_len, const char *what, const uint8_t answer_command=0)
 
- Protected Member Functions inherited from m5::unit::UHFRFIDComponent
 UHFRFIDComponent (const uint8_t addr=0x00)
 
bool reject_while_polling (const char *what) const
 
bool reject_without_selection (const char *what) const
 
void push_tag (const m5::uhf::Tag &tag)
 
void note_frame_arrival ()
 
void reissue_polling_if_needed ()
 

Static Protected Member Functions

static uint8_t error_code_of (const m100::Frame &response)
 

Protected Attributes

uint8_t _frame_header {m100::jrd::FRAME_HEADER}
 
uint8_t _frame_end {m100::jrd::FRAME_END}
 
std::vector< uint8_t > _rx {}
 
m100::Frame _response {}
 
bool _response_pending {}
 
uint8_t _awaiting_command {}
 
config_t _cfg_jrd4035 {}
 
- Protected Attributes inherited from m5::unit::UHFRFIDComponent
config_t _cfg {}
 
std::unique_ptr< m5::container::CircularBuffer< m5::uhf::Tag > > _tags {}
 
uint32_t _dropped {}
 
bool _polling {}
 
bool _rounds_running {}
 
bool _select_mask_stored {}
 
bool _select_enabled {}
 
uint16_t _polling_count {}
 
unsigned long _last_frame_at {}
 
unsigned long _polling_issued_at {}
 

Detailed Description

UHF-RFID unit based on the JRD-4035 module (magicRF M100)

EPCglobal UHF Class 1 Gen 2 / ISO 18000-6C at 840-960MHz over UART

Member Function Documentation

◆ begin()

bool m5::unit::UnitJRD4035::begin ( )
overridevirtual

Reimplemented from m5::unit::UHFRFIDComponent.

◆ blockPermalock()

TagResult m5::unit::UnitJRD4035::blockPermalock ( std::vector< uint8_t > & out,
const m5::uhf::Bank bank,
const uint16_t block_pointer,
const uint8_t block_range,
const uint8_t * mask,
const size_t mask_len,
const uint32_t access_password,
const bool allow_permanent )
overridevirtual

Read or set which blocks of a bank are permanently locked.

Parameters
[out]outMask read, one bit per block with the first block in the most significant bit. Left alone when locking
bankBank the blocks are in
block_pointerFirst block the mask covers, in units of sixteen
block_rangeWords of mask, each covering sixteen blocks
maskMask to apply, or nullptr to read
mask_lenIts length in bytes, which is twice block_range
access_passwordAccess password the tag holds, or zero
allow_permanentSay so to mean a lock, which is refused without it
Returns
Nothing on success, or the error code the reader reported
Precondition
A mask has to have been stored and applied, or this is refused
Warning
A block locked this way is unwritable for the life of the tag. Reading it is unaffected, and so is every other block

Implements m5::unit::UHFRFIDComponent.

◆ classify()

m5::uhf::Reason m5::unit::UnitJRD4035::classify ( const uint8_t error_code) const
overridevirtual

Say what one of this reader's error codes means in EPC Gen2 terms.

Parameters
error_codeCode from the error of a TagResult
Returns
What became of the operation

Which codes a reader uses is its own affair, so each reader says what its own mean. That keeps the layer above able to act on a failure without knowing the reader

Implements m5::unit::UHFRFIDComponent.

◆ killTag()

TagResult m5::unit::UnitJRD4035::killTag ( const uint32_t kill_password)
overridevirtual

Kill the addressed tag permanently.

Parameters
kill_passwordKill password the tag holds, which may not be zero
Returns
Nothing on success, or the error code the reader reported
Precondition
A mask has to have been stored and applied, or this is refused
Warning
A killed tag never answers again. Nothing here can say whether the mask in force picks out the tag that was meant rather than another one in the field, so what is about to die is worth reading back first
std::vector<uint8_t> epc{};
if (unit.readTagMemory(epc, m5::uhf::Bank::Epc, 2, 6, 0) && epc == expected) {
unit.killTag(password);
}
Unit-related namespace.

Implements m5::unit::UHFRFIDComponent.

◆ lockTagMemory()

TagResult m5::unit::UnitJRD4035::lockTagMemory ( const uint32_t payload,
const uint32_t access_password )
overridevirtual

Apply a 20-bit Gen2 lock payload.

Parameters
payloadLock payload, see m5::uhf::buildLockPayload
access_passwordAccess password the tag holds, or zero
Returns
Nothing on success, or the error code the reader reported
Precondition
A mask has to have been stored and applied, or this is refused
Warning
A payload asking for a permanent lock cannot be undone. m5::uhf::LockAction names which of them those are

Implements m5::unit::UHFRFIDComponent.

◆ nxpChangeConfig()

TagResult m5::unit::UnitJRD4035::nxpChangeConfig ( uint16_t & config,
const uint16_t toggle,
const uint32_t access_password )
overridevirtual

Read the Config-Word of an NXP UCODE G2X, or invert bits of it.

Parameters
[out]configWord the tag holds once the command has been carried out
toggleBits to invert. Zero reads the word without changing anything
access_passwordAccess password the tag holds, or zero
Returns
Nothing on success, or the error code the reader reported
Precondition
A mask has to have been stored and applied, or this is refused

The word is toggled rather than assigned: a one inverts the bit it stands over and a zero leaves it alone. Sending the same bits twice puts the word back

Warning
Reading costs nothing, but a tag answers a toggle from the secured state alone. From the open state it hands back the word it already had and changes nothing, and says nothing about having refused (UCODE G2iM SL3S1003_1013 Rev3.7 Table 12)
The Config-Word carries the read protection and the range reduction among other things, so a bit inverted by mistake changes what the tag will answer at all

Implements m5::unit::UHFRFIDComponent.

◆ nxpChangeEAS()

TagResult m5::unit::UnitJRD4035::nxpChangeEAS ( const bool enable,
const uint32_t access_password )
overridevirtual

Set or clear the Product Status Flag of an NXP UCODE G2X.

Parameters
enableTrue to assert the flag, false to clear it
access_passwordAccess password the tag holds, or zero
Returns
Nothing on success, or the error code the reader reported
Precondition
A mask has to have been stored and applied, or this is refused

A tag whose flag is asserted answers nxpEASAlarm(), which is what an article surveillance gate listens for

Warning
A tag whose access password is zero ignores this command outright. Give it one first

Implements m5::unit::UHFRFIDComponent.

◆ nxpEASAlarm()

bool m5::unit::UnitJRD4035::nxpEASAlarm ( std::vector< uint8_t > & alarm)
overridevirtual

Ask the field whether any tag has its Product Status Flag asserted.

Parameters
[out]alarmCode the tag backscattered, or empty when nothing answered
Returns
True when the question was put and an answer came back

This asks the field rather than one tag, so it needs neither a selection nor a password. What answers hands back a code rather than a name: an NXP UCODE G2iM sends a fixed 64-bit one

Note
Nothing being flagged is an answer and not a failure, which is why an empty code is reported apart from whether the question could be asked at all

Implements m5::unit::UHFRFIDComponent.

◆ nxpReadProtect()

TagResult m5::unit::UnitJRD4035::nxpReadProtect ( const bool protect,
const uint32_t access_password )
overridevirtual

Turn the read protection of an NXP UCODE G2X on or off.

Parameters
protectTrue to protect, false to put it back
access_passwordAccess password the tag holds, or zero
Returns
Nothing on success, or the error code the reader reported
Precondition
A mask has to have been stored and applied, or this is refused

Protected memory reads back as zeroes rather than falling silent, so the tag still answers an inventory round and can be addressed again to undo this

Warning
Both the EPC and the TID are protected at once, so every protected tag reads back the same all-zero EPC and they can no longer be told apart. Undo this with one tag in the field
A tag whose access password is zero ignores this command outright. Give it one first

Implements m5::unit::UHFRFIDComponent.

◆ pump()

bool m5::unit::UnitJRD4035::pump ( const uint32_t timeout_ms)
overrideprotectedvirtual

◆ qtCommand()

TagResult m5::unit::UnitJRD4035::qtCommand ( uint16_t & control,
const bool write,
const bool persistent,
const uint32_t access_password )
overridevirtual

Read or write the QT control word of the addressed tag.

Parameters
[in,out]controlWord read, or word to write
writeTrue to write, false to read
persistentTrue to write where a loss of power does not undo it
access_passwordAccess password the tag holds, or zero
Returns
Nothing on success, or the error code the reader reported
Precondition
A mask has to have been stored and applied, or this is refused
Warning
Switching an Impinj Monza 4QT to its public map changes the EPC it answers under, so the mask in force stops picking it out

Implements m5::unit::UHFRFIDComponent.

◆ readBlockingSignal()

bool m5::unit::UnitJRD4035::readBlockingSignal ( m5::uhf::ChannelLevels & levels)
overridevirtual

Measure the blocking signal on every channel of the operating region.

Parameters
[out]levelsMeasured level of each channel
Returns
True if successful

Scans for interference the reader itself does not produce, which is what keeps a tag from being read when the antenna and the power are both fine

Implements m5::unit::UHFRFIDComponent.

◆ readChannel()

bool m5::unit::UnitJRD4035::readChannel ( uint8_t & index)
overridevirtual

Read the operating channel index.

Parameters
[out]indexChannel index within the operating region
Returns
True if successful

Whichever channel the reader is on at that moment, which is not the same as a setting: while it hops it moves on its own, and two reads a second apart disagree

Implements m5::unit::UHFRFIDComponent.

◆ readChannelRSSI()

bool m5::unit::UnitJRD4035::readChannelRSSI ( m5::uhf::ChannelLevels & levels)
overridevirtual

Measure the RSSI on every channel of the operating region.

Parameters
[out]levelsMeasured level of each channel
Returns
True if successful

Reveals other readers operating nearby

Implements m5::unit::UHFRFIDComponent.

◆ readDemodulatorParameters()

bool m5::unit::UnitJRD4035::readDemodulatorParameters ( m100::DemodulatorParameters & dp)

Read the receiver demodulator settings.

Parameters
[out]dpDemodulator parameters
Returns
True if successful

◆ readModuleInformation()

bool m5::unit::UnitJRD4035::readModuleInformation ( m5::uhf::ModuleInformation & info)
overridevirtual

Read the module information.

Implements m5::unit::UHFRFIDComponent.

◆ readQueryParameters()

bool m5::unit::UnitJRD4035::readQueryParameters ( m5::uhf::QueryParameters & qp)
overridevirtual

Read the query parameters.

Implements m5::unit::UHFRFIDComponent.

◆ readRegion()

bool m5::unit::UnitJRD4035::readRegion ( m5::uhf::Region & region)
overridevirtual

Read the operating region.

Implements m5::unit::UHFRFIDComponent.

◆ readSelectParameter()

bool m5::unit::UnitJRD4035::readSelectParameter ( m5::uhf::SelectParameter & sp)
overridevirtual

Read back the select mask the reader holds.

Parameters
[out]spSelect parameter
Returns
True if successful

No tag replies to a Select, so this is the only way to confirm that the reader is addressing what the caller believes it is

Implements m5::unit::UHFRFIDComponent.

◆ readTagMemory()

TagResult m5::unit::UnitJRD4035::readTagMemory ( std::vector< uint8_t > & out,
const m5::uhf::Bank bank,
const uint16_t word_address,
const uint16_t word_count,
const uint32_t access_password )
overridevirtual

Read word_count 16-bit words from bank, starting at word_address.

Parameters
[out]outBytes read
bankMemory bank
word_addressStart address in 16-bit words
word_countNumber of 16-bit words
access_passwordAccess password the tag holds, or zero
Returns
Nothing on success, or the error code the reader reported
Precondition
A mask has to have been stored and applied, or this is refused

Implements m5::unit::UHFRFIDComponent.

◆ readTransmitPower()

bool m5::unit::UnitJRD4035::readTransmitPower ( int16_t & dbm100)
overridevirtual

Read the transmit power in 1/100 dBm.

Implements m5::unit::UHFRFIDComponent.

◆ sleep()

bool m5::unit::UnitJRD4035::sleep ( )
overridevirtual

Put the module into low power sleep.

Returns
True if successful
Warning
Sleeping and waking repeatedly has been seen to leave this module answering nothing for tens of seconds, reporting a watchdog reset when it comes back. It does come back on its own, but nothing on the host can hurry it: on Unit UHF-RFID the module's enable pin is tied high on the board, and the connector carries only power and the serial port

Implements m5::unit::UHFRFIDComponent.

◆ start_polling_command()

bool m5::unit::UnitJRD4035::start_polling_command ( const uint16_t count)
overrideprotectedvirtual

◆ stop_polling_command()

bool m5::unit::UnitJRD4035::stop_polling_command ( )
overrideprotectedvirtual

◆ wake()

bool m5::unit::UnitJRD4035::wake ( )
overridevirtual

Wake the module from low power sleep.

Returns
True if successful

Sends one byte to wake it and waits for the chip firmware to reload. The byte itself is thrown away by the module, which is why it is sent on its own rather than as the first real command

Warning
Waking restores the power, the frequency, the hopping mode, the sleep time and the demodulator parameters, but not the select mode or the select parameter. The module comes back holding a mask of zero length, which matches every tag rather than none, so a read or a write goes on succeeding against whichever tag answers. A tag addressed before the sleep has to be selected again; UHFLayer::wake() does that for a caller working through the layer
This can return before the module answers. How long waking takes is not documented, and a module can take over a second
Note
This spends a command of its own, so it is not free to call on a module that is already awake

Implements m5::unit::UHFRFIDComponent.

◆ writeAutomaticFrequencyHopping()

bool m5::unit::UnitJRD4035::writeAutomaticFrequencyHopping ( const bool enable)
overridevirtual

Enable or disable automatic frequency hopping.

Implements m5::unit::UHFRFIDComponent.

◆ writeAutoSleepTime()

bool m5::unit::UnitJRD4035::writeAutoSleepTime ( const uint8_t minutes)
overridevirtual

Write the inactivity period after which the module sleeps automatically.

Parameters
minutes1 to 30 minutes, or 0 to disable automatic sleep
Returns
True if successful
Warning
This is the same sleep as sleep(), reached without anyone calling it, so it takes the select mask with it: a tag addressed before the module went to sleep is not the one answering afterwards. writeIdle() takes a period of its own and keeps the mask
The module has no command to say what this is set to, and it survives a power cycle, so what a module holds now cannot be found out

Implements m5::unit::UHFRFIDComponent.

◆ writeChannel()

bool m5::unit::UnitJRD4035::writeChannel ( const uint8_t index)
overridevirtual

Write the operating channel index.

Implements m5::unit::UHFRFIDComponent.

◆ writeContinuousCarrier()

bool m5::unit::UnitJRD4035::writeContinuousCarrier ( const bool enable)
overridevirtual

Turn the unmodulated carrier on or off.

Parameters
enableTrue to transmit a carrier, false to stop
Returns
True if successful

A carrier with nothing modulated onto it, which is what a spectrum analyser or a power meter needs to measure the transmitter. No tag answers it and nothing else uses it

Warning
This transmits until it is turned off. What may be radiated, and for how long, is a question of where the unit is being used: a carrier that never stops is not what the channel rules of most regions have in mind

Implements m5::unit::UHFRFIDComponent.

◆ writeDemodulatorParameters()

bool m5::unit::UnitJRD4035::writeDemodulatorParameters ( const m100::DemodulatorParameters & dp)

Write the receiver demodulator settings.

Parameters
dpDemodulator parameters
Returns
True if successful

Transmit power decides how far the reader reaches and these decide how far it listens. Lowering both is what makes a tag resting on the antenna readable: left at the factory settings, which reach about a metre and a half, the reader misses most inventory rounds at contact however strong the reply is

◆ writeIdle()

bool m5::unit::UnitJRD4035::writeIdle ( const bool enter,
const uint8_t minutes = 0 )
overridevirtual

Put the module into IDLE, or bring it out.

Parameters
enterTrue to enter IDLE, false to leave it
minutesHow long without work before the module enters IDLE by itself, 0 to 30. Zero means it does not
Returns
True if successful

IDLE turns off everything but the digital part and the serial port. Unlike sleep() it keeps what the module was holding, the select parameter included, and the module goes on answering commands

Note
The first tag operation after this brings the module back by itself, and that one may fail where a later one would not: the radio is still settling

Implements m5::unit::UHFRFIDComponent.

◆ writeOperatingChannels()

bool m5::unit::UnitJRD4035::writeOperatingChannels ( const std::vector< uint8_t > & channels)
overridevirtual

Replace the channel list used for automatic frequency hopping.

Parameters
channelsChannel indices of the operating region, in the order to hop through
Returns
True if successful
Note
Automatic frequency hopping picks from this list once it is set, instead of the list preset in the module. Useful to keep the reader inside the channels a region permits

Implements m5::unit::UHFRFIDComponent.

◆ writeQueryParameters()

bool m5::unit::UnitJRD4035::writeQueryParameters ( const m5::uhf::QueryParameters & qp)
overridevirtual

Write the query parameters.

Implements m5::unit::UHFRFIDComponent.

◆ writeRegion()

bool m5::unit::UnitJRD4035::writeRegion ( const m5::uhf::Region region)
overridevirtual

Write the operating region.

Implements m5::unit::UHFRFIDComponent.

◆ writeSelectEnabled()

bool m5::unit::UnitJRD4035::writeSelectEnabled ( const bool enable)
overridevirtual

Apply the stored mask to tag operations, or stop applying it.

Parameters
enableTrue to address only the selected tag, false to address any tag
Returns
True if successful
Note
Inventory is left unfiltered either way, so polling keeps reporting every tag in the field while Read, Write, Lock and Kill are narrowed down to the selected one

Implements m5::unit::UHFRFIDComponent.

◆ writeSelectParameter()

bool m5::unit::UnitJRD4035::writeSelectParameter ( const m5::uhf::Bank bank,
const uint32_t pointer_bits,
const uint8_t * mask,
const size_t mask_len )
overridevirtual

Store the mask that picks out one tag.

Parameters
bankBank the mask is matched against; Reserved is not selectable
pointer_bitsWhere the mask starts, as a bit address inside the bank
maskMask bytes
mask_lenLength of mask in bytes
Returns
True if successful
Note
Storing a mask does not talk to any tag, so this succeeds for a tag that is not in the field. Reading the tag back is the only way to learn whether it answered
A mask of zero length matches every tag rather than none, so it is refused here

Implements m5::unit::UHFRFIDComponent.

◆ writeTagMemory()

TagResult m5::unit::UnitJRD4035::writeTagMemory ( const m5::uhf::Bank bank,
const uint16_t word_address,
const uint8_t * data,
const size_t len,
const uint32_t access_password )
overridevirtual

Write len bytes to bank, starting at word_address.

Parameters
bankMemory bank
word_addressStart address in 16-bit words
dataBytes to write
lenTheir length, which has to be even
access_passwordAccess password the tag holds, or zero
Returns
Nothing on success, or the error code the reader reported
Precondition
A mask has to have been stored and applied, or this is refused
Warning
Writing the EPC bank changes the very bytes an EPC mask matches on, so the mask in force stops picking this tag out. Store it again from what the tag now holds

Implements m5::unit::UHFRFIDComponent.

◆ writeTransmitPower()

bool m5::unit::UnitJRD4035::writeTransmitPower ( const int16_t dbm100)
overridevirtual

Write the transmit power in 1/100 dBm.

Implements m5::unit::UHFRFIDComponent.