Defines | Functions
read.c File Reference
#include <tm_reader.h>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <inttypes.h>
Include dependency graph for read.c:

Go to the source code of this file.

Defines

#define numberof(x)   (sizeof((x))/sizeof((x)[0]))
#define PRINT_TAG_METADATA   0
#define READPOWER_NULL   (-12345)
#define usage()
#define USE_TRANSPORT_LISTENER   0

Functions

void checkerr (TMR_Reader *rp, TMR_Status ret, int exitval, const char *msg)
void errx (int exitval, const char *fmt,...)
int main (int argc, char *argv[])
void parseAntennaList (uint8_t *antenna, uint8_t *antennaCount, char *args)
void serialPrinter (bool tx, uint32_t dataLen, const uint8_t data[], uint32_t timeout, void *cookie)
void stringPrinter (bool tx, uint32_t dataLen, const uint8_t data[], uint32_t timeout, void *cookie)

Detailed Description

Sample program that reads tags for a fixed period of time (500ms) and prints the tags found.

Definition in file read.c.


Define Documentation

#define numberof (   x)    (sizeof((x))/sizeof((x)[0]))

Definition at line 25 of file read.c.

#define PRINT_TAG_METADATA   0

Definition at line 24 of file read.c.

#define READPOWER_NULL   (-12345)
#define usage ( )
Value:
{errx(1, "read readerURL [--ant antenna_list] [--pow read_power]\n"\
                         "Please provide reader URL, such as:\n"\
                         "tmr:///com4 or tmr:///com4 --ant 1,2 --pow 2300\n"\
                         "tmr://my-reader.example.com or tmr://my-reader.example.com --ant 1,2 --pow 2300\n"\
                         );}

Definition at line 27 of file read.c.

#define USE_TRANSPORT_LISTENER   0

Definition at line 22 of file read.c.


Function Documentation

void checkerr ( TMR_Reader rp,
TMR_Status  ret,
int  exitval,
const char *  msg 
)

Definition at line 43 of file read.c.

void errx ( int  exitval,
const char *  fmt,
  ... 
)

Definition at line 33 of file read.c.

int main ( int  argc,
char *  argv[] 
)

for antenna configuration we need two parameters 1. antennaCount : specifies the no of antennas should be included in the read plan, out of the provided antenna list. 2. antennaList : specifies a list of antennas for the read plan.

Definition at line 113 of file read.c.

void parseAntennaList ( uint8_t *  antenna,
uint8_t *  antennaCount,
char *  args 
)

Definition at line 77 of file read.c.

void serialPrinter ( bool  tx,
uint32_t  dataLen,
const uint8_t  data[],
uint32_t  timeout,
void *  cookie 
)

Definition at line 51 of file read.c.

void stringPrinter ( bool  tx,
uint32_t  dataLen,
const uint8_t  data[],
uint32_t  timeout,
void *  cookie 
)

Definition at line 69 of file read.c.



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