Internal API Functions#

Internal functions used by the logging system implementation.

These functions are primarily for internal use by the logging system and platform-specific implementations. They provide access to low-level functionality and system state information.

Functions#

int

Calculate timestamp delta between cores.

Retrieve current logging configuration.

uint8_t
sl_log_is_ring_buffer_empty(sl_log_ring_buffer_t *ring_buffer)

Check if ring buffer is empty.

uint8_t
sl_log_is_ring_buffer_full(sl_log_ring_buffer_t *ring_buffer)

Check if ring buffer is full.

Function Documentation#

sl_log_get_timestamp_delta#

int sl_log_get_timestamp_delta (void )

Calculate timestamp delta between cores.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Computes the timestamp difference between captive cores and the host timestamp reference. This is used for timestamp synchronization in multi-core logging scenarios.

Returns

  • int Timestamp delta value in system timer units

Note

  • This function is primarily used internally for multi-core timestamp alignment and synchronization.


sl_log_get_config#

sl_log_config_t sl_log_get_config (void )

Retrieve current logging configuration.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns a snapshot of the current logging system configuration, including log level, backend interface, and buffer settings.

Returns

Note

  • This function returns a copy of the configuration structure, so modifications to the returned value do not affect the actual system configuration.


sl_log_is_ring_buffer_empty#

static uint8_t sl_log_is_ring_buffer_empty (sl_log_ring_buffer_t * ring_buffer)

Check if ring buffer is empty.

Parameters
TypeDirectionArgument NameDescription
sl_log_ring_buffer_t *[in]ring_buffer

Pointer to the ring buffer control structure

Efficiently determines whether the ring buffer contains any log events. This inline function provides optimal performance for frequent buffer status checks.

Returns

  • uint8_t Non-zero if buffer is empty, zero if it contains events

Note

  • This function should only be called with a valid ring_buffer pointer.


sl_log_is_ring_buffer_full#

static uint8_t sl_log_is_ring_buffer_full (sl_log_ring_buffer_t * ring_buffer)

Check if ring buffer is full.

Parameters
TypeDirectionArgument NameDescription
sl_log_ring_buffer_t *[in]ring_buffer

Pointer to the ring buffer control structure

Efficiently determines whether the ring buffer has reached its maximum capacity. When full, new events will overwrite the oldest events.

Returns

  • uint8_t Non-zero if buffer is full, zero if space is available

Note

  • This function should only be called with a valid ring_buffer pointer.