Output Verification | Qt Safe Renderer 2.0.1 (2024)

The purpose of the output verification is to ensure the integrity of display content for safe items. The integrity check is based on the CRC (Cyclic Redundancy Check) values comparison between offline calculated and the graphics output.

Qt Safe Renderer provides a mechanism for generating the expected CRC and reading the actual output CRC value from the hardware. The actions when a failure is detected are not in the scope of Qt Safe Renderer but are a part of the system logic.

Output verification is supported from Qt Safe Renderer 2.0 onwards.

Using fillColor Property

In a UI, several graphics buffers are blended in a display processor to form final display content. The output CRC values are calculated from that data. Therefore, the background color of safe items cannot be transparent. Instead, you should use a solid background color.

Define the background color for safe items using the fillColor property:

  • SafeImage::fillColor
  • SafePicture::fillColor
  • SafeText::fillColor

Also, the solid background color is used when the output verification is done for a hidden safe item. When a safe item is hidden, its icon area in the UI is cleared with a solid color defined in the fillColor property. The output verification for a hidden safe item verifies that the clearing works as expected.

Note: If the background fill color is almost solid, it can make the safety-critical element pass through the contrast check. It is still possible that the CRC output verification fails as the non-safe background can be seen through a partially transparent element, which affects the CRC calculation.

Using of OutputVerifier Class

The output verifier is enabled by creating an instance of the SafeRenderer::OutputVerifier class. The reference is passed to the SafeRenderer::SafeWindow and SafeRenderer::EventHandler as follows:

static OutputVerifier outputVerifier;static QSafeLayoutResourceReader layout("/layoutData/MainForm/MainForm.ui.srl");SafeWindow telltaleWindow(layout.size(), QSafePoint(0U, 0U), outputVerifier);static SafeRenderer::StateManager stateManager(telltaleWindow, layout, background);EventHandler msgHandler(stateManager, telltaleWindow, outputVerifier);

SafeWindow implementation reads the output CRC value after rendering for the changed items. The result values are stored in the SafeRenderer::OutputVerificationQueue.

The results can be read from the safe renderer process using the SafeRenderer::QSafeEventOutputVerificationStatusRequest event. The output CRC values are packed to the SafeRenderer::QSafeEventOutputVerificationStatusReply event.

The Golden CRC Values

Qt Safe Layout Tool calculates the Golden CRC values for each QML item for the visible and hidden state. The values are stored in the layout file, and they can be read using SafeRenderer::QSafeLayout class.

libcalccrc Library

The golden CRC is calculated using the libcalccrc library. The algorithm is hardware-specific, and Qt Safe Renderer 2.0 provides the implementation for the Qualcomm Snapdragon hardware.

If the libcalccrc library is not found under <QSR installation dir>/Src/QtSafeRenderer-<version>/lib or under the Qt installation folder, a stub version of the library is used. You should use it only with non-Snapdragon hardwares.

Golden CRC Example

The following code snippet can be used in the external process to read the golden CRC values for comparison.

struct ExpectedCRCValues { quint32 drawCRC; quint32 clearCRC;};bool getExpectedCRC(const char*const filenameArg, const quint32 idArg, ExpectedCRCValues &crcValues){ bool found = false; crcValues = {0U, 0U}; //Initialize the resource const QSafeResource res; size_t sizeOfData = 0U; //Get the resource structure for the layout file const quchar *const data = res.data(filenameArg, sizeOfData); const QSafeByteArray layoutData(data, sizeOfData); //Validate the layout data file const quint32 itemCount = QSafeLayout::validateLayout(layoutData); size_t offsetInWords = Constraints::LAYOUTDATA_HEADER_SIZE; const quint32 layoutDataSize = QSafeLayout::layoutDataSize(QSafeLayout::layoutVersion(layoutData)); if (data) { //Go through the layoutdata file for (quint32 i=0U; i<itemCount; i++) { const quint32 itemIDOffset = offsetInWords + QSafeLayout::ItemIDOffset; const quint32 id = layoutData.readUInt32ValueConst(itemIDOffset); //If item is found get the CRC values. if (id == idArg) { const quint32 drawCRCOffset = offsetInWords + QSafeLayout::OutputCRCDrawOffset; const quint32 clearCRCOffset = offsetInWords + QSafeLayout::OutputCRCClearOffset; crcValues.drawCRC = layoutData.readUInt32ValueConst(drawCRCOffset); crcValues.clearCRC = layoutData.readUInt32ValueConst(clearCRCOffset); found = true; break; } offsetInWords += layoutDataSize; } } return found;}

Updating Output CRC Values

The output CRC value is read after every rendering operation for the dirty region. It is also possible to read the CRC value for an individual item manually. The CRC value of the single item can be updated using the SafeRenderer::QSafeEventOutputVerificationVerifyItem event.

Reading Output CRC Values

The output CRC values are stored in the SafeRenderer::OutputVerificationQueue class. The values from the queue can be read using the SafeRenderer::QSafeEventOutputVerificationStatusRequest event. The SafeRenderer::QSafeEventOutputVerificationStatusReply event contains the list of the ID and CRC pairs.

Monitoring Output Verification

You can monitor the results of output verification from an external process. The Monitor example demonstrates how you can verify the rendering output of the Indicators example from the external Monitor process.

Limitations

Verifying the dynamic text output is not supported.

Supported Hardware

The functionality is supported with the following reference hardware configurations:

Output Verification API

The following classes and events provide API for output verification and monitoring:

