On this page

C

SafeRenderer Namespace

Header: #include <SafeRenderer>
Since: QtSafeRenderer 1.0

Classes

class AbstractFrameBuffer
class AbstractWindow
(since QtSafeRenderer 1.2) class AnimationData
(since QtSafeRenderer 1.0) struct Constraints
(since QtSafeRenderer 1.2) class EventHandler
(since QtSafeRenderer 2.1) class EventHandlerException
(since QtSafeRenderer 2.1) class EventSenderException
(since QtSafeRenderer 1.1) struct Glyph
(since QtSafeRenderer 1.1) class LayoutData
(since QtSafeRenderer 2.0) class MISRCalculator
(since QtSafeRenderer 2.0) class MISRVerifier
(since QtSafeRenderer 2.1) class NXPCalculator
(since QtSafeRenderer 2.1) class NXPVerifier
(since QtSafeRenderer 2.0) class OutputVerificationQueue
(since QtSafeRenderer 2.0) class OutputVerifier
(since QtSafeRenderer 2.1) class OutputVerifierException
(since QtSafeRenderer 2.0) class OutputVerifierInterface
(since QtSafeRenderer 2.1) class QSafeAnimationException
(since QtSafeRenderer 1.2) class QSafeAnimations
(since QtSafeRenderer 1.1) class QSafeBitmap
(since QtSafeRenderer 1.0) class QSafeBitmapBuffer
(since QtSafeRenderer 2.1) class QSafeBitmapException
(since QtSafeRenderer 1.0) class QSafeBitmapFileReader
(since QtSafeRenderer 1.0) class QSafeBitmapReader
(since QtSafeRenderer 1.0) class QSafeBitmapResource
class QSafeBitmapResourceReader
(since QtSafeRenderer 1.2) class QSafeByteArray
(since QtSafeRenderer 2.1) class QSafeByteArrayException
(since QtSafeRenderer 1.0) class QSafeEvent
(since QtSafeRenderer 1.0) class QSafeEventChangeLayout
(since QtSafeRenderer 1.2) class QSafeEventChangeState
(since QtSafeRenderer 1.0) class QSafeEventConnection
(since QtSafeRenderer 2.1) class QSafeEventException
(since QtSafeRenderer 1.0) class QSafeEventHeartbeat
(since QtSafeRenderer 1.0) class QSafeEventHeartbeatTimeout
(since QtSafeRenderer 2.0) class QSafeEventOutputVerificationStatusReply
(since QtSafeRenderer 2.0) class QSafeEventOutputVerificationStatusRequest
(since QtSafeRenderer 2.0) class QSafeEventOutputVerificationVerifyItem
(since QtSafeRenderer 2.0) class QSafeEventSender
(since QtSafeRenderer 1.1) class QSafeEventSetText
(since QtSafeRenderer 1.0) class QSafeEventSystem
(since QtSafeRenderer 1.0) class QSafeEventVisibility
(since QtSafeRenderer 2.1) class QSafeException
(since QtSafeRenderer 2.2) class QSafeExceptionHandler
(since QtSafeRenderer 1.0) class QSafeFile
(since QtSafeRenderer 2.1) class QSafeFileException
(since QtSafeRenderer 1.2) class QSafeFileInfo
(since QtSafeRenderer 1.1) class QSafeFont
(since QtSafeRenderer 1.1) class QSafeFontCache
(since QtSafeRenderer 2.1) class QSafeFontException
class QSafeFontFileLoader
(since QtSafeRenderer 1.1) class QSafeFontLoader
class QSafeFontResourceLoader
(since QtSafeRenderer 1.0) class QSafeLayout
(since QtSafeRenderer 2.1) class QSafeLayoutException
(since QtSafeRenderer 1.0) class QSafeLayoutFileReader
(since QtSafeRenderer 1.0) class QSafeLayoutResourceReader
(since QtSafeRenderer 1.0) struct QSafePoint
(since QtSafeRenderer 2.0) struct QSafeRect
(since QtSafeRenderer 1.0) class QSafeRenderer
(since QtSafeRenderer 2.1) class QSafeRendererException
(since QtSafeRenderer 2.1) class QSafeResourceException
(since QtSafeRenderer 1.0) struct QSafeSize
(since QtSafeRenderer 2.1) class QSafeStateException
(since QtSafeRenderer 1.2) class QSafeStateFileReader
(since QtSafeRenderer 1.2) class QSafeStateLoader
(since QtSafeRenderer 1.2) class QSafeStateResourceReader
(since QtSafeRenderer 1.2) class QSafeString
(since QtSafeRenderer 2.1) class QSafeStringException
(since QtSafeRenderer 1.1) class QSafeTextLayout
(since QtSafeRenderer 2.1) class QSafeTextLayoutException
(since QtSafeRenderer 2.0) class QSafeTouch
(since QtSafeRenderer 2.1) class QStateManagerException
(since QtSafeRenderer 1.0) class QStringSplitter
(since QtSafeRenderer 1.2) class SafeWindow
(since QtSafeRenderer 1.2) class SafeWindowException
(since QtSafeRenderer 1.0) class StateManager
(since QtSafeRenderer 2.0) class TestVerifier
(since QtSafeRenderer 2.0) class VerifyRegion

