utils.h

// SPDX-License-Identifier: MIT

safuResultE_t elosEventFromLogEntry(elosDltMapper_t *mapper, elosEbLogEntry_t *entry, elosEvent_t *event)
[source]

transform a elosEbLogEntry_t into an elosEvent_t

Parameters:
  • mapper – a mapper holding default values and state to generate the event

  • entry – the dlt log entry to transform

  • event – the elos event to write the parsed log entry to filds not set by the log entry arn’t touch and stay as they are

Returns:

on success - SAFU_RESULT_FAILED: when entry or event arn’t set propperly

Return type:

  • SAFU_RESULT_OK

safuResultE_t elosPublishAndStore(elosPlugin_t *plugin, struct elosPublisher *publisher, elosEvent_t *event)
[source]

publish an elosEvent_t and also store it to the storage backends

Parameters:
  • plugin – the referecne to the plugin

  • publisher – the publisher to use

  • event – the event to publish and store

Returns:

on success - otherwise the error result of elosEventPublish or elosEventStore

Return type:

  • SAFU_RESULT_OK