Defines a LogWriter that can convert Location and depth triples into write kml format text (see http://en.wikipedia.org/wiki/Kml )
More...
#include <KmlLogWriter.h>
|
| static const char * | KmlArgs_ [3] = {"depth", "latitude", "longitude"} |
| |
| static const char * | KmlUnits_ [3] = {Units::METER.getName(), Units::DEGREE.getName(), Units::DEGREE.getName()} |
| |
| static float | KmlErrors_ [3] = { 0.5, D2R( 0.000005 ), D2R( 0.000005 ) } |
| |
| static const Location | ZERO_LOCATION |
| |
Defines a LogWriter that can convert Location and depth triples into write kml format text (see http://en.wikipedia.org/wiki/Kml )
See FileLogWriter for output to the filesystem.
| KmlLogWriter::KmlLogWriter |
( |
Str |
vehicleName, |
|
|
bool |
emitTimestamps = true, |
|
|
bool |
doDepth = true |
|
) |
| |
| KmlLogWriter::~KmlLogWriter |
( |
| ) |
|
|
virtual |
| static char** KmlLogWriter::GetKmlArgs |
( |
bool |
doKmlSimple = false | ) |
|
|
inlinestatic |
| static float* KmlLogWriter::GetKmlErrors |
( |
bool |
doKmlSimple = false | ) |
|
|
inlinestatic |
| static char** KmlLogWriter::GetKmlUnits |
( |
bool |
doKmlSimple = false | ) |
|
|
inlinestatic |
| void KmlLogWriter::setColor |
( |
const char * |
color | ) |
|
|
inline |
| unsigned int KmlLogWriter::write |
( |
const LogEntry * |
entry, |
|
|
const Unit * |
unit = NULL |
|
) |
| |
|
virtual |
Write an entry to the text log.
Write the given Entry to the OutStream.
Pipes the toString() method of the entry to the OutStream with some formatting.
Implements LogWriter.
References OutStream::bytesWritten(), DataValue::copyTo(), currentTimestamp_, LogEntry::DATA_LOG_ENTRY, Units::DEGREE, UniversalURI::DEPTH, depth_, doDepth_, emitTimestamps_, LogEntry::EVENT_LOG_ENTRY, DataEntry::getDataAccess(), DataEntry::getDataValue(), Location::getDistance(), EventEntry::getEventType(), Location::getLat(), Location::getLon(), LogEntry::getTimestamp(), LogEntry::getType(), DataAccess::getUniversalCode(), haveFirstDepth_, haveFirstLocation_, haveNewDepth_, haveNewLatitude_, haveNewLongitude_, DataEntry::isBest(), LogWriter::isValid(), lastLatitude_, lastLongitude_, lastTimestamp_, UniversalURI::LATITUDE, lineCount_, location_, LogWriter::logStream_, UniversalURI::LONGITUDE, Units::METER, Units::RADIAN, Location::setLat(), Location::setLon(), EventEntry::START_CYCLE, started_, LogEntry::SYSLOG_LOG_ENTRY, syslogItems_, Timestamp::toString(), OutStream::write(), LogWriter::writeMutex_, writeSyslogItems(), and ZERO_LOCATION.
| unsigned int KmlLogWriter::writeFooter |
( |
| ) |
|
|
virtual |
Write the log footer, if any.
Reimplemented from LogWriter.
References OutStream::bytesWritten(), currentTimestamp_, Units::DEGREE, depth_, doDepth_, emitTimestamps_, Location::getLat(), Location::getLon(), LogWriter::isValid(), lastLatitude_, lastLongitude_, lastTimestamp_, location_, LogWriter::logStream_, started_, Timestamp::toString(), OutStream::write(), writeSyslogItems(), LogWriter::wroteFooter_, and LogWriter::wroteHeader_.
| unsigned int KmlLogWriter::writeHeader |
( |
| ) |
|
|
virtual |
| unsigned int KmlLogWriter::writeSyslogItems |
( |
const char * |
latestCoordinates | ) |
|
|
protected |
References OutStream::bytesWritten(), KmlLogWriter::SyslogItem::coordinates_, Syslog::CRITICAL, Str::cStr(), Syslog::DEBUG, doDepth_, emitTimestamps_, Str::EMPTY_STR, Syslog::ERROR, Syslog::FAULT, Syslog::IMPORTANT, Syslog::INFO, Str::length(), LogWriter::logStream_, KmlLogWriter::SyslogItem::message_, Syslog::NONE, KmlLogWriter::SyslogItem::severity_, syslogItems_, KmlLogWriter::SyslogItem::timestamp_, Timestamp::toString(), and OutStream::write().
Referenced by write(), and writeFooter().
| const char* KmlLogWriter::color_ |
|
private |
| double KmlLogWriter::depth_ |
|
private |
| bool KmlLogWriter::doDepth_ |
|
private |
| bool KmlLogWriter::emitTimestamps_ |
|
private |
| bool KmlLogWriter::haveFirstDepth_ |
|
private |
| bool KmlLogWriter::haveFirstLocation_ |
|
private |
| bool KmlLogWriter::haveNewDepth_ |
|
private |
| bool KmlLogWriter::haveNewLatitude_ |
|
private |
| bool KmlLogWriter::haveNewLongitude_ |
|
private |
| const char * KmlLogWriter::KmlArgs_ = {"depth", "latitude", "longitude"} |
|
staticprivate |
| float KmlLogWriter::KmlErrors_ = { 0.5, D2R( 0.000005 ), D2R( 0.000005 ) } |
|
staticprivate |
| const char * KmlLogWriter::KmlUnits_ = {Units::METER.getName(), Units::DEGREE.getName(), Units::DEGREE.getName()} |
|
staticprivate |
| double KmlLogWriter::lastLatitude_ |
|
private |
| double KmlLogWriter::lastLongitude_ |
|
private |
| unsigned int KmlLogWriter::lineCount_ |
|
private |
| bool KmlLogWriter::started_ |
|
private |
| Str KmlLogWriter::vehicleName_ |
|
protected |
| const Location KmlLogWriter::ZERO_LOCATION |
|
staticprivate |
The documentation for this class was generated from the following files: