# serial_reader_imp.h File Reference

Serial reader internal implementation header. More...

`#include "tm_reader.h"`
`#include "tmr_status.h"`

## Classes

struct | TMR_SR_MultipleStatus
struct | TMR_SR_PortPair
struct | TMR_SR_PortDetect
struct | TMR_SR_AntennaPort
struct | TMR_SR_PortPower
struct | TMR_SR_PortPowerAndSettlingTime
struct | TMR_SR_PowerWithLimits
struct | TMR_SR_Gen2ReaderWriteTimeOut
struct | TMR_SR_ProtocolConfiguration

## Typedefs

typedef struct TMR_SR_MultipleStatus | TMR_SR_MultipleStatus
typedef struct TMR_SR_PortPair | TMR_SR_PortPair
typedef struct TMR_SR_PortDetect | TMR_SR_PortDetect
typedef enum TMR_SR_ReaderStatsOption | TMR_SR_ReaderStatsOption
typedef enum TMR_SR_ReaderStatisticsFlag | TMR_SR_ReaderStatisticsFlag
typedef struct TMR_SR_AntennaPort | TMR_SR_AntennaPort
typedef struct TMR_SR_PortPower | TMR_SR_PortPower
typedef struct TMR_SR_PortPowerAndSettlingTime | TMR_SR_PortPowerAndSettlingTime
typedef struct TMR_SR_PowerWithLimits | TMR_SR_PowerWithLimits
typedef enum TMR_SR_Configuration | TMR_SR_Configuration
typedef enum TMR_SR_RegionConfiguration | TMR_SR_RegionConfiguration
typedef enum TMR_SR_Gen2Configuration | TMR_SR_Gen2Configuration
typedef struct TMR_SR_Gen2ReaderWriteTimeOut | TMR_SR_Gen2ReaderWriteTimeOut
typedef enum TMR_SR_Iso180006bConfiguration | TMR_SR_Iso180006bConfiguration
typedef enum TMR_SR_iPxConfiguration | TMR_SR_iPxConfiguration
typedef struct TMR_SR_ProtocolConfiguration | TMR_SR_ProtocolConfiguration
typedef enum TMR_SR_SearchFlag | TMR_SR_SearchFlag

## Enumerations

enum | TMR_SR_ReaderStatsOption
enum | TMR_SR_ReaderStatisticsFlag

enum

TMR_SR_Configuration {
TMR_SR_CONFIGURATION_UNIQUE_BY_ANTENNA = 0, TMR_SR_CONFIGURATION_TRANSMIT_POWER_SAVE = 1, TMR_SR_CONFIGURATION_EXTENDED_EPC = 2, TMR_SR_CONFIGURATION_ANTENNA_CONTROL_GPIO = 3,
TMR_SR_CONFIGURATION_SAFETY_ANTENNA_CHECK = 4, TMR_SR_CONFIGURATION_SAFETY_TEMPERATURE_CHECK = 5, TMR_SR_CONFIGURATION_RECORD_HIGHEST_RSSI = 6, TMR_SR_CONFIGURATION_UNIQUE_BY_DATA = 8,
TMR_SR_CONFIGURATION_RSSI_IN_DBM = 9, TMR_SR_CONFIGURATION_SELF_JAMMER_CANCELLATION = 0x0A, TMR_SR_CONFIGURATION_UNIQUE_BY_PROTOCOL = 0x0B, TMR_SR_CONFIGURATION_ENABLE_READ_FILTER = 0x0C,
TMR_SR_CONFIGURATION_READ_FILTER_TIMEOUT = 0x0D, TMR_SR_CONFIGURATION_CURRENT_MSG_TRANSPORT = 0x0E, TMR_SR_CONFIGURATION_SEND_CRC = 0x1B, TMR_SR_CONFIGURATION_PRODUCT_GROUP_ID = 0x12,
TMR_SR_CONFIGURATION_PRODUCT_ID = 0x13, TMR_SR_CONFIGURATION_TRIGGER_READ_GPIO = 0x1E
}

enum | TMR_SR_RegionConfiguration
enum | TMR_SR_Gen2Configuration
enum | TMR_SR_Iso180006bConfiguration
enum | TMR_SR_iPxConfiguration
enum | TMR_SR_SearchFlag

## Functions

void | TMR_hexDottedQuad (const uint8_t bytes[4], char buf[12])
TMR_Status | TMR_hexDottedQuadToUint32 (const char bytes[12], uint32_t *result)

## Detailed Description

