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

#include <ulog_parser.h>

Classes

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 (std::ifstream &file)
 
bool readFileHeader (std::ifstream &file)
 
bool readFlagBits (std::ifstream &file, uint16_t msg_size)
 
bool readFormat (std::ifstream &file, uint16_t msg_size)
 
bool readInfo (std::ifstream &file, uint16_t msg_size)
 
bool readParameter (std::ifstream &file, uint16_t msg_size)
 
bool readSubscription (std::ifstream &file, 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 19 of file ulog_parser.h.

Constructor & Destructor Documentation

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

Definition at line 13 of file ulog_parser.cpp.

Member Function Documentation

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

Definition at line 741 of file ulog_parser.cpp.

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

Definition at line 279 of file ulog_parser.cpp.

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

Definition at line 253 of file ulog_parser.cpp.

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

Definition at line 258 of file ulog_parser.cpp.

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

Definition at line 248 of file ulog_parser.cpp.

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

Definition at line 243 of file ulog_parser.cpp.

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

Definition at line 123 of file ulog_parser.cpp.

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

Definition at line 160 of file ulog_parser.cpp.

bool ULogParser::readFileDefinitions ( std::ifstream &  file)
private

Definition at line 343 of file ulog_parser.cpp.

bool ULogParser::readFileHeader ( std::ifstream &  file)
private

Definition at line 319 of file ulog_parser.cpp.

bool ULogParser::readFlagBits ( std::ifstream &  file,
uint16_t  msg_size 
)
private

Definition at line 406 of file ulog_parser.cpp.

bool ULogParser::readFormat ( std::ifstream &  file,
uint16_t  msg_size 
)
private

Definition at line 453 of file ulog_parser.cpp.

bool ULogParser::readInfo ( std::ifstream &  file,
uint16_t  msg_size 
)
private

Definition at line 608 of file ulog_parser.cpp.

bool ULogParser::readParameter ( std::ifstream &  file,
uint16_t  msg_size 
)
private

Definition at line 698 of file ulog_parser.cpp.

bool ULogParser::readSubscription ( std::ifstream &  file,
uint16_t  msg_size 
)
private

Definition at line 264 of file ulog_parser.cpp.

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

Definition at line 296 of file ulog_parser.cpp.

Member Data Documentation

std::streampos ULogParser::_data_section_start
private

first ADD_LOGGED_MSG message

Definition at line 111 of file ulog_parser.h.

uint64_t ULogParser::_file_start_time
private

Definition at line 105 of file ulog_parser.h.

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

Definition at line 117 of file ulog_parser.h.

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

Definition at line 119 of file ulog_parser.h.

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

Definition at line 129 of file ulog_parser.h.

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

Definition at line 127 of file ulog_parser.h.

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

Definition at line 115 of file ulog_parser.h.

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

Definition at line 107 of file ulog_parser.h.

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

Definition at line 109 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 113 of file ulog_parser.h.

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

Definition at line 121 of file ulog_parser.h.

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

Definition at line 123 of file ulog_parser.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Sat Jul 6 2019 03:44:19