Garmin Fleet Management Controller
2.19.0
|
Utility for converting between raw AOBRD data to human- readable CSV file. Used to attempt to auto-convert files received from device and CSV files selected for upload as AOBRD content to device. More...
#include <AobrdEventLogConverter.h>
Public Member Functions | |
AobrdEventLogConverter () | |
Constructor. More... | |
bool | convertAnnotation (std::vector< std::string > &record, fmi_driver_annotation_data_type *annotation) |
Convert an Annotation record to structure sent to FMI device. More... | |
void | convertToCsv (const char *source, const char *destFormat) |
Convert raw file to CSV. More... | |
uint32 | convertToRaw (const char *source, const char *dest) |
Convert CSV file to raw. More... | |
uint16 | countRecords (const char *source, evt_log_reason type) |
Count records by type. More... | |
bool | findRecordAt (const char *source, evt_log_reason type, uint16 index, bool(*visitor)(AobrdEventLogConverter *converter, std::vector< std::string > &record, void *data), void *data) |
Visit records by type and index. More... | |
Utility for converting between raw AOBRD data to human- readable CSV file. Used to attempt to auto-convert files received from device and CSV files selected for upload as AOBRD content to device.
Definition at line 26 of file AobrdEventLogConverter.h.
Definition at line 30 of file AobrdEventLogConverter.h.
AobrdEventLogConverter::AobrdEventLogConverter | ( | ) |
Constructor.
Definition at line 55 of file AobrdEventLogConverter.cpp.
bool AobrdEventLogConverter::convertAnnotation | ( | std::vector< std::string > & | record, |
fmi_driver_annotation_data_type * | annotation | ||
) |
Convert an Annotation record to structure sent to FMI device.
Definition at line 1052 of file AobrdEventLogConverter.cpp.
References cnt_of_array, parseDateTime(), fmi_driver_annotation_data_type::server_annotation, fmi_driver_annotation_data_type::server_end_time, fmi_driver_annotation_data_type::server_start_time, and fmi_driver_annotation_data_type::server_timestamp.
Referenced by convertAnnotationRecord().
void AobrdEventLogConverter::convertToCsv | ( | const char * | source, |
const char * | destFormat | ||
) |
Convert raw file to CSV.
Definition at line 360 of file AobrdEventLogConverter.cpp.
References convertTimeTypeToString(), encodeDegreeFields(), encodeStringFields(), encodeTimestampField(), encodeTimestampFields(), encodeUint16Fields(), encodeUint32Fields(), evt_log_header_fixed::field_flags, CsvWriter::Finish(), locateEventBeingVerified(), modifyStatusChangeRecord(), CsvWriter::NewLine(), evt_log_header_fixed::reason, updateEventBeingVerified(), evt_log_header_fixed::version, and CsvWriter::WriteValue().
Referenced by CFmiPcAppDlg::OnEventAobrdFileTransferReceived().
uint32 AobrdEventLogConverter::convertToRaw | ( | const char * | source, |
const char * | dest | ||
) |
Convert CSV file to raw.
Definition at line 769 of file AobrdEventLogConverter.cpp.
References checkFieldHeaders(), decodeDegreeFields(), decodeStringFields(), decodeTimestampFields(), decodeUint16Fields(), decodeUint32Fields(), evt_log_header_fixed::field_flags, readCSVRecord(), evt_log_header_fixed::reason, and evt_log_header_fixed::version.
Referenced by FmiApplicationLayer::rx().
uint16 AobrdEventLogConverter::countRecords | ( | const char * | source, |
evt_log_reason | type | ||
) |
Count records by type.
Definition at line 956 of file AobrdEventLogConverter.cpp.
References readCSVRecord().
Referenced by FmiApplicationLayer::rx().
bool AobrdEventLogConverter::findRecordAt | ( | const char * | source, |
evt_log_reason | type, | ||
uint16 | index, | ||
bool(*)(AobrdEventLogConverter *converter, std::vector< std::string > &record, void *data) | visitor, | ||
void * | data | ||
) |
Visit records by type and index.
Definition at line 991 of file AobrdEventLogConverter.cpp.
References readCSVRecord().
Referenced by FmiApplicationLayer::sendNextAOBRDAnnotation().