C
Testing Safety-Critical Rendering and Events
You can use Telltales, Qt Cluster, and Event Sender examples to simulate the real-world use case where the Qt application contains both safety-critical content (Telltales) and non-safe content (Qt Cluster) on UI.
Via Event Sender UI, you can send messages into two ports, that is, for Qt Cluster and Telltales. You can switch telltales on and off and change the UI layout. When you change the layout, also the telltales are rendered in different positions:
Running Qt Cluster, Telltales, and Event Sender
Launch and run the examples in the following order:
- Build and run Qt Cluster in Qt Creator. See the detailed build instructions on Qt Cluster.
- Build and run Telltales in Qt Creator. See the detailed build instructions on Telltales.
- Build and run Event Sender in Qt Creator. See the detailed build instructions on Event Sender.
- With target device, build also Message Proxy and deploy it to your device. Message Proxy listens to messages via network socket on the device.
- In Event Sender, you need to set the IP and port as described in Setting IP and Port. For more information, see Connecting on Host and Target.
If you are testing on the host environment, place the application windows on top of each other so that you can send messages via Event Sender.
If you are testing with your target device (QNX, INTEGRITY, Embedded Linux), deploy Qt Cluster, Telltales and Message Proxy to the device and run Event Sender on your host.
Controlling Qt Cluster and Telltales via Event Sender
You can control Qt Cluster and Telltales UI via Event Sender as follows:
- When you select telltales icons on Event Sender, the selected telltales is switched on and off on Telltales.
- Change Layout changes the layout on Qt Cluster. When the layout changes, also the position of telltales changes.
- Kill Switch kills the Qt Cluster example but does not affect Telltales. This demonstrates an unexpected system failure. Even if there was a system failure, Qt Safe Renderer continues rendering the telltales. Demo sends random events to Telltales and Qt Cluster.
Connecting on Host and Target
The following figure describes how Event Sender connects Telltales and Qt Cluster on the host environment:
On host, Telltales listens to a port 32112 which Event Sender uses by default. Qt Cluster listens to a port 32124. You need set it via the Event Sender UI as described in Setting IP and Port.
The following figure describes how Event Sender connects Telltales and Qt Cluster on a target devie:
On the target device, Qt Cluster listens to a port 32124. You need to set it via Event Sender UI. For Telltales, events are sent via Message Proxy that listens to a port 32123. That is set via an environment variable. See Setting IP and Port.
Setting IP and Port
In Event Sender UI, set the IP and Port for Qt Cluster as follows:
- When you test on the host environment, select Connect.
- When you test with your target device, set your target device IP to IP. Port is 32124.
Set the IP and port for Telltales via environment variables as follows:
- When you test on the host environment, Telltales listens to port 32112 by default.
- When you test with your target device, define the environment variables
QT_SAFERENDER_HOST
andQT_SAFERENDER_PORT
. The port number is 32123. For example, select Project > Run > Environment > Add to add new environment variables in Qt Creator.
Available under certain Qt licenses.
Find out more.