Classes | Defines | Typedefs | Enumerations | Functions
tmr_tag_data.h File Reference

Mercury API - Tag and tag read data structures. More...

#include "tmr_tag_protocol.h"
#include "tmr_gen2.h"
Include dependency graph for tmr_tag_data.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TMR_TagData
struct  TMR_TagReadData

Defines

#define TMR_MAX_EPC_BYTE_COUNT   (62)

Typedefs

typedef struct TMR_TagData TMR_TagData
typedef struct TMR_TagReadData TMR_TagReadData
typedef enum TMR_TRD_MetadataFlag TMR_TRD_MetadataFlag

Enumerations

enum  TMR_TRD_MetadataFlag {
  TMR_TRD_METADATA_FLAG_NONE = 0x0000, TMR_TRD_METADATA_FLAG_READCOUNT = 0x0001, TMR_TRD_METADATA_FLAG_RSSI = 0x0002, TMR_TRD_METADATA_FLAG_ANTENNAID = 0x0004,
  TMR_TRD_METADATA_FLAG_FREQUENCY = 0x0008, TMR_TRD_METADATA_FLAG_TIMESTAMP = 0x0010, TMR_TRD_METADATA_FLAG_PHASE = 0x0020, TMR_TRD_METADATA_FLAG_PROTOCOL = 0x0040,
  TMR_TRD_METADATA_FLAG_DATA = 0x0080, TMR_TRD_METADATA_FLAG_GPIO_STATUS = 0x0100, TMR_TRD_METADATA_FLAG_ALL
}

Functions

void TMR_bytesToHex (const uint8_t *bytes, uint32_t size, char *hex)
TMR_Status TMR_hexToBytes (const char *hex, uint8_t *bytes, uint32_t size, uint32_t *convertLen)
TMR_Status TMR_TRD_init (TMR_TagReadData *trd)
TMR_Status TMR_TRD_init_data (TMR_TagReadData *trd, uint16_t size, uint8_t *buf)
TMR_Status TMR_TRD_MEMBANK_init_data (TMR_uint8List *data, uint16_t size, uint8_t *buf)

Detailed Description

Mercury API - Tag and tag read data structures.

Author:
Brian Fiegel
Date:
5/7/2009

Definition in file tmr_tag_data.h.


Define Documentation

#define TMR_MAX_EPC_BYTE_COUNT   (62)

Definition at line 40 of file tmr_tag_data.h.


Typedef Documentation

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.

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.


Enumeration Type Documentation

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.

Enumerator:
TMR_TRD_METADATA_FLAG_NONE 
TMR_TRD_METADATA_FLAG_READCOUNT 
TMR_TRD_METADATA_FLAG_RSSI 
TMR_TRD_METADATA_FLAG_ANTENNAID 
TMR_TRD_METADATA_FLAG_FREQUENCY 
TMR_TRD_METADATA_FLAG_TIMESTAMP 
TMR_TRD_METADATA_FLAG_PHASE 
TMR_TRD_METADATA_FLAG_PROTOCOL 
TMR_TRD_METADATA_FLAG_DATA 
TMR_TRD_METADATA_FLAG_GPIO_STATUS 
TMR_TRD_METADATA_FLAG_ALL 

Definition at line 97 of file tmr_tag_data.h.


Function Documentation

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.

Parameters:
bytesThe byte array to convert.
sizeThe length of the byte array to convert.
[out]hexThe converted hexadecimal string, null-terminated.
Test:
If size is 0, *hex should point to an empty string.

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.

Parameters:
hexThe hexadecimal string to convert.
[out]bytesThe array to store the converted bytes.
sizeThe length of the byte array to store into.
[out]convertLenThe number of bytes written to the array, or NULL.
Test:

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.

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.

Parameters:
trdPointer 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.

Parameters:
trdPointer to the TMR_TagReadData structure to initialize
sizeThe number of bytes pointed to
bufPointer 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

Parameters:
datato the TMR_uint8List structure to initialize
sizeThe nuber of bytes pointed to
bufpointer to the uint8_t storage area

Definition at line 912 of file tm_reader.c.



thingmagic_rfid
Author(s): Brian Bingham
autogenerated on Thu May 16 2019 03:01:26