Mercury API - top level implementation. More...
#include <stddef.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "tm_reader.h"#include "serial_reader_imp.h"#include "tmr_utils.h"
Go to the source code of this file.
| #define EAPI_PREFIX "eapi://" |
Definition at line 39 of file tm_reader.c.
| #define EAPI_PREFIX_LEN (sizeof(EAPI_PREFIX)-1) |
Definition at line 40 of file tm_reader.c.
| #define LLRP_EAPI_PREFIX "llrp+eapi://" |
Definition at line 45 of file tm_reader.c.
| #define LLRP_EAPI_PREFIX_LEN (sizeof(LLRP_EAPI_PREFIX)-1) |
Definition at line 46 of file tm_reader.c.
| #define LLRP_PREFIX "llrp://" |
Definition at line 48 of file tm_reader.c.
| #define LLRP_PREFIX_LEN (sizeof(LLRP_PREFIX)-1) |
Definition at line 49 of file tm_reader.c.
| #define TMR_PREFIX "tmr://" |
Definition at line 42 of file tm_reader.c.
| #define TMR_PREFIX_LEN (sizeof(TMR_PREFIX)-1) |
Definition at line 43 of file tm_reader.c.
| typedef struct TMR_SerialTransportDispatchTable TMR_SerialTransportDispatchTable |
| void* do_background_receiveAutonomousReading | ( | void * | arg | ) |
| void TMR__notifyTransportListeners | ( | TMR_Reader * | reader, |
| bool | tx, | ||
| uint32_t | dataLen, | ||
| uint8_t * | data, | ||
| int | timeout | ||
| ) |
Definition at line 767 of file tm_reader.c.
| TMR_Status TMR_GEN2_init_BapParams | ( | TMR_GEN2_Bap * | bapVal, |
| int32_t | powerUpDelayUs, | ||
| int32_t | freqHopOfftimeUs | ||
| ) |
Initialize a TMR_GEN2_Bap with the provided parameters
| bapVal | pointer to the TMR_GEN2_Bap structure |
| powerUpDelayUs | the power up delay time |
| freqHopOfftimeUs | the offtime for frequencyHop |
Definition at line 929 of file tm_reader.c.
| static void TMR_initSerialTransportTable | ( | ) | [static] |
Private: Should not be used by user level application. structure containing the transport scheme name and the pointer to the factory init function.
We did not get a chance to initialize the transport table. Initialize it now.
Definition at line 78 of file tm_reader.c.
| bool TMR_memoryProvider | ( | void * | cookie, |
| uint16_t * | size, | ||
| uint8_t * | data | ||
| ) |
This function can be used as a callback to TMR_firmwareLoad when the firmware image exists in system memory. The cookie is a pointer to a TMR_memoryCookie that is initialized with the start of the firmware image in memory and its size.
| cookie | TMR_memoryCookie value. | |
| [in] | size | The number of bytes requested. |
| [out] | size | The number of bytes returned. |
| data | Pointer to buffer to fill. |
Definition at line 782 of file tm_reader.c.
| void TMR_paramProbe | ( | struct TMR_Reader * | reader, |
| TMR_Param | key | ||
| ) |
Initialize a TMR_TagOp as a Higgs2 Partial Load Image operation with the provided parameters.
| tagop | Pointer to the tagop structure to initialize. |
| killPassword | kill password |
| accessPassword | access password |
| epc | EPC to write |
Definition at line 3530 of file tm_reader.c.
| TMR_Status TMR_reader_init_internal | ( | struct TMR_Reader * | reader | ) |
Definition at line 296 of file tm_reader.c.
| TMR_Status TMR_receiveAutonomousReading | ( | struct TMR_Reader * | reader, |
| TMR_TagReadData * | trd, | ||
| TMR_Reader_StatsValues * | stats | ||
| ) |
Definition at line 3613 of file tm_reader.c.
| TMR_Status TMR_TA_init_gen2 | ( | TMR_TagAuthentication * | auth, |
| TMR_GEN2_Password | password | ||
| ) |
Initialize a TMR_TagAuthentication structure as a Gen2 password.
| auth | Pointer to the structure to initialize. |
| password | The password 32-bit Gen2 password value. |
Definition at line 1085 of file tm_reader.c.
| TMR_Status TMR_TA_init_gen2_Denatran_IAV_writeCredentials | ( | TMR_TagAuthentication * | auth, |
| uint8_t | idLength, | ||
| uint8_t * | tagId, | ||
| uint8_t | len, | ||
| uint8_t * | data | ||
| ) |
Initialize a TMR_TagAuthentication structure as Denatran IAV write credential
| auth | Pointer to the structure to initialize. |
| data | Gen2 Denatran IAV write credential |
Definition at line 1101 of file tm_reader.c.
| TMR_Status TMR_TA_init_gen2_Denatran_IAV_writeSecCredentials | ( | TMR_TagAuthentication * | auth, |
| uint8_t | length, | ||
| uint8_t * | data, | ||
| uint8_t | len, | ||
| uint8_t * | credentials | ||
| ) |
Initialize a TMR_TagAuthentication structure as Denatran IAV write credential
| auth | Pointer to the structure to initialize. |
| data | Gen2 Denatran IAV write credential |
Definition at line 1142 of file tm_reader.c.
| TMR_Status TMR_TagOp_init_GEN2_BlockErase | ( | TMR_TagOp * | tagop, |
| TMR_GEN2_Bank | bank, | ||
| uint32_t | wordPtr, | ||
| uint8_t | wordCount | ||
| ) |
Initialize a TMR_TagOp as a GEN2 BlockErase operation with the provided parameters.
| tagop | Pointer to the tagop structure to initialize. |
| bank | bank |
| wordPtr | The starting word address to erase |
| wordCount | Number of words to erase |
Definition at line 1672 of file tm_reader.c.
| TMR_Status TMR_TagOp_init_GEN2_BlockPermaLock | ( | TMR_TagOp * | tagop, |
| uint8_t | readLock, | ||
| TMR_GEN2_Bank | bank, | ||
| uint32_t | blockPtr, | ||
| TMR_uint16List * | mask | ||
| ) |
Initialize a TMR_TagOp as a GEN2 BlockPermaLock operation with the provided parameters.
| tagop | Pointer to the tagop structure to initialize. |
| readLock | readLock |
| bank | bank |
| blockPtr | block pointer |
| mask | mask (The length of the mask specifies the block range) |
Definition at line 1651 of file tm_reader.c.
| TMR_Status TMR_TagOp_init_GEN2_BlockWrite | ( | TMR_TagOp * | tagop, |
| TMR_GEN2_Bank | bank, | ||
| uint32_t | wordPtr, | ||
| TMR_uint16List * | data | ||
| ) |
Initialize a TMR_TagOp as a GEN2 BlockWrite operation with the provided parameters.
| tagop | Pointer to the tagop structure to initialize. |
| bank | bank |
| wordPtr | word pointer |
| data | data (The length of the data specifies the word count) |
Definition at line 1631 of file tm_reader.c.
| TMR_Status TMR_TagOp_init_GEN2_Kill | ( | TMR_TagOp * | tagop, |
| TMR_GEN2_Password | killPassword | ||
| ) |
Initialize a TMR_TagOp as a GEN2 kill operation with the provided parameters.
| tagop | Pointer to the tagop structure to initialize. |
| killPassword | tag kill password |
Definition at line 1613 of file tm_reader.c.
| TMR_Status TMR_TagOp_init_GEN2_Lock | ( | TMR_TagOp * | tagop, |
| uint16_t | mask, | ||
| uint16_t | action, | ||
| TMR_GEN2_Password | accessPassword | ||
| ) |
Initialize a TMR_TagOp as a GEN2 lock operation with the provided parameters.
| tagop | Pointer to the tagop structure to initialize. |
| mask | mask |
| action | action |
| accessPassword | The password to use to lock the tag. |
Definition at line 1581 of file tm_reader.c.
| TMR_Status TMR_TagOp_init_GEN2_ReadData | ( | TMR_TagOp * | tagop, |
| TMR_GEN2_Bank | bank, | ||
| uint32_t | wordAddress, | ||
| uint8_t | len | ||
| ) |
Initialize a TMR_TagOp as a GEN2 data read operation with the provided parameters.
| tagop | Pointer to the tagop structure to initialize. |
| bank | Memory bank from which to read |
| wordAddress | Word address of location in bank from which to read |
| len | Number of words to read |
Definition at line 1453 of file tm_reader.c.
| TMR_Status TMR_TagOp_init_GEN2_SecurePassWord | ( | TMR_TagOp * | tagop, |
| uint8_t | passwordType, | ||
| uint32_t | gen2PassWord, | ||
| uint8_t | addressLength, | ||
| uint8_t | addressOffset, | ||
| uint16_t | flashOffset | ||
| ) |
Initialize a TMR_TagOp as a Gen2 Secure Password with the provided parameters.
| tagop | Pointer to the tagop structure to initialize |
| passwordType | specifying the mode of password |
| gen2PassWord | Gen2 access password |
| addressLength | Number of bits used to address the AP list |
| addressOffset | EPC word offset |
| flashOffset | User flash offset |
Definition at line 1502 of file tm_reader.c.
| TMR_Status TMR_TagOp_init_GEN2_SecureReadData | ( | TMR_TagOp * | tagop, |
| TMR_GEN2_Bank | bank, | ||
| uint32_t | wordAddress, | ||
| uint8_t | len, | ||
| uint8_t | tagtype, | ||
| uint8_t | passwordType | ||
| ) |
Initialize a TMR_TagOp as a GEN2 Secure data read operation with the provided parameters.
| tagop | Pointer to the tagop structure to initialize. |
| bank | Memory bank from which to read |
| wordAddress | Word address of location in bank from which to read |
| len | Number of words to read |
| tagtype | to select Alien Higgs 3 secure access and Monza 4 secure access |
| passwordType | specifying the mode of password |
Definition at line 1477 of file tm_reader.c.
| TMR_Status TMR_TagOp_init_GEN2_WriteData | ( | TMR_TagOp * | tagop, |
| TMR_GEN2_Bank | bank, | ||
| uint32_t | wordAddress, | ||
| TMR_uint16List * | data | ||
| ) |
Initialize a TMR_TagOp as a GEN2 data write operation with the provided parameters.
| tagop | Pointer to the tagop structure to initialize. |
| bank | Memory bank to write into |
| wordAddress | Word address of location to begin write |
| data | Data to write |
Definition at line 1545 of file tm_reader.c.
| TMR_Status TMR_TagOp_init_GEN2_WriteTag | ( | TMR_TagOp * | tagop, |
| TMR_TagData * | epc | ||
| ) |
Initialize a TMR_TagOp as a GEN2 EPC write operation with the provided parameters.
| tagop | Pointer to the tagop structure to initialize. |
| epc | EPC to write |
Definition at line 1435 of file tm_reader.c.
| TMR_Status TMR_TagOp_init_ISO180006B_Lock | ( | TMR_TagOp * | tagop, |
| uint8_t | address | ||
| ) |
Initialize a TMR_TagOp as a ISO180006B lock operation with the provided parameters.
| tagop | Pointer to the tagop structure to initialize. |
| address | The memory address of the byte to lock. |
Definition at line 1598 of file tm_reader.c.
| TMR_Status TMR_TagOp_init_ISO180006B_ReadData | ( | TMR_TagOp * | tagop, |
| uint8_t | byteAddress, | ||
| uint8_t | len | ||
| ) |
Initialize a TMR_TagOp as a ISO18000B data read operation with the provided parameters.
| tagop | Pointer to the tagop structure to initialize. |
| byteAddress | Address of location in bank from which to read |
| len | Number of bytes to read |
Definition at line 1524 of file tm_reader.c.
| TMR_Status TMR_TagOp_init_ISO180006B_WriteData | ( | TMR_TagOp * | tagop, |
| uint8_t | byteAddress, | ||
| TMR_uint8List * | data | ||
| ) |
Initialize a TMR_TagOp as a ISO180006B data write operation with the provided parameters.
| tagop | Pointer to the tagop structure to initialize. |
| byteAddress | address of location to begin write |
| data | Data to write |
Definition at line 1565 of file tm_reader.c.
| TMR_Status TMR_TF_init_gen2_select | ( | TMR_TagFilter * | filter, |
| bool | invert, | ||
| TMR_GEN2_Bank | bank, | ||
| uint32_t | bitPointer, | ||
| uint16_t | maskBitLength, | ||
| uint8_t * | mask | ||
| ) |
Initialize a TMR_Filter structure as a Gen2 select filter with the provided parameters.
| filter | Pointer to the filter structure to initialize |
| invert | Whether to invert the result of the select |
| bank | The memory bank on the tag to compare with the data |
| bitPointer | The bit address of the tag data to compare |
| maskBitLength | The length of the data to compare |
| mask | The data to compare |
Definition at line 967 of file tm_reader.c.
| TMR_Status TMR_TF_init_tag | ( | TMR_TagFilter * | filter, |
| TMR_TagData * | tag | ||
| ) |
Initialize a TMR_Filter structure as tag data (EPC) filter with the provided tag (which is copied).
| filter | Pointer to the filter structure to initialize |
| tag | TMR_TagData to use as the filter value |
Definition at line 946 of file tm_reader.c.
| bool TMR_TF_match | ( | TMR_TagFilter * | filter, |
| TMR_TagData * | tag | ||
| ) |
Test if a tag matches this filter. Only applies to selects based on the EPC.
| filter | The filter to test with. |
| tag | The tag to test. |
Definition at line 1014 of file tm_reader.c.
| TMR_Status TMR_TLA_init_gen2 | ( | TMR_TagLockAction * | lockAction, |
| uint16_t | mask, | ||
| uint16_t | action | ||
| ) |
Initialize a TMR_TagLockAction as a Gen2 lock action with the provided parameters.
| lockAction | Pointer to the structure to initialize. |
| mask | mask |
| action | action |
Definition at line 1395 of file tm_reader.c.
| TMR_Status TMR_TRD_init | ( | TMR_TagReadData * | trd | ) |
Initialize TMR_TagReadData with default values. The tagData buffer will be initialized to TMR_MAX_EMBEDDED_DATA_LENGTH which can be found in tm_config.h. If this value is zero, then the buffer is pointed to NULL.
| trd | Pointer to the TMR_TagReadData structure to initialize |
Definition at line 837 of file tm_reader.c.
| TMR_Status TMR_TRD_init_data | ( | TMR_TagReadData * | trd, |
| uint16_t | size, | ||
| uint8_t * | buf | ||
| ) |
Initialize a TMR_TagReadData with the provided data storage area.
| trd | Pointer to the TMR_TagReadData structure to initialize |
| size | The number of bytes pointed to |
| buf | Pointer to the uint8_t storage area |
Definition at line 895 of file tm_reader.c.
| TMR_Status TMR_TRD_MEMBANK_init_data | ( | TMR_uint8List * | data, |
| uint16_t | size, | ||
| uint8_t * | buf | ||
| ) |
Initialize a TMR_TagReadDataMemBank with provided data storage area
| data | to the TMR_uint8List structure to initialize |
| size | The nuber of bytes pointed to |
| buf | pointer to the uint8_t storage area |
Definition at line 912 of file tm_reader.c.
| TMR_Status validateReadPlan | ( | TMR_Reader * | reader, |
| TMR_ReadPlan * | plan, | ||
| TMR_AntennaMapList * | txRxMap, | ||
| uint32_t | protocols | ||
| ) |
Definition at line 606 of file tm_reader.c.
TMR_SerialTransportDispatchTable tdTable [static] |
Definition at line 76 of file tm_reader.c.
TMR_SerialTransportDispatchTableData tdTableData[10] [static] |
Definition at line 75 of file tm_reader.c.
bool transportTableInitialized = false [static] |
Definition at line 74 of file tm_reader.c.