Types

enum AnimationType { Unset, XPosition, YPosition, Opacity, Sprite, Color }
enum EventId { EventUndefined, EventSetVisibility, EventSetPosition, EventHeartbeatUpdate, EventHeartbeatTimeout, …, LastEventID }
enum HorizontalAlignment { AlignLeft, AlignRight, AlignHCenter }
enum LayoutType { BitmapLayout, TextLayout, StateDefinition }
enum VerticalAlignment { AlignTop, AlignBottom, AlignVCenter }
qchar
qint8
qint32
qint64
qint
quchar
quint8
quint16
quint32
quint64

Functions

SafeRenderer::quint32 ARGBtoInt(const SafeRenderer::ARGB &color)
(since QtSafeRenderer 1.2) SafeRenderer::quint8 *allocAlignedFromMemoryPool(const SafeRenderer::quint32 sizeArgInBytes)
(since QtSafeRenderer 2.2) void deallocFromMemoryPool(SafeRenderer::quint8 *memoryPtr)
(since QtSafeRenderer 1.0) SafeRenderer::quint32 qsafe_hash(const SafeRenderer::qchar *const dataPtr, const size_t dataLength)
(since QtSafeRenderer 2.0) SafeRenderer::quint32 qsafe_hash_string(const SafeRenderer::qchar *const dataPtr)
(since QtSafeRenderer 1.0) SafeRenderer::quint16 qt_checksum(const SafeRenderer::quchar *const dataPtr, const size_t dataLength)
(since QtSafeRenderer 2.1) SafeRenderer::quint16 qt_checksum_file(const SafeRenderer::qchar *const filePath)
(since QtSafeRenderer 2.2) SafeRenderer::quint16 qt_checksum_partial(const SafeRenderer::quchar *const dataPtr, const size_t dataLength, const SafeRenderer::quint16 currentCrc)
size_t safe_strlen(const qchar[] strArg, const size_t maxLength = Constraints::MAX_LEN_OF_TEXT)
void updateCRC(const quint8[4] colorVal, SafeRenderer::quint32 &crcArg)

Detailed Description

The SafeRenderer namespace contains all the Misra C++ compliant software components for Safe Renderer.

Classes

class AbstractFrameBuffer

The AbstractFrameBuffer class provides an interface for accessing the system's frame buffer. More...

class AbstractWindow

The AbstractWindow class provides an interface for constructing a window with a given size. More...

class AnimationData

The AnimationData struct that holds the animation data. More...

class Constraints

Struct that holds various constraint values for Qt Safe Renderer. More...

class EventHandler

The EventHandler class creates a platform specific event loop for receiving QSafeEvents from the other processes. More...

class EventHandlerException

The EventHandlerException class represents an exception related to event handling. More...

class EventSenderException

The EventSenderException class represents exceptions related to sending events. More...

class Glyph

Struct that holds the glyph data. More...

class LayoutData

The LayoutData class provides functions for setting and getting the layout details. More...

class MISRCalculator

The MISRCalculator class provides functions to calculate the reference CRC value for the region from the framebuffer object. More...

class MISRVerifier

The MISRVerifier class provides the output verifier implementation for the Qualcomm Snapdragon board. More...

class NXPCalculator

The NXPCalculator class calculates the CRC value for the region. More...

class NXPVerifier

The NXPVerifier class provides the output verifier implementation for the NXP iMX8QM board in Linux. More...

class OutputVerificationQueue

The OutputVerificationQueue class provides an API to queue the output verification requests. More...

class OutputVerifier

The OutputVerifier class is the container class for executing the output verification. More...

class OutputVerifierException

The OutputVerifierException class represents an exception related to output verification. More...

class OutputVerifierInterface

The OutputVerifierInterface class provides an API to monitor the graphics output. More...

class QSafeAnimationException

An instance of QSafeAnimationException is thrown in case of an exception. More...

class QSafeAnimations

The QSafeAnimations class holds the animation data. More...

class QSafeBitmap

The QSafeBitmap class holds the bitmap file. More...

