Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ULogParser Class Reference

#include <ulog_parser.h>

Classes

struct  DataStream
 
struct  Field
 
struct  Format
 
struct  MessageLog
 
struct  Parameter
 
struct  Subscription
 
struct  Timeseries
 

Public Types

enum  FormatType {
  UINT8, UINT16, UINT32, UINT64,
  INT8, INT16, INT32, INT64,
  FLOAT, DOUBLE, BOOL, CHAR,
  OTHER
}
 

Public Member Functions

const std::map< std::string, std::string > & getInfo () const
 
const std::vector< MessageLog > & getLogs () const
 
const std::vector< Parameter > & getParameters () const
 
const std::map< std::string, Timeseries > & getTimeseriesMap () const
 
 ULogParser (const std::string &filename)
 

Private Member Functions

Timeseries createTimeseries (const Format *format)
 
size_t fieldsCount (const Format &format) const
 
void parseDataMessage (const Subscription &sub, char *message)
 
char * parseSimpleDataMessage (Timeseries &timeseries, const Format *format, char *message, size_t *index)
 
bool readFileDefinitions (DataStream &datastream)
 
bool readFileHeader (DataStream &datastream)
 
bool readFlagBits (DataStream &datastream, uint16_t msg_size)
 
bool readFormat (DataStream &datastream, uint16_t msg_size)
 
bool readInfo (DataStream &datastream, uint16_t msg_size)
 
bool readParameter (DataStream &datastream, uint16_t msg_size)
 
bool readSubscription (DataStream &datastream, uint16_t msg_size)
 
std::vector< StringViewsplitString (const StringView &strToSplit, char delimeter)
 

Private Attributes

std::streampos _data_section_start
 first ADD_LOGGED_MSG message More...
 
uint64_t _file_start_time
 
std::map< std::string, Format_formats
 
std::map< std::string, std::string > _info
 
std::vector< MessageLog_message_logs
 
std::set< std::string > _message_name_with_multi_id
 
std::set< std::string > _overridden_params
 
std::vector< Parameter_parameters
 
std::vector< uint8_t > _read_buffer
 
int64_t _read_until_file_position = 1ULL << 60
 read limit if log contains appended data More...
 
std::map< uint16_t, Subscription_subscriptions
 
std::map< std::string, Timeseries_timeseries
 

Detailed Description

Definition at line 13 of file ulog_parser.h.

Member Enumeration Documentation

Enumerator
UINT8 
UINT16 
UINT32 
UINT64 
INT8 
INT16 
INT32 
INT64 
FLOAT 
DOUBLE 
BOOL 
CHAR 
OTHER 

Definition at line 16 of file ulog_parser.h.

Constructor & Destructor Documentation

ULogParser::ULogParser ( const std::string &  filename)

Definition at line 15 of file ulog_parser.cpp.

Member Function Documentation

ULogParser::Timeseries ULogParser::createTimeseries ( const Format format)
private

Definition at line 780 of file ulog_parser.cpp.

size_t ULogParser::fieldsCount ( const Format format) const
private

Definition at line 300 of file ulog_parser.cpp.

const std::map< std::string, std::string > & ULogParser::getInfo ( ) const

Definition at line 274 of file ulog_parser.cpp.

const std::vector< ULogParser::MessageLog > & ULogParser::getLogs ( ) const

Definition at line 279 of file ulog_parser.cpp.

const std::vector< ULogParser::Parameter > & ULogParser::getParameters ( ) const

Definition at line 269 of file ulog_parser.cpp.

const std::map< std::string, ULogParser::Timeseries > & ULogParser::getTimeseriesMap ( ) const

Definition at line 264 of file ulog_parser.cpp.

void ULogParser::parseDataMessage ( const Subscription sub,
char *  message 
)
private

Definition at line 133 of file ulog_parser.cpp.

char * ULogParser::parseSimpleDataMessage ( Timeseries timeseries,
const Format format,
char *  message,
size_t *  index 
)
private

Definition at line 169 of file ulog_parser.cpp.

bool ULogParser::readFileDefinitions ( DataStream datastream)
private

Definition at line 362 of file ulog_parser.cpp.

bool ULogParser::readFileHeader ( DataStream datastream)
private

Definition at line 338 of file ulog_parser.cpp.

bool ULogParser::readFlagBits ( DataStream datastream,
uint16_t  msg_size 
)
private

Definition at line 431 of file ulog_parser.cpp.

bool ULogParser::readFormat ( DataStream datastream,
uint16_t  msg_size 
)
private

Definition at line 484 of file ulog_parser.cpp.

bool ULogParser::readInfo ( DataStream datastream,
uint16_t  msg_size 
)
private

Definition at line 645 of file ulog_parser.cpp.

bool ULogParser::readParameter ( DataStream datastream,
uint16_t  msg_size 
)
private

Definition at line 736 of file ulog_parser.cpp.

bool ULogParser::readSubscription ( DataStream datastream,
uint16_t  msg_size 
)
private

Definition at line 284 of file ulog_parser.cpp.

std::vector< StringView > ULogParser::splitString ( const StringView strToSplit,
char  delimeter 
)
private

Definition at line 318 of file ulog_parser.cpp.

Member Data Documentation

std::streampos ULogParser::_data_section_start
private

first ADD_LOGGED_MSG message

Definition at line 142 of file ulog_parser.h.

uint64_t ULogParser::_file_start_time
private

Definition at line 136 of file ulog_parser.h.

std::map<std::string, Format> ULogParser::_formats
private

Definition at line 148 of file ulog_parser.h.

std::map<std::string, std::string> ULogParser::_info
private

Definition at line 150 of file ulog_parser.h.

std::vector<MessageLog> ULogParser::_message_logs
private

Definition at line 160 of file ulog_parser.h.

std::set<std::string> ULogParser::_message_name_with_multi_id
private

Definition at line 158 of file ulog_parser.h.

std::set<std::string> ULogParser::_overridden_params
private

Definition at line 146 of file ulog_parser.h.

std::vector<Parameter> ULogParser::_parameters
private

Definition at line 138 of file ulog_parser.h.

std::vector<uint8_t> ULogParser::_read_buffer
private

Definition at line 140 of file ulog_parser.h.

int64_t ULogParser::_read_until_file_position = 1ULL << 60
private

read limit if log contains appended data

Definition at line 144 of file ulog_parser.h.

std::map<uint16_t, Subscription> ULogParser::_subscriptions
private

Definition at line 152 of file ulog_parser.h.

std::map<std::string, Timeseries> ULogParser::_timeseries
private

Definition at line 154 of file ulog_parser.h.


The documentation for this class was generated from the following files:


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 04:02:50