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
How To Sell Crypto on Crypto.com
Is GCash International?
Pollen Count Centreville Va
What to Do For Dog Upset Stomach
South Park Season 26 Kisscartoon
Health Benefits of Guava
Tx Rrc Drilling Permit Query
His Lost Lycan Luna Chapter 5
How Far Is Chattanooga From Here
Embassy Suites Wisconsin Dells
Craigslist Greenville Craigslist
Jasmine Put A Ring On It Age
The Binding of Isaac
Hca Florida Middleburg Emergency Reviews
Dexter Gomovies
Dc Gas Login
Chic Lash Boutique Highland Village
Colorado mayor, police respond to Trump's claims that Venezuelan gang is 'taking over'
065106619
WEB.DE Apps zum mailen auf dem SmartPhone, für Ihren Browser und Computer.
Kayky Fifa 22 Potential
Curver wasmanden kopen? | Lage prijs
1989 Chevy Caprice For Sale Craigslist
Knock At The Cabin Showtimes Near Alamo Drafthouse Raleigh
Cardaras Funeral Homes
Free T33N Leaks
Hrconnect Kp Login
4.231 Rounded To The Nearest Hundred
Craigslist Efficiency For Rent Hialeah
His Only Son Showtimes Near Marquee Cinemas - Wakefield 12
Himekishi Ga Classmate Raw
FREE Houses! All You Have to Do Is Move Them. - CIRCA Old Houses
Tmj4 Weather Milwaukee
Salons Open Near Me Today
Solve 100000div3= | Microsoft Math Solver
Pitco Foods San Leandro
Why Gas Prices Are So High (Published 2022)
Heelyqutii
Thor Majestic 23A Floor Plan
Courses In Touch
6576771660
Why Are The French So Google Feud Answers
Costco The Dalles Or
Sinai Sdn 2023
5103 Liberty Ave, North Bergen, NJ 07047 - MLS 240018284 - Coldwell Banker
Bismarck Mandan Mugshots
Pelican Denville Nj
Campaign Blacksmith Bench
Optimal Perks Rs3
7 Sites to Identify the Owner of a Phone Number
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.