background image

SensorRF

GEVK

www.onsemi.com

7

AMS Radon Reader API

The AMS Radon Reader API module is depicted in

Figure 9. The module is defined in the 

ams_radon_reader

files. The file contains the API for the Reader and the data
structure in which raw tag information returned from the
Reader is stored. The API was developed to mirror as much
as possible the commands that the AMS Radon Reader
Firmware makes available. For some commands
encompassing multiple sub-commands, we decided to
create separate, individual commands for those sub-
commands in our API. We customized the inventoryGen2()
firmware command by creating two inventory types to meet
our performance and data needs. One inventory type
(tidAndFast = 0x03) is used for obtaining Temperature
Calibration data and the TID and another (tidAndFast =
0x05) for obtaining Sensor, Temp, and On-Chip RSSI code
from our tags. In the API we created our own command
(getTagData()) to obtain inventory results (or tag data) that
doesn’t have a counterpart in the firmware. This commands
is described below.

short getTagData(vector<TagData> &tags, 
char &inventoryType, char &inventoryResult, 
char &numberOfTagsFound):

This command fills a vector of tag data structures

with the tag data returned by the Reader firmware. 
It also returns the inventory type that generated the
data, the inventory results (whether the data is valid
or not), and the number of tags found. The return
value of the function indicates whether the command
was executed successfully or not.

The TagData data structure or class is in the

ams_radon_reader.h

 file and it’s simple and

self-explanatory and hence, we will not discuss it
here.

Other than the changes described above, the Reader API

follows the firmware command set closely and we will refer
the reader to the AMS Radon Kit’s Firmware documentation
for a description of those commands.

Figure 9. Demo Application AMS Radon Reader API Module

AMS Radon Reader API

ams_radon_reader .h/.cpp

Related Resources

We have discussed mainly the software architecture of the

Demo application and the AMS Radon Reader API. For
a discussion of the other tools available to the developer,
please refer to the following resources:

C++/C:

 

http://www.cplusplus.com/doc/tutorial/

Linux Socket Interface:

http://www.linuxhowtos.org/C_C++/socket.htm

Qt Toolkit:

 

http://doc.qt.io/

QWT Library:

 

http://qwt.sourceforge.net/

GCC:

 https://gcc.gnu.org/

GDB:

 

https://www.gnu.org/software/gdb/

Linux is a registered trademark of Linus Torvalds. Magnus is a registered trademark of RFMicron. All other brand names and product
names appearing in this document are registered trademarks or trademarks of their respective holders.

Summary of Contents for SensorRF-GEVK

Page 1: ...either a UART TCP CAN I2C or SPI interface Figure 1 Photo of Development Platform The Developer s Tool Everything you need to develop a custom application for SensorRF GEVK is included in the software...

Page 2: ...it has sent back The RUI gets commands to search for tags measure tags send back Reader settings and set Reader settings Please see Figure 2 for a depiction of the modules Figure 2 Demo Application So...

Page 3: ...ing its modules in more detail We will focus on the most important operations performed by those modules Graphical User Interface GUI The GUI module is depicted in the figure below The module is defin...

Page 4: ...Sensor On Chip RSSI and Temp code reads Returns 0 always int setTempAutoPower bool setting Sets Temp Auto Power on or off Returns 0 always int setMoistAutoPower bool setting Sets Moisture Auto Power...

Page 5: ...Module RUI rui_view h cpp rui_thread h cpp interfaces h cpp can h cpp tcp_server h cpp i2c h cpp spi h cpp uart h cpp Model The Model module is depicted in Figure 8 The module is defined in the kit_mo...

Page 6: ...ataHexString Writes data to the bankCode 0 Reserved 1 EPC 2 TID 3 User at the address in Hex the dataHexString for the tag with epc Returns 0 if successful int readTags int numInventories QString meas...

Page 7: ...ned by the Reader firmware It also returns the inventory type that generated the data the inventory results whether the data is valid or not and the number of tags found The return value of the functi...

Page 8: ...ems or any FDA Class 3 medical devices or medical devices with a similar or equivalent classification in a foreign jurisdiction or any devices intended for implantation in the human body Should you pu...

Reviews: