JsonBackend.h

// SPDX-License-Identifier: MIT

safuResultE_t elosJsonBackendShutdown(elosStorageBackend_t *backend)
[source]

Shutdown the logging system and free all related resources.

Parameters:
  • backend (elosStorageBackend_t*) – The Storage Backend instance itself.

Returns:

SAFU_RESULT_OK – on success. SAFU_RESULT_FAILURE – on failure.

Return type:

safuResultE_t

safuResultE_t elosJsonBackendStart(elosStorageBackend_t *backend)
[source]

Initialize the file backed storage of JSON serialized event objects. The elosStorageBackend_t.backendData shall be initialized with a pointer to a elosJsonBackend_t instance. elosJsonBackend_t.storageFileWrite and elosJsonBackend_t.storageFileRead shall contain valid file descriptors to the target file for writing/reading purposes. In write mode, the file shall be opened for appending and synchronous writing, to ensure a write is carried out through the kernel caches.

Parameters:
  • backend (elosStorageBackend_t*) – The Storage Backend instance itself.

Returns:

SAFU_RESULT_OK – on success. SAFU_RESULT_FAILURE – on failure.

Return type:

safuResultE_t