class QSafeBitmapBuffer

The QSafeBitmapBuffer class holds the data of a bitmap file. More...

class QSafeBitmapException

The QSafeBitmapException class represents an exception related to bitmaps. More...

class QSafeBitmapFileReader

The QSafeBitmapFileReader class reads the bitmap data from the file. More...

class QSafeBitmapReader

The QSafeBitmapReader abstract class provides interface for reading bitmap data. More...

class QSafeBitmapResource

The QSafeBitmapResource class provides the Qt resource file implementation of QSafeBitmap. More...

class QSafeBitmapResourceReader

The QSafeBitmapResourceReader class provides the Qt resource file implementation of QSafeBitmapReader. More...

class QSafeByteArray

The QSafeBitmapBuffer holds the bytearray. More...

class QSafeByteArrayException

The QSafeException holds the exceptions for bytearray. More...

class QSafeEvent

The QSafeEvent class provides a base class for the Qt Safe Renderer events. More...

class QSafeEventChangeLayout

The QSafeEventChangeLayout class changes the safe renderer layout to another. More...

class QSafeEventChangeState

The QSafeEventChangeState class changes the state of the safe item. More...

class QSafeEventConnection

The QSafeEventConnection class connects the layout item to the system event. More...

class QSafeEventException

The QSafeEventException class represents an exception related to safe events. More...

class QSafeEventHeartbeat

The QSafeEventHeartbeat class represents the keepalive message from the non-safe side to the safe side. More...

class QSafeEventHeartbeatTimeout

The QSafeEventHeartbeatTimeout class indicates that a heartbeat timeout has occurred. More...

class QSafeEventOutputVerificationStatusReply

The QSafeEventOutputVerificationStatusReply class is send as reply to the EventOutputVerificationStatusRequest request. More...

class QSafeEventOutputVerificationStatusRequest

The QSafeEventOutputVerificationStatusRequest class is the request from outside component to request the output verification results. More...

class QSafeEventOutputVerificationVerifyItem

The QSafeEventOutputVerificationVerifyItem class is used to update the output CRC value of the single safe item. More...

class QSafeEventSender

The QSafeEventSender class is used to send safe events to the Safe Renderer process. More...

class QSafeEventSetText

The QSafeEventSetText class changes the text in layout. More...

class QSafeEventSystem

The QSafeEventSystem class sends the system event state change. More...

class QSafeEventVisibility

The QSafeEventVisibility class changes the item visibility between visible and hidden. More...

class QSafeException

The QSafeException class is the base class for saferenderer's exceptions. More...

class QSafeExceptionHandler

The QSafeExceptionHandler class is a proxy class to deliver or throw exceptions. More...

class QSafeFile

The QSafeFile class reads the data from a file using Posix API for file access. More...

class QSafeFileException

The QSafeFileException class represents exceptions related to safe file. More...

class QSafeFileInfo

The QSafeFileInfo class contains functions for parsing the path, the filename and hash value of the filename. More...

class QSafeFont

The QSafeFont class reads the QPF2 font file. More...

class QSafeFontCache

The QSafeFontCache class caches a font. More...

class QSafeFontException

The QSafeFontException class represents exceptions related to safe font and font readers. More...

class QSafeFontFileLoader

The QSafeFontFileLoader class loads a specified font from a file. More...

class QSafeFontLoader

The QSafeFontLoader class loads a specified font. More...

class QSafeFontResourceLoader

The QSafeFontResourceLoader class loads a specified font from a file. More...

class QSafeLayout

The QSafeLayout class provides an abstract class for accessing the Qt Safe Renderer layout data. More...

class QSafeLayoutException

The QSafeLayoutException class represents exceptions related to layouts and layout readers. More...

class QSafeLayoutFileReader

The QSafeLayoutFileReader class reads the layout data from a file. More...

class QSafeLayoutResourceReader

The QSafeLayoutResourceReader class reads the layout data from the Qt's resource structure. More...

class QSafePoint

The QSafePoint class holds the x-coordinate and y-coordinate. More...

class QSafeRect

The QSafeRect class holds the x, y, height and width variables. More...

class QSafeRenderer

The QSafeRenderer class draws and clears the bitmaps defined in the QSafeLayout class. More...

class QSafeRendererException

The QSafeRendererException represents exceptions related to saferenderer. More...

class QSafeResourceException

The QSafeResourceException class represents exceptions related to resources and resource readers. More...

class QSafeSize

The QSafeSize class holds the height and width variables. More...

class QSafeStateException

The QSafeStateException class represents exceptions related to states and state readers. More...

class QSafeStateFileReader

The QSafeStateFileReader class loads the state definition from the file. More...

