QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
LogFormatter Namespace Reference

Enumerations

enum  Format { PlainText = 0 , JSON = 1 , CSV = 2 , JSONLines = 3 }
enum  JsonSchema { ExportSchema , RemoteCompactSchema }

Functions

static QString escapeCsv (const QString &field)
QString formatCsvRow (const LogEntry &entry)
QString csvHeader ()
QByteArray format (const QList< LogEntry > &entries, int fmt)
QByteArray formatAsText (const QList< LogEntry > &entries)
QJsonObject entryToJson (const LogEntry &e, JsonSchema schema)
QByteArray formatAsJson (const QList< LogEntry > &entries)
QByteArray formatAsCsv (const QList< LogEntry > &entries)
QByteArray formatAsJsonLines (const QList< LogEntry > &entries)

Enumeration Type Documentation

◆ Format

Enumerator
PlainText 
JSON 
CSV 
JSONLines 

Definition at line 12 of file LogFormatter.h.

◆ JsonSchema

Enumerator
ExportSchema 
RemoteCompactSchema 

Definition at line 20 of file LogFormatter.h.

Function Documentation

◆ csvHeader()

QString LogFormatter::csvHeader ( )

Definition at line 32 of file LogFormatter.cc.

Referenced by formatAsCsv().

◆ entryToJson()

QJsonObject LogFormatter::entryToJson ( const LogEntry & e,
JsonSchema schema )

◆ escapeCsv()

QString LogFormatter::escapeCsv ( const QString & field)
static

Definition at line 15 of file LogFormatter.cc.

Referenced by formatCsvRow().

◆ format()

QByteArray LogFormatter::format ( const QList< LogEntry > & entries,
int fmt )

◆ formatAsCsv()

QByteArray LogFormatter::formatAsCsv ( const QList< LogEntry > & entries)

Definition at line 100 of file LogFormatter.cc.

References csvHeader(), and formatCsvRow().

Referenced by format().

◆ formatAsJson()

QByteArray LogFormatter::formatAsJson ( const QList< LogEntry > & entries)

Definition at line 91 of file LogFormatter.cc.

References entryToJson().

Referenced by format().

◆ formatAsJsonLines()

QByteArray LogFormatter::formatAsJsonLines ( const QList< LogEntry > & entries)

Definition at line 113 of file LogFormatter.cc.

References entryToJson().

Referenced by format().

◆ formatAsText()

QByteArray LogFormatter::formatAsText ( const QList< LogEntry > & entries)

Definition at line 55 of file LogFormatter.cc.

Referenced by format().

◆ formatCsvRow()

QString LogFormatter::formatCsvRow ( const LogEntry & entry)