Modbus Vault v1.0
Loading...
Searching...
No Matches
logger_service.h File Reference

Logger service provider. More...

#include "blackbox_logger.h"
#include "freertos/FreeRTOS.h"
#include "telemetry_pipeline.h"
Include dependency graph for logger_service.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LOGGER_SERVICE_TASK_NAME   ("LOG_SRV")
 
#define LOGGER_SERVICE_TASK_STACK_DEPTH   (3072U)
 
#define LOGGER_SERVICE_TASK_PRIORITY   (5U)
 
#define LOGGER_SERVICE_TASK_CPU_AFFINITY   (1U)
 
#define LOGGER_SERVICE_TASK_NOTIFY_STOP_BIT   (1U << 0)
 
#define LOGGER_SERVICE_TASK_NOTIFY_LOG_BIT   (1U << 1)
 

Functions

bool logger_service_init (blackbox_logger_config_t *blackbox_logger_config_ptr, void(*on_replay_available_cb)(void))
 Initialize logger service.
 
bool logger_service_enqueue (const telemetry_pipeline_record_t *payload_ptr)
 Enqueue entries for storing.
 
bool logger_service_store (const telemetry_pipeline_record_t *payload_ptr)
 Store an entry.
 
bool logger_service_has_backlog (void)
 Logger has a backlog.
 
bool logger_service_fetch_next_replay (telemetry_pipeline_record_t *payload_ptr, blackbox_logger_iter_cb_t cb)
 Fetch next replay.
 
void logger_service_deinit (void)
 Deinitialize logger service.
 

Detailed Description

Logger service provider.

Author
Abanoub Salah
  • Provided services
    • Logging entry enqueue
    • Logging entry store
    • Inquire about replay backlog
    • Fetch next replay
    • Provide a task for storing enqueued entries

Macro Definition Documentation

◆ LOGGER_SERVICE_TASK_CPU_AFFINITY

#define LOGGER_SERVICE_TASK_CPU_AFFINITY   (1U)

CPU affinity

◆ LOGGER_SERVICE_TASK_NAME

#define LOGGER_SERVICE_TASK_NAME   ("LOG_SRV")

Task name

◆ LOGGER_SERVICE_TASK_NOTIFY_LOG_BIT

#define LOGGER_SERVICE_TASK_NOTIFY_LOG_BIT   (1U << 1)

Task notify for log bit

◆ LOGGER_SERVICE_TASK_NOTIFY_STOP_BIT

#define LOGGER_SERVICE_TASK_NOTIFY_STOP_BIT   (1U << 0)

Task stop bit

◆ LOGGER_SERVICE_TASK_PRIORITY

#define LOGGER_SERVICE_TASK_PRIORITY   (5U)

Priority

◆ LOGGER_SERVICE_TASK_STACK_DEPTH

#define LOGGER_SERVICE_TASK_STACK_DEPTH   (3072U)

Stack depth

Function Documentation

◆ logger_service_deinit()

void logger_service_deinit ( void  )

Deinitialize logger service.

Deinitialize blackbox logger and delete used queue

Here is the call graph for this function:
Here is the caller graph for this function:

◆ logger_service_enqueue()

bool logger_service_enqueue ( const telemetry_pipeline_record_t payload_ptr)

Enqueue entries for storing.

Parameters
payload_ptrPointer to payload
Returns
true if enqueued false otherwise
Here is the caller graph for this function:

◆ logger_service_fetch_next_replay()

bool logger_service_fetch_next_replay ( telemetry_pipeline_record_t payload_ptr,
blackbox_logger_iter_cb_t  cb 
)

Fetch next replay.

Parameters
payload_ptrPointer to payload
cbcallback
Returns
true if fetched then processed by callback false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logger_service_has_backlog()

bool logger_service_has_backlog ( void  )

Logger has a backlog.

Returns
true if logger has a backlog false otherwise
Here is the call graph for this function:

◆ logger_service_init()

bool logger_service_init ( blackbox_logger_config_t blackbox_logger_config_ptr,
void(*)(void)  on_replay_available_cb 
)

Initialize logger service.

Initialize blackbox logger instance used in different functionality throughout

Parameters
blackbox_logger_config_ptrPointer to Blackbox logger configuration structure
on_replay_available_cbCallback for when replay available
Returns
true on initialize success false otherwise

< Logger queue length

Here is the call graph for this function:
Here is the caller graph for this function:

◆ logger_service_store()

bool logger_service_store ( const telemetry_pipeline_record_t payload_ptr)

Store an entry.

Parameters
payload_ptrPointer to payload
Returns
true if stored false otherwise
Here is the call graph for this function:
Here is the caller graph for this function: