Download Print this page

ON Semiconductor SensorRF-GEVK User Manual page 2

Advertisement

SensorRF−GEVK Demo Software Architecture
The SensorRF−GEVK Demo application uses the
Model-View-Controller (MVC) design pattern. There are
two views, the Graphical User Interface (GUI) view and the
Remote User Interface (RUI) view. These two views
translate user requests for setting the AMS Radon Reader
settings and controlling its operations. In response to screen
selections or commands received through one of the remote
interfaces (i.e. UART, TCP, CAN, I
Controller carries out those requests by utilizing the
operations available from the Model. The Model in turn
maintains the state of the Reader which is its settings and
results of reads and controls the Reader. The Model makes
GUI
Data Requests
When the user requests to start the Temperature or
Moisture demonstrations available on the application,
which use the Reader to perform continuous reads and is an
intensive operation, the application spawns a Chart thread to
offload that operation from the GUI thread. This allows the
GUI thread to be available to handle user selections on the
screen so that the screen does not become unresponsive.
When one of the remote interfaces is started on the
GUI
SensorRF−GEVK
2
C, or SPI), the
User Settings/Control
Requests
Signals
Figure 2. Demo Application Software Architecture
Chart Thread
Figure 3. Demo Application Worker Threads
www.onsemi.com
use of the Reader API, which makes available a set of
commands to set the Reader's settings and read tags among
other operations. The Model signals the GUI when the
settings of the Reader have been changed or when there are
results of reads available. The GUI subsequently requests
that data from the Model to display it to the user. The RUI
signals the GUI when it wants to display the commands it has
received through one of the remote interfaces and the
responses 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.
Signal
User Settings/Control
Requests
Controller
Operation Requests
Model
Operation Requests
AMS Radon
Reader API
application, the interface selected is continuously monitored
for commands and once a command is received, that
command is processed and a response generated and sent
back. This is an intensive operation as well. Therefore, the
application spawns a RUI thread to offload this operation
from the GUI thread to again prevent the screen from
becoming unresponsive. Please see Figure 3 for a depiction
of these threads.
Controller
Model
AMS Radon
Reader API
2
RUI
Data Requests
RUI
RUI Thread

Advertisement

loading