class QSafeStateLoader

The QSafeStateLoader class loads the state definition file. More...

class QSafeStateResourceReader

The QSafeStateResourceReader class loads the state definition from the resource data. More...

class QSafeString

The QSafeString class contains functions for the string manipulation. More...

class QSafeStringException

An instance of QSafeStringException is thrown in case of an exception. More...

class QSafeTextLayout

The QSafeTextLayout class contains functions for the text layout manipulation. More...

class QSafeTextLayoutException

The QSafeTextLayoutException class represents exceptions related to text layouts and text layout readers. More...

class QSafeTouch

The QSafeTouch class is used to send the touch information to the safe renderer process. More...

class QStateManagerException

The QStateManagerException class represents the exception related to state manager. More...

class QStringSplitter

The QStringSplitter class splits the string. More...

class SafeWindow

The SafeWindow class implements the AbstractWindow interface for the supported platforms. More...

class SafeWindowException

The SafeWindowException class is an abstract exception class for SafeWindow. More...

class StateManager

The StateManager class maintains the state of the indicators. More...

class TestVerifier

The TestVerifier class implements the OutputVerifierInterface abstract interface for the Qt GUI adaptation. More...

class VerifyRegion

The VerifyRegion class provides API to monitor graphics output. More...

Type Documentation

enum SafeRenderer::AnimationType

This enum describes the possible animation types.

ConstantValueDescription
SafeRenderer::Unset0The value is not set.
SafeRenderer::XPosition1An X-position animation.
SafeRenderer::YPosition2An Y-position animation.
SafeRenderer::Opacity3An opacity animation.
SafeRenderer::Sprite4A sprite animation.
SafeRenderer::Color5A color animation.

enum SafeRenderer::EventId

This enum describes the type of the event. The possible types are:

ConstantValueDescription
SafeRenderer::EventUndefined0UThe event type is not defined.
SafeRenderer::EventSetVisibility1The event changes the visibility of the item.
SafeRenderer::EventSetPosition2The event changes the position of the item.
SafeRenderer::EventHeartbeatUpdate3The event keeps alive the update notification that has been received from the non-safe partition.
SafeRenderer::EventHeartbeatTimeout4The timeout has occurred in the heart beat messaging.
SafeRenderer::EventConnectEventToState5The events connects the system event to the UI state.
SafeRenderer::EventChangeLayout6The event changes the layout file.
SafeRenderer::EventSystemStateChange7The system event that changes the UI state.
SafeRenderer::EventSetText8The event changes the text of the item.
SafeRenderer::EventSetColor9The event changes the color of the item, where item can be text or picture.
SafeRenderer::EventChangeState10The event requests a state change.
SafeRenderer::EventAnimationTick11The event changes the tick status.
SafeRenderer::EventWindowUpdateRequest12The event requests a window update.
SafeRenderer::EventOutputVerificationRequest13The event requests an output verification.
SafeRenderer::EventOutputVerificationStatusRequest14The event requests the status of output verification.
SafeRenderer::EventOutputVerificationStatusReply15The event sends a reply of the status request.
SafeRenderer::EventOutputVerificationVerifyItem16The event updates the output CRC value of the single safe item.
SafeRenderer::EventQuit17The event requests to quit the output verification.
SafeRenderer::EventTouch18The event provides touch information to the safe renderer process.
SafeRenderer::LastEventID19The event validates the event id range.

enum SafeRenderer::HorizontalAlignment

This enum type specifies horizontal alignment:

ConstantValue
SafeRenderer::AlignLeft0
SafeRenderer::AlignRight1
SafeRenderer::AlignHCenter2

enum SafeRenderer::LayoutType

This enum defines layout type.

ConstantValueDescription
SafeRenderer::BitmapLayout0A bitmap layout.
SafeRenderer::TextLayout1A text layout
SafeRenderer::StateDefinition2A state layout.

enum SafeRenderer::VerticalAlignment

This enum type specifies vertical alignment:

ConstantValue
SafeRenderer::AlignTop3
SafeRenderer::AlignBottom4
SafeRenderer::AlignVCenter5

qchar

Qt-style synonym for 8-bit signed char.

qint8

Qt-style synonym for 8-bit signed char.

qint32

Qt-style synonym for 32-bit signed int.

qint64

Qt-style synonym for 64-bit signed long long.

qint

Qt-style synonym for 32-bit signed int.

quchar

Qt-style synonym for 8-bit unsigned char.

quint8

Qt-style synonym for 8-bit unsigned char.

quint16

Qt-style synonym for 16-bit unsigned short.

quint32

Qt-style synonym for 32-bit unsigned int.

