Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
sdlog_linux.h File Reference

Linux (and NPS) replacement of the ChibiOS sdLog API. More...

#include "std.h"
#include <stddef.h>
Include dependency graph for sdlog_linux.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  SdioError {
  SDLOG_OK , SDLOG_NOCARD , SDLOG_FATFS_ERROR , SDLOG_FATFS_NOENT ,
  SDLOG_FSFULL , SDLOG_FDFULL , SDLOG_QUEUEFULL , SDLOG_MEMFULL ,
  SDLOG_NOTHREAD , SDLOG_INTERNAL_ERROR , SDLOG_CANNOT_EXPAND , SDLOG_LOGNUM_ERROR ,
  SDLOG_WAS_LAUNCHED
}

Functions

SdioError sdLogWriteLog (const FileDes fd, const char *fmt,...)
SdioError sdLogWriteRaw (const FileDes fd, const uint8_t *buffer, const size_t len)
SdioError sdLogWriteByte (const FileDes fd, const uint8_t value)
SdioError sdLogFlushLog (const FileDes fd)
SdioError sdLogFlushAllLogs (void)
size_t sdLogGetNbBytesWrittenToStorage (void)
SdioError sdLogGetStorageStatus (void)

Detailed Description

Linux (and NPS) replacement of the ChibiOS sdLog API.

Only the part of the sdLog API used by the modules is provided, so the modules logging on the SD card work unchanged on Linux and in simulation.

Definition in file sdlog_linux.h.

Enumeration Type Documentation

◆ SdioError

enum SdioError
Enumerator
SDLOG_OK 
SDLOG_NOCARD 
SDLOG_FATFS_ERROR 
SDLOG_FATFS_NOENT 
SDLOG_FSFULL 
SDLOG_FDFULL 
SDLOG_QUEUEFULL 
SDLOG_MEMFULL 
SDLOG_NOTHREAD 
SDLOG_INTERNAL_ERROR 
SDLOG_CANNOT_EXPAND 
SDLOG_LOGNUM_ERROR 
SDLOG_WAS_LAUNCHED 

Definition at line 35 of file sdlog_linux.h.

Function Documentation

◆ sdLogFlushAllLogs()

SdioError sdLogFlushAllLogs ( void )
extern

Definition at line 191 of file sdlog_linux.c.

References sdlog_error, sdlog_files, and SDLOG_MAX_FILES.

Referenced by sdlog_write().

Here is the caller graph for this function:

◆ sdLogFlushLog()

SdioError sdLogFlushLog ( const FileDes fd)
extern

Definition at line 182 of file sdlog_linux.c.

References f, fd, sdlog_error, and sdlog_file().

Here is the call graph for this function:

◆ sdLogGetNbBytesWrittenToStorage()

size_t sdLogGetNbBytesWrittenToStorage ( void )
extern

Definition at line 201 of file sdlog_linux.c.

References sdlog_bytes.

Referenced by send_sdlog_status().

Here is the caller graph for this function:

◆ sdLogGetStorageStatus()

SdioError sdLogGetStorageStatus ( void )
extern

Definition at line 206 of file sdlog_linux.c.

References sdlog_error.

Referenced by send_sdlog_status(), and thd_startlog().

Here is the caller graph for this function:

◆ sdLogWriteByte()

SdioError sdLogWriteByte ( const FileDes fd,
const uint8_t value )
extern

Definition at line 176 of file sdlog_linux.c.

References fd, sdlog_error, and sdlog_write().

Referenced by gps_ubx_parse(), and logger_log_msg_up().

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

◆ sdLogWriteLog()

SdioError sdLogWriteLog ( const FileDes fd,
const char * fmt,
... )
extern

◆ sdLogWriteRaw()

SdioError sdLogWriteRaw ( const FileDes fd,
const uint8_t * buffer,
const size_t len )
extern

Definition at line 170 of file sdlog_linux.c.

References fd, sdlog_msg::len, sdlog_error, and sdlog_write().

Referenced by logger_log_msg_up().

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