Uploaded image for project: 'Qt Safe Renderer'
  1. Qt Safe Renderer
  2. QSR-1753

Monitoring of root state changes fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • QSR 2.0 RC2
    • QSR 2.0 RC1, QSR 2.0
    • Safety Monitor
    • 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[] = {

      {"root", "driveB"}

      ,
      ...

      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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            teemu.holappa Teemu Holappa
            teemu.holappa Teemu Holappa
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes