C

SafeRenderer Namespace

Contains all Misra compliant classes and types. More...

Header: #include <SafeRenderer>
Since: QtSafeRenderer 1.0

Classes

(since QtSafeRenderer 1.2) class AnimationData
(since QtSafeRenderer 1.0) struct Constraints
class EventHandler
(since QtSafeRenderer 2.1) class EventHandlerException
(since QtSafeRenderer 3.0) class EventHandlerInterface
(since QtSafeRenderer 2.1) class EventSenderException
(since QtSafeRenderer 3.0) class FrameBufferInterface
(since QtSafeRenderer 1.1) struct Glyph
(since QtSafeRenderer 1.1) class LayoutItem
(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.1) class OutputVerifierException
(since QtSafeRenderer 3.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 3.0) class QSafeContainerException
(since QtSafeRenderer 1.0) class QSafeEvent
(since QtSafeRenderer 3.0) class QSafeEventAck
(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 3.0) class QSafeEventFilter
(since QtSafeRenderer 1.0) class QSafeEventHeartbeat
(since QtSafeRenderer 1.0) class QSafeEventHeartbeatTimeout
(since QtSafeRenderer 3.0) class QSafeEventItemTouch
(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 3.0) 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
(since QtSafeRenderer 1.1) class QSafeFontLoader
(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 3.0) class QSafeMap
(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 3.0) class QSafeVector
(since QtSafeRenderer 2.1) class QStateManagerException
(since QtSafeRenderer 1.0) class QStringSplitter
(since QtSafeRenderer 1.2) class SafeWindowException
(since QtSafeRenderer 3.0) class SafeWindowInterface
(since QtSafeRenderer 1.0) class StateManager
(since QtSafeRenderer 2.0) class TestVerifier
(since QtSafeRenderer 2.0) class VerifyRegion

Types

enum class AnimationState { NotRunning, Running }
enum class AnimationType { Unset, XPosition, YPosition, Opacity, Sprite, Color }
enum class EventId { EventUndefined, EventSetVisibility, EventSetPosition, EventHeartbeatUpdate, EventHeartbeatTimeout, …, LastEventID }
enum class HorizontalAlignment { AlignLeft, AlignRight, AlignHCenter }
enum class LayoutType { BitmapLayout, TextLayout, StateDefinition }
enum class TimerType { AnimationTimer, OutputVerificationTimer, HeartbeatTimer }
enum class 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 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)
size_t safe_strlen(const SafeRenderer::qchar *const strArg)
void updateCRC(const std::array<SafeRenderer::quint8, 4> &colorVal, SafeRenderer::quint32 &crcArg)

Detailed Description

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

Classes

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

EventHandler adaptation implementation for QtNetwork. More...

class EventHandlerException

An instance of EventHandlerException class is thrown in case of errors. More...

class EventHandlerInterface

EventHandler base class and shared functionality. More...

class EventSenderException

An instance of EventSenderException class is thrown in case of errors. More...

class FrameBufferInterface

FrameBuffer interface class. More...

class Glyph

Struct that holds the glyph data. More...

class LayoutItem

The LayoutItem class encapsulates a single layout item. More...

class MISRCalculator

The MISRCalculator class calculates the CRC value for the region. 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 OutputVerifierException

An instance of OutputVerifierException class is thrown in case of errors. More...

class OutputVerifierInterface

The OutputVerifierInterface class provides an API to verify 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 bitmap data. More...

class QSafeBitmapException

An instance of QSafeBitmapException is thrown in case of an exception. 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 QSafeByteArray class provides helper methods for handling raw data array. More...

class QSafeContainerException

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

class QSafeEvent

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

class QSafeEventAck

The QSafeEventAck class is an ACK-reply for safe 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

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

class QSafeEventFilter

Interface class to add custom handling for QSafeEvent's. More...

class QSafeEventHeartbeat

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

class QSafeEventHeartbeatTimeout

QSafeEventHeartbeatTimeout indicates that a heart beat timeout has occurred. More...

class QSafeEventItemTouch

The QSafeEventItemTouch class contains parameters that describe a touch event. More...

class QSafeEventOutputVerificationStatusReply

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

class QSafeEventOutputVerificationStatusRequest

The QSafeEventOutputVerificationStatusRequest is used to request the output verification results. More...

class QSafeEventOutputVerificationVerifyItem

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

class QSafeEventSender

QSafeEventSender 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

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

class QSafeExceptionHandler

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

class QSafeFile

The QSafeFile class reads the data from the file. More...

class QSafeFileException

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

class QSafeFileInfo

The QSafeFileInfo class contains functions for getting the path and the filename from the QSafeString. More...

class QSafeFont

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

class QSafeFontCache

QSafeFontCache class caches a font. More...

class QSafeFontException

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

class QSafeFontLoader

QSafeFontLoader class loads a specified font. More...

class QSafeLayout

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

class QSafeLayoutException

An instance of QSafeLayoutException is thrown in case of an exception. 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 QSafeMap

A safe map-type container class. More...

