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#
Calculate timestamp delta between cores.
Retrieve current logging configuration.
Check if ring buffer is empty.
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.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/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.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Returns a snapshot of the current logging system configuration, including log level, backend interface, and buffer settings.
Returns
sl_log_config_t Copy of current logging configuration
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.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| 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.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| 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.