C

<crccache.h> - CRC Cache Management

The CRC Cache Assessment API provides dynamic CRC value caching capabilities for Qt Safe Monitor. More...

Header: #include <crccache.h>
Since: QSR 2.2

Functions

void crcCache_clearAllCRCs()
qint32 crcCache_clearCRC(const quint32 itemId)
qint32 crcCache_getCRC(const quint32 itemId, quint32 *crcValue)
qint32 crcCache_setCRC(const quint32 itemId, const quint32 crcValue)

Detailed Description

The Runtime CRC Management API extends the Qt Safe Monitor configuration with the ability to manage CRC values dynamically at runtime. This complements the existing static CRC values that are generated at build time. The system allows one CRC value per item ID.

Function Documentation

void crcCache_clearAllCRCs()

Clears all CRC cache values for all items.

qint32 crcCache_clearCRC(const quint32 itemId)

Clears the CRC cache value for the specified itemId.

This function removes the CRC value associated with the given item from the CRC cache storage. Only one CRC value is stored per item.

Returns 0 if CRC value was removed successfully, -1 if not found.

qint32 crcCache_getCRC(const quint32 itemId, quint32 *crcValue)

Retrieves the CRC cache value for the specified item.

This function retrieves the crcValue stored for the given itemId. Only one CRC value is stored per item.

Returns 0 if CRC value is found and retrieved successfully, -1 if not found or error.

qint32 crcCache_setCRC(const quint32 itemId, const quint32 crcValue)

Sets crcValue for the specified itemId.

This function allows storing a CRC value that will be considered valid during CRC verification. Only one CRC value can be stored per item. Setting a CRC value for an existing item will update the existing CRC value.

The CRC cache has a maximum capacity of MAX_CRC_CACHE_ENTRIES entries. When this limit is reached, attempts to add new CRC values will fail. The default capacity is 256 entries.

Returns 0 on success, -1 on failure (e.g., CRC cache system not initialized or buffer full).

Available under certain Qt licenses.
Find out more.