class QSafePoint

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

class QSafeRect

The QSafeRect class defines a rectangle in the plane. More...

class QSafeRenderer

The QSafeRenderer class renders the safe layout. More...

class QSafeRendererException

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

class QSafeResourceException

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

class QSafeSize

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

class QSafeStateException

An instance of QSafeStateException is thrown in case of an exception. 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

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

class QSafeTouch

The QSafeTouch class contains parameters that describe a touch event. More...

class QSafeVector

A safe vector-type container class. More...

class QStateManagerException

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

class QStringSplitter

The QStringSplitter class splits the string. More...

class SafeWindowException

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

class SafeWindowInterface

SafeWindow base class and shared functionality. More...

class StateManager

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

class TestVerifier

The TestVerifier class provides the output verifier implementation for the Qt GUI adaptation. More...

class VerifyRegion

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

Type Documentation

enum class SafeRenderer::AnimationState

This enum describes the state of the animation.

ConstantValueDescription
SafeRenderer::AnimationState::NotRunning0Animation is not running.
SafeRenderer::AnimationState::Running1Animation is running.

enum class SafeRenderer::AnimationType

This enum describes the possible animation types.

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

enum class SafeRenderer::EventId

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

ConstantValueDescription
SafeRenderer::EventId::EventUndefined0The event type is not defined.
SafeRenderer::EventId::EventSetVisibility1The event changes the visibility of the item.
SafeRenderer::EventId::EventSetPosition2The event changes the position of the item.
SafeRenderer::EventId::EventHeartbeatUpdate3The event keeps alive the update notification that has been received from the non-safe partition.
SafeRenderer::EventId::EventHeartbeatTimeout4The timeout has occurred in the heart beat messaging.
SafeRenderer::EventId::EventHeartbeatInternalTimer5This is an internal event which the implemented eventhandler adaptation can send forward when a heartbeat timer ticks. It will call checkHeartbeat() in EventHandlerInterface. Sending this event is not needed if the triggering heartbeat timer can call checkHeartbeat() directly.
SafeRenderer::EventId::EventConnectEventToState6The events connects the system event to the UI state.
SafeRenderer::EventId::EventChangeLayout7The event changes the layout file.
SafeRenderer::EventId::EventSystemStateChange8The system event that changes the UI state.
SafeRenderer::EventId::EventSetText9The event changes the text of the item.
SafeRenderer::EventId::EventSetColor10The event changes the color of the item, where item can be text or picture.
SafeRenderer::EventId::EventChangeState11The event requests a state change.
SafeRenderer::EventId::EventAnimationTick12The event changes the tick status.
SafeRenderer::EventId::EventWindowUpdateRequest13The event requests a window update.
SafeRenderer::EventId::EventOutputVerificationRequest14The event requests an output verification.
SafeRenderer::EventId::EventOutputVerificationStatusRequest15The event requests the status of output verification.
SafeRenderer::EventId::EventOutputVerificationStatusReply16The event sends a reply of the status request.
SafeRenderer::EventId::EventOutputVerificationVerifyItem17The event updates the output CRC value of the single safe item.
SafeRenderer::EventId::EventQuit18The event requests to quit the output verification.
SafeRenderer::EventId::EventTouch19The event provides touch information to the safe renderer process.
SafeRenderer::EventId::LastEventID22The event validates the event id range.

enum class SafeRenderer::HorizontalAlignment

This enum type specifies horizontal alignment:

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

enum class SafeRenderer::LayoutType

This enum defines layout type.

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

enum class SafeRenderer::TimerType

Enum that contains the different types of timers used in the adaptations.

ConstantValueDescription
SafeRenderer::TimerType::AnimationTimer0Timer used for animations
SafeRenderer::TimerType::OutputVerificationTimer1Timer used for output verification
SafeRenderer::TimerType::HeartbeatTimer2Timer used for heartbeat timeouts

enum class SafeRenderer::VerticalAlignment

This enum type specifies vertical alignment:

ConstantValue
SafeRenderer::VerticalAlignment::AlignTop0
SafeRenderer::VerticalAlignment::AlignBottom1
SafeRenderer::VerticalAlignment::AlignVCenter2

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 pointer to the reserved buffer.

This function was introduced in QtSafeRenderer 1.2.

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

Calculates the hash value of the string.

This is a copy of the implementation of the Qt 4 qHash algorithm. dataPtr is the pointer to the source string. dataLength is the length of the string.

This function was introduced in QtSafeRenderer 1.0.

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

Calculates the hash value of the null-terminated string.

dataPtr is the pointer to the source string.

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 nullptr 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 filename .

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.

size_t SafeRenderer::safe_strlen(const SafeRenderer::qchar *const strArg)

Returns the length of the strArg c-style string.

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

void SafeRenderer::updateCRC(const std::array<SafeRenderer::quint8, 4> &colorVal, SafeRenderer::quint32 &crcArg)

Updates the CRC32 checksum based on a given \A colorVal.

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

Available under certain Qt licenses.
Find out more.