Download Print this page

ON Semiconductor SensorRF-GEVK User Manual page 4

Advertisement

Controller
The Controller module is depicted in Figure 6. The
module is defined in the kit_controller files and no other file
fall within this module. The module does perform some of
the most important operations of the system which are as
follows:
short launchRUI(QString interfaceType): Starts
the RUI listening on interfaceType, which can be
2
UART, TCP, CAN, I
C or SPI. Returns 0 if successful.
void stopRUI(): Stops the RUI. SensorRF−GEVK
stops listening for commands.
RUIThread* getRUIThreadPointer(): Returns the
pointer to the RUI Thread. The pointer is used to
connect the thread to the console on the GUI so that it
can display status messages.
void turnReaderOn(): Applies power to the AMS
Radon Reader, turning it on.
void turnReaderOff(): Removes power from the AMS
Radon Reader, turning it off.
double measureTempCodeForCalibration(): Returns
the current Temp Code for the tag currently selected.
Used to calibrate tag.
void searchForTempTags(): Performs a search for
Temp tags in the field using the Reader. Results are put
in the Model's Temp Tags list.
void searchForMoistureTags(): Performs a search for
Moisture tags in the field using the Reader. Results are
put in the Model's Moisture Tags list.
void measureTempTags(): Performs a read of the
tags's On-Chip RSSI codes and Temp codes. Results
are put in the Model's Temp Tag list.
void measureMoistureTags(): Performs a read of the
tags's On-Chip RSSI codes and Sensor codes. Results
are put in the Model's Moisture Tag list.
int clearTempTags(): Clears the Temp Tags list and
measurement time history along with the Temperature
Demo chart. Returns 0 always.
int clearMoistTags(): Clears the Moisture Tags list and
measurement time history along with the Moisture
Demo chart. Returns 0 always.
int setMoistLinearFit(bool setting): Enables the use
of the Linear Fit algorithm to produce measurements
from raw Sensor, On-Chip RSSI, and Temp code reads.
Returns 0 always.
SensorRF−GEVK
Controller
kit_controller .h/.cpp
Figure 6. Demo Application Controller Module
www.onsemi.com
4
int setTempAutoPower(bool setting): Sets Temp Auto
Power on or off. Returns 0 always.
int setMoistAutoPower(bool setting): Sets Moisture
Auto Power on or off. Returns 0 always.
int setTempMaxPowerLevel(int dBm): Sets Temp
Max Power level. Returns 0 always. dBm can be 18–30.
int setMoistMaxPowerLevel(int dBm): Sets Moisture
Max Power level. Returns 0 always. dBm can be 18–30.
int setTempSamplesPerMeasurement(QString s):
Sets the minimum number of samples used to produce
a measurement for On-Chip RSSI and Temp code.
Returns 0 always. s can be 2, 5, 10, 20.
int setMoistSamplesPerMeasurement(QString s):
Sets the minimum number of samples used to produce
a measurement for On-Chip RSSI and Moisture code.
Returns 0 always. s can be 2, 5, 10, 20.
int setTempOnChipRssiTargetMin(int t): Sets the
minimum value for the On-Chip RSSI code for a Temp
code read to be valid. Returns 0 always.
t can be between 0 and 31. Min < Max.
int setTempOnChipRssiTargetMax(int t): Sets the
maximum value for the On-Chip RSSI code for a Temp
code read to be valid. Returns 0 always.
t can be between 0 and 31. Max > Min.
int setMoistOnChipRssiTargetMin(int t): Sets the
minimum value for the On-Chip RSSI code for
a Sensor code read to be valid. Returns 0 always.
t can be between 0 and 31. Min < Max.
int setMoistOnChipRssiTargetMax(int t): Sets the
maximum value for the On-Chip RSSI code for
a Sensor code read to be valid. Returns 0 always.
t can be between 0 and 31. Max > Min.
int setMoistThreshold(int threshold): Sets the
threshold value for the Sensor code read to indicate that
the tag is detecting moisture. Returns 0 always.
int setMoistAboveThreshold(bool above): Sets if the
Sensor code read has to go above or below the Moisture
Threshold to indicate that the tag has detected moisture.
Returns 0 always.
int setBandRegion(FreqBandEnum band): Sets the
frequency band and tunes the Reader for that band.
Band can be FCC, ETSI, PRC, JAPAN, FCC_center,
and ETSI_center. Returns 0 if successful.

Advertisement

loading