Garmin Fleet Management Controller
2.19.0
|
#include "AobrdEventLogConverter.h"
#include "CsvWriter.h"
#include "util.h"
#include <stdlib.h>
#include <fstream>
#include <map>
#include "pack_begin.h"
Go to the source code of this file.
Classes | |
struct | evt_log_header_fixed |
Functions | |
static void | checkFieldHeaders (uint32 &field_flags, int start, int end, vector< string > &record, uint16 &fieldIdx) |
static void | convertTimeTypeToString (time_type aTimestamp, char *full, int fullSize) |
static void | decodeDegreeFields (uint32 &, int start, int end, ofstream &rawFile, vector< string > &record, uint16 &fieldIdx, char *format="%f") |
Convert degrees into 4 byte signed int. More... | |
static void | decodeStringFields (uint32 &field_flags, int start, int end, ofstream &rawFile, vector< string > &record, uint16 &fieldIdx) |
Convert CSV fields into 1 byte length and character stream. More... | |
static void | decodeTimestampFields (uint32 &, int start, int end, ofstream &rawFile, vector< string > &record, uint16 &fieldIdx) |
Convert human-readable formatted timestamp into seconds. More... | |
static void | decodeUint16Fields (uint32 &, int start, int end, ofstream &rawFile, vector< string > &record, uint16 &fieldIdx, char *format="%x") |
Convert 6 byte hex string into 2 byte unsigned int. More... | |
static void | decodeUint32Fields (uint32 &, int start, int end, ofstream &rawFile, vector< string > &record, uint16 &fieldIdx, char *format="%x") |
Convert 10 byte hex string into 4 byte unsigned int. More... | |
static void | encodeDegreeFields (uint32 field_flags, int start, int end, ifstream &rawFile, CsvWriter &csvWriter, char *format="%08.6f") |
Convert 4 byte signed int into degrees. More... | |
static void | encodeStringFields (uint32 field_flags, int start, int end, ifstream &rawFile, CsvWriter &csvWriter) |
Convert 1 byte length and character stream into CSV cell. More... | |
static time_type | encodeTimestampField (uint32 field_flags, int start, ifstream &rawFile, CsvWriter &csvWriter) |
static void | encodeTimestampFields (uint32 field_flags, int start, int end, ifstream &rawFile, CsvWriter &csvWriter) |
Convert time_type into human-readable formatted timestamp. More... | |
static void | encodeUint16Fields (uint32 field_flags, int start, int end, ifstream &rawFile, CsvWriter &csvWriter, char *format="0x%.4x") |
Convert 2 byte unsigned int into 6 byte hex string. More... | |
static void | encodeUint32Fields (uint32 field_flags, int start, int end, ifstream &rawFile, CsvWriter &csvWriter, char *format="0x%.8x") |
Convert 4 byte unsigned int into 10 byte hex string. More... | |
bool | locateEventBeingVerified (void *key, vector< string > &record) |
callback for finding a Driver Status Change event in CSV file More... | |
static void | modifyStatusChangeRecord (bool(*locator)(void *key, vector< string > &record), void *key, void(*updater)(void *val, vector< string > &record), void *val, const char *source) |
Function for finding and updating a record. More... | |
static time_type | parseDateTime (std::string cellValue) |
Convert date-time string to UTC timestamp. More... | |
static uint16 | readCSVRecord (ifstream &fstream, vector< string > &record, char delimiter= ',') |
Convert CSV record into vector of strings. More... | |
void | updateEventBeingVerified (void *val, vector< string > &record) |
callback for updating a verified Driver Status Change event More... | |
|
static |
Definition at line 754 of file AobrdEventLogConverter.cpp.
Referenced by AobrdEventLogConverter::convertToRaw().
|
static |
Definition at line 90 of file AobrdEventLogConverter.cpp.
References date_time_data_type::date, date_time_data_type::_date::day, date_time_data_type::_time::hour, date_time_data_type::_time::minute, date_time_data_type::_date::month, date_time_data_type::_time::second, date_time_data_type::time, UTIL_convert_seconds_to_date_type(), UTIL_convert_seconds_to_time_type(), UTIL_convert_UTC_to_local(), and date_time_data_type::_date::year.
Referenced by AobrdEventLogConverter::convertToCsv(), encodeTimestampField(), and encodeTimestampFields().
|
static |
Convert degrees into 4 byte signed int.
Definition at line 671 of file AobrdEventLogConverter.cpp.
References UTIL_convert_degrees_to_semicircles().
Referenced by AobrdEventLogConverter::convertToRaw().
|
static |
Convert CSV fields into 1 byte length and character stream.
Definition at line 642 of file AobrdEventLogConverter.cpp.
Referenced by AobrdEventLogConverter::convertToRaw().
|
static |
Convert human-readable formatted timestamp into seconds.
Definition at line 736 of file AobrdEventLogConverter.cpp.
References parseDateTime().
Referenced by AobrdEventLogConverter::convertToRaw().
|
static |
Convert 6 byte hex string into 2 byte unsigned int.
Definition at line 716 of file AobrdEventLogConverter.cpp.
Referenced by AobrdEventLogConverter::convertToRaw().
|
static |
Convert 10 byte hex string into 4 byte unsigned int.
Definition at line 691 of file AobrdEventLogConverter.cpp.
Referenced by AobrdEventLogConverter::convertToRaw().
|
static |
Convert 4 byte signed int into degrees.
Definition at line 156 of file AobrdEventLogConverter.cpp.
References UTIL_convert_semicircles_to_degrees(), and CsvWriter::WriteValue().
Referenced by AobrdEventLogConverter::convertToCsv().
|
static |
Convert 1 byte length and character stream into CSV cell.
Definition at line 63 of file AobrdEventLogConverter.cpp.
References CsvWriter::WriteValue().
Referenced by AobrdEventLogConverter::convertToCsv().
|
static |
Definition at line 128 of file AobrdEventLogConverter.cpp.
References convertTimeTypeToString(), and CsvWriter::WriteValue().
Referenced by AobrdEventLogConverter::convertToCsv().
|
static |
Convert time_type into human-readable formatted timestamp.
Definition at line 102 of file AobrdEventLogConverter.cpp.
References convertTimeTypeToString(), and CsvWriter::WriteValue().
Referenced by AobrdEventLogConverter::convertToCsv().
|
static |
Convert 2 byte unsigned int into 6 byte hex string.
Definition at line 202 of file AobrdEventLogConverter.cpp.
References CsvWriter::WriteValue().
Referenced by AobrdEventLogConverter::convertToCsv().
|
static |
Convert 4 byte unsigned int into 10 byte hex string.
Definition at line 180 of file AobrdEventLogConverter.cpp.
References CsvWriter::WriteValue().
Referenced by AobrdEventLogConverter::convertToCsv().
bool locateEventBeingVerified | ( | void * | key, |
vector< string > & | record | ||
) |
callback for finding a Driver Status Change event in CSV file
Definition at line 284 of file AobrdEventLogConverter.cpp.
Referenced by AobrdEventLogConverter::convertToCsv().
|
static |
Function for finding and updating a record.
Definition at line 300 of file AobrdEventLogConverter.cpp.
References cnt_of_array, CsvWriter::NewLine(), readCSVRecord(), and CsvWriter::WriteValue().
Referenced by AobrdEventLogConverter::convertToCsv().
|
static |
Convert date-time string to UTC timestamp.
Definition at line 1029 of file AobrdEventLogConverter.cpp.
References date_time_data_type::date, date_time_data_type::_date::day, date_time_data_type::_time::hour, date_time_data_type::_time::minute, date_time_data_type::_date::month, date_time_data_type::_time::second, date_time_data_type::time, UTIL_convert_date_time_to_seconds(), UTIL_convert_local_to_UTC(), UTIL_convert_time_type_to_seconds(), and date_time_data_type::_date::year.
Referenced by AobrdEventLogConverter::convertAnnotation(), and decodeTimestampFields().
|
static |
Convert CSV record into vector of strings.
Definition at line 225 of file AobrdEventLogConverter.cpp.
Referenced by AobrdEventLogConverter::convertToRaw(), AobrdEventLogConverter::countRecords(), AobrdEventLogConverter::findRecordAt(), and modifyStatusChangeRecord().
void updateEventBeingVerified | ( | void * | val, |
vector< string > & | record | ||
) |
callback for updating a verified Driver Status Change event
Definition at line 292 of file AobrdEventLogConverter.cpp.
Referenced by AobrdEventLogConverter::convertToCsv().