Mercury API - Tag and tag read data structures. More...
Go to the source code of this file.
#define TMR_MAX_EPC_BYTE_COUNT (62) |
Definition at line 40 of file tmr_tag_data.h.
typedef struct TMR_TagReadData TMR_TagReadData |
A class to represent a read of an RFID tag. Provides access to the TMR_TRD_METADATA_FLAG_FREQUENCY tag structure and the metadata of the read event, such as the time of the read, the antenna that read the tag, and the number of times the tag was seen by the air protocol.
typedef enum TMR_TRD_MetadataFlag TMR_TRD_MetadataFlag |
Defines the constants that may be combined to form the metadata bitmask argument to the TMR_SR_cmdReadTagSingle, TMR_SR_cmdReadTagData, and TMR_SR_cmdGetTagBuffer methods.
enum TMR_TRD_MetadataFlag |
Defines the constants that may be combined to form the metadata bitmask argument to the TMR_SR_cmdReadTagSingle, TMR_SR_cmdReadTagData, and TMR_SR_cmdGetTagBuffer methods.
Definition at line 97 of file tmr_tag_data.h.
void TMR_bytesToHex | ( | const uint8_t * | bytes, |
uint32_t | size, | ||
char * | hex | ||
) |
Convert an array of bytes, such as a tag EPC, into a hexadecimal string.
bytes | The byte array to convert. | |
size | The length of the byte array to convert. | |
[out] | hex | The converted hexadecimal string, null-terminated. |
Definition at line 83 of file hex_bytes.c.
TMR_Status TMR_hexToBytes | ( | const char * | hex, |
uint8_t * | bytes, | ||
uint32_t | size, | ||
uint32_t * | convertLen | ||
) |
Convert a hexadecimal string into an array of bytes. The string may optionally include a "0x" prefix, which will be ignored.
hex | The hexadecimal string to convert. | |
[out] | bytes | The array to store the converted bytes. |
size | The length of the byte array to store into. | |
[out] | convertLen | The number of bytes written to the array, or NULL . |
If hex string is empty, *bytes should not be altered.
*convertLen is set to the correct value.
Function works when convertLen is NULL
.
Specific values: "00"
, "0000"
, "ffff"
, "0xffff"
, "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabb"
.
Definition at line 40 of file hex_bytes.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.