quint64

Qt-style synonym for 64-bit unsigned long long.

Function Documentation

SafeRenderer::quint32 SafeRenderer::ARGBtoInt(const SafeRenderer::ARGB &color)

Cast color ARGB to Int.

[since QtSafeRenderer 1.2] SafeRenderer::quint8 *SafeRenderer::allocAlignedFromMemoryPool(const SafeRenderer::quint32 sizeArgInBytes)

Reserves a buffer with size sizeArgInBytes. The index to the buffer is adjusted so that the underlying address in memory is aligned to 4 byte boundary for safe access via quint32 pointer. Returns a pointer to the reserved buffer.

This function was introduced in QtSafeRenderer 1.2.

[since QtSafeRenderer 2.2] void SafeRenderer::deallocFromMemoryPool(SafeRenderer::quint8 *memoryPtr)

Deallocates reserved memoryPtr from the memory pool.

This function is provided with a default empty implementation. Users who implement a custom allocAlignedFromMemoryPool() function with dynamic memory allocation may also want to customize this function to properly free allocated memory.

This function was introduced in QtSafeRenderer 2.2.

[since QtSafeRenderer 1.0] SafeRenderer::quint32 SafeRenderer::qsafe_hash(const SafeRenderer::qchar *const dataPtr, const size_t dataLength)

Returns the calculated hash value of the string dataPtr with length dataLength.

This is a copy of the implementation of the Qt 4 qHash algorithm.

This function was introduced in QtSafeRenderer 1.0.

[since QtSafeRenderer 2.0] SafeRenderer::quint32 SafeRenderer::qsafe_hash_string(const SafeRenderer::qchar *const dataPtr)

Returns the calculated hash value of the null-terminated string dataPtr.

This function was introduced in QtSafeRenderer 2.0.

[since QtSafeRenderer 1.0] SafeRenderer::quint16 SafeRenderer::qt_checksum(const SafeRenderer::quchar *const dataPtr, const size_t dataLength)

Returns the CRC-16 checksum of the first dataLength bytes starting at dataPtr.

Note: The checksum is independent of the byte order (endianness) and will be calculated according to the algorithm published in the ISO 3309 standard.

Note: This function is a 16-bit cache conserving (16 entry table) implementation of the CRC-16-CCITT algorithm.

Note: If data pointer is NULL a 0 is returned.

This function was introduced in QtSafeRenderer 1.0.

[since QtSafeRenderer 2.1] SafeRenderer::quint16 SafeRenderer::qt_checksum_file(const SafeRenderer::qchar *const filePath)

Returns the CRC-16 checksum of a file contents given filePath.

Note: The checksum is independent of the byte order (endianness) and will be calculated according to the algorithm published in the ISO 3309 standard.

Note: This function is a 16-bit cache conserving (16 entry table) implementation of the CRC-16-CCITT algorithm.

This function was introduced in QtSafeRenderer 2.1.

[since QtSafeRenderer 2.2] SafeRenderer::quint16 SafeRenderer::qt_checksum_partial(const SafeRenderer::quchar *const dataPtr, const size_t dataLength, const SafeRenderer::quint16 currentCrc)

Calculates a partial CRC-16 checksum for the given data. Returns the updated CRC value. This CRC is not yet finalized; to finalize, the result must be complemented and masked as shown in qt_checksum.

dataPtr Pointer to the data over which the CRC is calculated. dataLength The number of bytes in the data. currentCrc The current CRC value, which should be 0xFFFFU for the first call, or the result from a previous call to this function for subsequent calls.

Note: The checksum calculation is independent of byte order (endianness) and follows the ISO 3309 standard. This is a 16-bit cache conserving implementation using a 16-entry table.

Note: If dataPtr is NULL, the function returns 0.

Note: To finalize the CRC, complement the returned value and mask it with 0xFFFF (e.g., `~crc & 0xFFFFU`).

This function was introduced in QtSafeRenderer 2.2.

size_t SafeRenderer::safe_strlen(const qchar[] strArg, const size_t maxLength = Constraints::MAX_LEN_OF_TEXT)

Returns the length of the strArg c-style string, or maxLength if the string is not \0-terminated.

Note: This function is originated from https://www.misra.org.uk/forum/viewtopic.php?t=1160

void SafeRenderer::updateCRC(const quint8[4] colorVal, SafeRenderer::quint32 &crcArg)

Updates the CRC32 checksum based on a given colorVal. colorVal is an array of four bytes representing the color in ARGB format. crcArg is a reference to an unsigned 32-bit integer where the computed CRC32 value will be stored.

Available under certain Qt licenses.
Find out more.