Difference between revisions of "OCEOS/oceos logging"

From wiki
Jump to navigation Jump to search
Line 1: Line 1:
=<span style="color:#0000ff">'''OCEOS Logging'''</span>=
=<span style="color:#0000ff">'''OCEOS Logging'''</span>=
OCEOS logs time stamped records of anomalies detected during execution. It is structured as a circular buffer. System calls are provided to add entries the log, set its maximum size, and return the number of entries, and reset.<br>
OCEOS logs time stamped records of anomalies detected during execution.
==<span style="color:#0000ff">Logging Introduction</span>==
OCEOS logging is structured as a circular buffer. System calls are provided to add entries the log, set its maximum size, and return the number of entries, and reset.<br>


OCEOS does not change the log entries after reset, so if log area is located in non volatile memory, after reset, the application can read to recover possible reasons of failure. Only call to [[OCEOS/oceos_logging#oceos_log_reset()|oceos_log_reset()]] can be used to reset all log entries if desired.<br>
OCEOS does not change the log entries after reset, so if log area is located in non volatile memory, after reset, the application can read to recover possible reasons of failure. Only call to [[OCEOS/oceos_logging#oceos_log_reset()|oceos_log_reset()]] can be used to reset all log entries if desired.<br>
Line 8: Line 10:
OCEOS will call a user defined function '''void oceos_on_full_log(void*)''' when the log is approximately 75% full.
OCEOS will call a user defined function '''void oceos_on_full_log(void*)''' when the log is approximately 75% full.


==<span style="color:#0000ff">Logging Introduction</span>==
==<span style="color:#0000ff">Logging Configuration</span>==
==<span style="color:#0000ff">Logging Configuration</span>==
<blockquote>
Application defines arrays to hold OCEOS internal data. User must specified array to accommodate all logging information.
<syntaxhighlight lang="C">
</syntaxhighlight>
</blockquote>
==<span style="color:#0000ff">API Functions</span>==
==<span style="color:#0000ff">API Functions</span>==
{| class="wikitable"
{| class="wikitable"

Revision as of 15:37, 25 March 2022

OCEOS Logging

OCEOS logs time stamped records of anomalies detected during execution.

Logging Introduction

OCEOS logging is structured as a circular buffer. System calls are provided to add entries the log, set its maximum size, and return the number of entries, and reset.

OCEOS does not change the log entries after reset, so if log area is located in non volatile memory, after reset, the application can read to recover possible reasons of failure. Only call to oceos_log_reset() can be used to reset all log entries if desired.

Log directives can be called from main() after oceos_init().

OCEOS will call a user defined function void oceos_on_full_log(void*) when the log is approximately 75% full.

Logging Configuration

Application defines arrays to hold OCEOS internal data. User must specified array to accommodate all logging information.

API Functions

API Functions
Directive Description main task IRQ handler
oceos_log_add_entry() Add a log entry * * *
oceos_log_remove_entry() Read and remove the oldest unread log entry * * *
oceos_log_get_indexed_entry() Read the log entry at the given index * * *
oceos_log_reset() Clear all log entries and reset to empty * * *
oceos_log_get_size() Get the number of log entries * * *