SUIT firmware mock transport. More...
SUIT firmware mock transport.
Mock transport backend definitions for SUIT manifests
The mock transport is a noop transport. Payloads are preloaded in flash and provided as an array of suit_transport_mock_payload_t to the module.
Both the array of payloads named payloads and the size with name num_payloads must be provided.
Data Structures | |
| struct | suit_transport_mock_payload_t |
| Mock payload. More... | |
Macros | |
| #define | SUIT_TRANSPORT_MOCK_APP_MANIFEST |
| Enable to provide a mocked manifest file from an application. | |
Functions | |
| ssize_t | suit_transport_mock_get_manifest (uint8_t *buf, size_t buf_len) |
| Get mock manifest from an application. | |
| int | suit_transport_mock_fetch (const suit_manifest_t *manifest) |
| 'fetch' a payload | |
| #define SUIT_TRANSPORT_MOCK_APP_MANIFEST |
Enable to provide a mocked manifest file from an application.
Set this if you want to provide a manifest in suit_handle_url() from a test application. The test application then needs to implement the function suit_transport_mock_get_manifest().
| int suit_transport_mock_fetch | ( | const suit_manifest_t * | manifest | ) |
'fetch' a payload
The payload fetched from the payloads array is indicated by the suit_manifest_t::component_current member
| [in] | manifest | suit manifest context |
| ssize_t suit_transport_mock_get_manifest | ( | uint8_t * | buf, |
| size_t | buf_len ) |
Get mock manifest from an application.
| [out] | buf | Manifest buffer |
| [in] | buf_len | Maximum length of buf |
If SUIT_TRANSPORT_MOCK_APP_MANIFEST is not defined, the function is a macro that returns 0U.
buf_len does not fit the manifest.