SensorRF
−
GEVK
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:
•
QWT Library:
•
•
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.