K-FSW v1.2.1-59-gcaca356
KFSW: modular flight software on Zephyr, for small satellites
Loading...
Searching...
No Matches
Remote log reads

Data Structures

struct  kfsw_log_remote_start
 
struct  kfsw_log_remote_message
 
struct  kfsw_log_remote_visitor
 

Enumerations

enum  kfsw_log_remote_stream { KFSW_LOG_REMOTE_LOG = 0 , KFSW_LOG_REMOTE_JOURNAL = 1 }
 
enum  kfsw_log_remote_format { KFSW_LOG_REMOTE_TEXT = 0 , KFSW_LOG_REMOTE_DICTIONARY = 1 }
 

Functions

int kfsw_log_remote_server_start (void)
 
int kfsw_log_remote_set_format (uint8_t format)
 
int kfsw_log_remote_read (uint16_t node, enum kfsw_log_remote_stream stream, uint16_t count, uint8_t min_level, const struct kfsw_log_remote_visitor *visitor, void *context)
 

Description

Enumeration Documentation

◆ kfsw_log_remote_format

enum uint8_t kfsw_log_remote_format

#include <log_remote.h>

How the serving node sends log messages, set by its log_remote_format parameter.

The format this node serves log messages in.

Enumerator
KFSW_LOG_REMOTE_TEXT 

Formatted on the serving node.

KFSW_LOG_REMOTE_DICTIONARY 

A cbprintf package: format string address, arguments and RAM strings.

◆ kfsw_log_remote_stream

#include <log_remote.h>

What a remote read returns.

Enumerator
KFSW_LOG_REMOTE_LOG 

The recent log messages.

KFSW_LOG_REMOTE_JOURNAL 

The newest journal records.

Function Documentation

◆ kfsw_log_remote_read()

int kfsw_log_remote_read ( uint16_t  node,
enum kfsw_log_remote_stream  stream,
uint16_t  count,
uint8_t  min_level,
const struct kfsw_log_remote_visitor *  visitor,
void *  context 
)

#include <log_remote.h>

Read another node's newest log messages or journal records.

Records arrive oldest first. Nothing is removed on the serving node.

Parameters
nodeRemote CSP node address.
streamLog messages or journal records to read.
countRecords to consider, 1 to KFSW_LOG_HISTORY_MAX_READ.
min_levelLowest severity sent for log messages, 0 to 3.
visitorCallbacks receiving the reply and its records.
contextCaller data passed to the callbacks.
Return values
0Every record arrived, or a callback stopped the read.
-EINVALA bad argument, or node is 0 or broadcast or above.
-ENOTCONNNo connection to the node.
-ETIMEDOUTThe node did not answer.
-ENOTSUPThe node does not serve that stream.
-EIOThe read was cut short; the records received are valid.

◆ kfsw_log_remote_server_start()

int kfsw_log_remote_server_start ( void  )

#include <log_remote.h>

Start the server after the CSP router has started.

◆ kfsw_log_remote_set_format()

int kfsw_log_remote_set_format ( uint8_t  format)

#include <log_remote.h>

Change it, as the log_remote_format parameter does.

-ERANGE for an unknown format.