  • SafeRenderer::OutputVerifier class
  • SafeRenderer::OutputVerificationQueue class
  • SafeRenderer::QSafeEventOutputVerificationStatusReply event
  • SafeRenderer::QSafeEventOutputVerificationStatusRequest event
  • SafeRenderer::QSafeEventOutputVerificationVerifyItem event
Output Verification | Qt Safe Renderer 2.0.1 (2024)
Top Articles
Best Canadian Dividend ETFs for 2022
10 Best Dividend ETFs in Canada for March 2024
Splunk Stats Count By Hour
What Are the Best Cal State Schools? | BestColleges
Amtrust Bank Cd Rates
P2P4U Net Soccer
Music Archives | Hotel Grand Bach - Hotel GrandBach
Danielle Longet
Everything You Need to Know About Holly by Stephen King
Blog:Vyond-styled rants -- List of nicknames (blog edition) (TouhouWonder version)
Lonadine
Moparts Com Forum
Colts Snap Counts
6813472639
Hilo Hi Craigslist
Mani Pedi Walk Ins Near Me
Lowe's Garden Fence Roll
Nhl Tankathon Mock Draft
Airrack hiring Associate Producer in Los Angeles, CA | LinkedIn
Veracross Login Bishop Lynch
Keci News
Imouto Wa Gal Kawaii - Episode 2
683 Job Calls
Keyn Car Shows
Gen 50 Kjv
Ts Modesto
Marlene2295
Craigslistodessa
Franklin Villafuerte Osorio
3473372961
Kids and Adult Dinosaur Costume
Current Time In Maryland
Storelink Afs
Siskiyou Co Craigslist
Joplin Pets Craigslist
Makemkv Key April 2023
Diana Lolalytics
Geology - Grand Canyon National Park (U.S. National Park Service)
Captain Billy's Whiz Bang, Vol 1, No. 11, August, 1920&#10;America's Magazine of Wit, Humor and Filosophy
Timberwolves Point Guard History
Nina Flowers
Pulitzer And Tony Winning Play About A Mathematical Genius Crossword
Arnesons Webcam
Uc Davis Tech Management Minor
Collision Masters Fairbanks
Das schönste Comeback des Jahres: Warum die Vengaboys nie wieder gehen dürfen
Ajpw Sugar Glider Worth
Causeway Gomovies
Hampton Inn Corbin Ky Bed Bugs
ESPN's New Standalone Streaming Service Will Be Available Through Disney+ In 2025
BYU Football: Instant Observations From Blowout Win At Wyoming
Latest Posts
Article information

Author: Virgilio Hermann JD

Last Updated:

Views: 5736

Rating: 4 / 5 (41 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Virgilio Hermann JD

Birthday: 1997-12-21

Address: 6946 Schoen Cove, Sipesshire, MO 55944

Phone: +3763365785260

Job: Accounting Engineer

Hobby: Web surfing, Rafting, Dowsing, Stand-up comedy, Ghost hunting, Swimming, Amateur radio

Introduction: My name is Virgilio Hermann JD, I am a fine, gifted, beautiful, encouraging, kind, talented, zealous person who loves writing and wants to share my knowledge and understanding with you.