Serial reader internal implementation header.

Author:
  Nathan Williams

Date:
  10/28/2009

## Typedef Documentation

typedef struct TMR_SR_AntennaPort TMR_SR_AntennaPort

Antenna Configuration. Returned by TMR_SR_cmdGetAntennaConfiguration.

typedef enum TMR_SR_Configuration TMR_SR_Configuration

This type enumerates the serial reader configuration parameters for TMR_SR_cmdSetReaderConfiguration and TMR_SR_cmdGetReaderConfiguration. Each value is associated with a particular data type for the setting.

typedef enum TMR_SR_Gen2Configuration TMR_SR_Gen2Configuration

This is the enumeration of Gen2-specific configuration values. Each enumerated value is associated with a particular data type for the setting value.

typedef struct TMR_SR_Gen2ReaderWriteTimeOut TMR_SR_Gen2ReaderWriteTimeOut

This struture is retuned from TMR_SR_Gen2ReaderResponseTimeOut

typedef enum TMR_SR_iPxConfiguration TMR_SR_iPxConfiguration

This is the enumeration of iPx-specific configuration values. Each enumerated value is associated with a particular data type for the setting value.

typedef enum TMR_SR_Iso180006bConfiguration TMR_SR_Iso180006bConfiguration

This is the enumeration of ISO 18000-6B-specific configuration values. Each enumerated value is associated with a particular data type for the setting value.

typedef struct TMR_SR_MultipleStatus TMR_SR_MultipleStatus

This structure is returned from read tag multiple embedded commands.

typedef struct TMR_SR_PortDetect TMR_SR_PortDetect

This structure is returned from TMR_SR_cmdAntennaDetect.

typedef struct TMR_SR_PortPair TMR_SR_PortPair

This structure is returned from TMR_SR_cmdGetTxRxPorts and TMR_SR_cmdGetAntennaSearchList, and passed as a parameter to TMR_SR_cmdSetAntennaSearchList.

typedef struct TMR_SR_PortPower TMR_SR_PortPower

Per-port power levels. Used by TMR_SR_cmd{Get,Set}AntennaPortPowers

typedef struct TMR_SR_PortPowerAndSettlingTime TMR_SR_PortPowerAndSettlingTime

Per-port power levels and settling times. Used by TMR_SR_cmd{Get,Set}AntennaPortPowersAndSettlingTime.

typedef struct TMR_SR_PowerWithLimits TMR_SR_PowerWithLimits

The current power level and the bounds of the power level range.

typedef struct TMR_SR_ProtocolConfiguration TMR_SR_ProtocolConfiguration

This type selects the protocol configuration option for TMR_SR_cmdSetProtocolConfiguration() and TMR_SR_cmdGetProtocolConfiguration(). Each value is associated with a particular data type for the setting.

typedef enum TMR_SR_ReaderStatisticsFlag TMR_SR_ReaderStatisticsFlag

Reader Statistics Flag Enum

typedef enum TMR_SR_ReaderStatsOption TMR_SR_ReaderStatsOption

Reader statistics options enum

typedef enum TMR_SR_RegionConfiguration TMR_SR_RegionConfiguration

This type enumerates the region configuration parameters for the TMR_SR_cmdGetRegionConfiguration() command.

typedef enum TMR_SR_SearchFlag TMR_SR_SearchFlag

Defines the values for search flags for TMR_SR_cmdReadTagMultiple.

## Enumeration Type Documentation

enum TMR_SR_Configuration

This type enumerates the serial reader configuration parameters for TMR_SR_cmdSetReaderConfiguration and TMR_SR_cmdGetReaderConfiguration. Each value is associated with a particular data type for the setting.

