Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
QSR 2.0 RC1, QSR 2.0
-
None
Description
The C-structure does not have the field for root element transitions.
However, it does store the transition name to the target element.
Consider the indicators example which contains gear change animation:
SafeImage { id: park objectName: "park" x: 216 y: 318 width: 40 height: 50 source: "parking.png" fillColor: "#000000" } SafeImage { id: neutral objectName: "neutral" x: 360 y: 318 width: 40 height: 50 source: "neutral.png" fillColor: "#000000" } SafeImage { id: reverse objectName: "reverse" x: 286 y: 248 width: 40 height: 50 source: "reverse.png" fillColor: "#000000" } SafeImage { id: drive objectName: "drive" x: 286 y: 388 width: 40 height: 50 source: "drive.png" fillColor: "#000000" } states: [ State { name: "parkB" PropertyChanges { target: park x: 276 y: 313 width: 60 height: 60 fillColor: "#000000" } }, State { name: "neutralB" PropertyChanges { target: neutral x: 276 y: 313 width: 60 height: 60 fillColor: "#000000" } }, State { name: "reverseB" PropertyChanges { target: reverse x: 276 y: 313 width: 60 height: 60 fillColor: "#000000" } }, State { name: "driveB" PropertyChanges { target: drive x: 276 y: 313 width: 60 height: 60 fillColor: "#000000" } } ] transitions: [ Transition { from: "*" to: "*" NumberAnimation { properties: "x,y,width,height" duration: 500 easing.type: Easing.InOutQuad } } ]
The "drive" item's data is stored as follows, and there are similar structures for the other gear items.
<item> <id>7049413</id> <---- drive <state> <id>0</id> <variant>MainForm</variant> <assetid>25897570</assetid> <-- drive_40x50_000000 <visible>true</visible> </state> <state> <id>7768306</id> <-- state parkB <variant>MainForm</variant> <assetid>25897570</assetid> <-- drive_40x50_000000 <visible>true</visible> </state> <state> <id>112790674</id> <-- state driveB <variant>MainForm</variant> <assetid>59288162</assetid> <-- drive_60x60_000000.srb <visible>true</visible> </state> <state> <id>214665858</id> <-- state neutralB <variant>MainForm</variant> <assetid>25897570</assetid> <-- drive_40x50_000000 <visible>true</visible> </state> <state> <id>214734482</id> <-- state reverseB <variant>MainForm</variant> <assetid>25897570</assetid> <-- drive_40x50_000000 <visible>true</visible> </state> </item>
In the controller code we are changing the root element state as follow:
static const ItemState itemStates[] = {
,
...
That causes we are missing the information that the 'drive' icon is changed when the root element state changes.
There are three solutions
1) Add the information to the controller.c state structure. That means that the safe app developer adds that information manually.
2) Add the mapping structure to the generated data.
3) Use the state property in the eventOutputVerificationStatusReply and fill the state information in the safe renderer process.
The workaround is to use the first option in the monitor application or not use the root element state changes.
Attachments
For Gerrit Dashboard: QSR-1753 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
418331,3 | Fix the monitoring of root state changes | 2.0 | tqtc-boot2qt/qtsaferenderer | Status: MERGED | +2 | 0 |
418346,2 | Fix the monitoring of root state changes | 6.2 | tqtc-boot2qt/qtsaferenderer | Status: MERGED | +2 | 0 |