Enumerator:

  TMR_SR_CONFIGURATION_UNIQUE_BY_ANTENNA | Key tag buffer records off of antenna ID as well as EPC; i.e., keep separate records for the same EPC read on different antennas 0: Disable -- Different antenna overwrites previous record. 1: Enable -- Different Antenna creates a new record.
  TMR_SR_CONFIGURATION_TRANSMIT_POWER_SAVE | Run transmitter in lower-performance, power-saving mode. 0: Disable -- Higher transmitter bias for improved reader sensitivity 1: Enable -- Lower transmitter bias sacrifices sensitivity for power consumption
  TMR_SR_CONFIGURATION_EXTENDED_EPC | Support 496-bit EPCs (vs normal max 96 bits) 0: Disable (max max EPC length = 96) 1: Enable 496-bit EPCs
  TMR_SR_CONFIGURATION_ANTENNA_CONTROL_GPIO | Configure GPOs to drive antenna switch. 0: No switch 1: Switch on GPO1 2: Switch on GPO2 3: Switch on GPO1,GPO2
  TMR_SR_CONFIGURATION_SAFETY_ANTENNA_CHECK | Refuse to transmit if antenna is not detected
  TMR_SR_CONFIGURATION_SAFETY_TEMPERATURE_CHECK | Refuse to transmit if overtemperature condition detected
  TMR_SR_CONFIGURATION_RECORD_HIGHEST_RSSI | If tag read duplicates an existing tag buffer record (key is the same), update the record's timestamp if incoming read has higher RSSI reading. 0: Keep timestamp of record's first read 1: Keep timestamp of read with highest RSSI
  TMR_SR_CONFIGURATION_UNIQUE_BY_DATA | Key tag buffer records off tag data as well as EPC; i.e., keep separate records for the same EPC read with different data 0: Disable -- Different data overwrites previous record. 1: Enable -- Different data creates new record.
  TMR_SR_CONFIGURATION_RSSI_IN_DBM | Whether RSSI values are reported in dBm, as opposed to arbitrary uncalibrated units.
  TMR_SR_CONFIGURATION_SELF_JAMMER_CANCELLATION | Self jammer cancellation User can enable/disable through level2 API
  TMR_SR_CONFIGURATION_UNIQUE_BY_PROTOCOL | Key tag buffer records off of protocol as well as EPC; i.e., keep separate records for the same EPC read on different protocols 0: Disable -- Different protocol overwrites previous record. 1: Enable -- Different protocol creates a new record.
  TMR_SR_CONFIGURATION_ENABLE_READ_FILTER | Enable read filtering
  TMR_SR_CONFIGURATION_READ_FILTER_TIMEOUT | Tag buffer entry timeout
  TMR_SR_CONFIGURATION_CURRENT_MSG_TRANSPORT | Transport (bus) type
  TMR_SR_CONFIGURATION_SEND_CRC | Enable the CRC calculation
  TMR_SR_CONFIGURATION_PRODUCT_GROUP_ID | General category of finished reader into which module is integrated; e.g., 0: bare module 1: In-vehicle Reader (e.g., Tool Link, Vega) 2: USB Reader
  TMR_SR_CONFIGURATION_PRODUCT_ID | Product ID (Group ID 0x0002 ) information 0x0001 :M5e-C USB reader 0x0002 :Backback NA antenna 0x0003 :Backback EU antenna
  TMR_SR_CONFIGURATION_TRIGGER_READ_GPIO | Configure GPIs to drive trigger read. 0: No switch 1: Switch on GPI1 2: Switch on GPI2 3: Switch on GPI3 (if supported) 4: Switch on GOI4 (if supported)

enum TMR_SR_Gen2Configuration

This is the enumeration of Gen2-specific configuration values. Each enumerated value is associated with a particular data type for the setting value.

enum TMR_SR_iPxConfiguration

This is the enumeration of iPx-specific configuration values. Each enumerated value is associated with a particular data type for the setting value.

enum TMR_SR_Iso180006bConfiguration

This is the enumeration of ISO 18000-6B-specific configuration values. Each enumerated value is associated with a particular data type for the setting value.

enum TMR_SR_ReaderStatisticsFlag

Reader Statistics Flag Enum

enum TMR_SR_ReaderStatsOption

Reader statistics options enum

enum TMR_SR_RegionConfiguration

This type enumerates the region configuration parameters for the TMR_SR_cmdGetRegionConfiguration() command.

enum TMR_SR_SearchFlag

Defines the values for search flags for TMR_SR_cmdReadTagMultiple.

## Function Documentation

void TMR_hexDottedQuad | ( | const uint8_t | bytes[4],
|  | char | buf[12] |
| ) |  |  |

Convert a four-byte array into a null-terminated string with the format 02X.02X.02X.02X (AA.BB.CC.DD).

Parameters:

  | bytes | The array of four bytes to convert
  | buf | The string to write to. Must be at least 12 bytes.

TMR_Status TMR_hexDottedQuadToUint32 | ( | const char | bytes[12],
|  | uint32_t * | result |
| ) |  |  |

Convert a 12-byte null-terminated string hexDottedQuad into a uint32_t

Parameters:

  | bytes | The array of twelve bytes to convert
  | result | The resulting uint32_t

Returns:
  uint32_t represented but the 12 bytes