DUNE: Uniform Navigational Environment  2016.05.0
Transports::Logging::Task Struct Reference

Public Member Functions

 Task (const std::string &name, Tasks::Context &ctx)
 
 ~Task (void)
 
void onResourceInitialization (void)
 
void onResourceRelease (void)
 
void onUpdateParameters (void)
 
void consume (const IMC::LoggingControl *msg)
 
void consume (const IMC::CacheControl *msg)
 
void consume (const IMC::PowerOperation *msg)
 
void consume (const IMC::EntityInfo *msg)
 
void consume (const IMC::Message *msg)
 
bool changeVolumeDirectory (void)
 
void logAuxFiles (double time_ref)
 
void logFile (const std::string &file)
 
void stopLog (bool keep_logging=true)
 
void startLog (std::string label)
 
void tryFlush (void)
 
void tryRotate (void)
 
void tryStartLog (const std::string &label="")
 
void logMessage (const IMC::Message *msg)
 
void onMain (void)
 

Public Attributes

double m_last_flush
 
std::string m_label
 
Path m_dir
 
std::string m_volume_dir
 
Compression::Methods m_compression
 
std::ostream * m_lsf
 
Path m_lsf_file
 
ByteBuffer m_buffer
 
IMC::LoggingControl m_log_ctl
 
bool m_active
 
Arguments m_args
 

Constructor & Destructor Documentation

Transports::Logging::Task::~Task ( void  )
inline

References onResourceRelease().

Member Function Documentation

bool Transports::Logging::Task::changeVolumeDirectory ( void  )
inline
void Transports::Logging::Task::consume ( const IMC::LoggingControl *  msg)
inline
void Transports::Logging::Task::consume ( const IMC::CacheControl *  msg)
inline

References logFile().

void Transports::Logging::Task::consume ( const IMC::PowerOperation *  msg)
inline
void Transports::Logging::Task::consume ( const IMC::EntityInfo *  msg)
inline

References logMessage().

void Transports::Logging::Task::consume ( const IMC::Message *  msg)
inline

References logMessage(), and m_active.

void Transports::Logging::Task::logAuxFiles ( double  time_ref)
inline
void Transports::Logging::Task::logFile ( const std::string &  file)
inline

References m_lsf.

Referenced by consume().

void Transports::Logging::Task::logMessage ( const IMC::Message *  msg)
inline

References m_buffer, and m_lsf.

Referenced by consume(), logAuxFiles(), startLog(), and stopLog().

void Transports::Logging::Task::onMain ( void  )
inline
void Transports::Logging::Task::onResourceInitialization ( void  )
inline
void Transports::Logging::Task::onResourceRelease ( void  )
inline

References m_lsf.

Referenced by stopLog(), and ~Task().

void Transports::Logging::Task::startLog ( std::string  label)
inline
void Transports::Logging::Task::stopLog ( bool  keep_logging = true)
inline

References logMessage(), m_active, m_log_ctl, m_lsf, and onResourceRelease().

Referenced by consume(), and startLog().

void Transports::Logging::Task::tryFlush ( void  )
inline
void Transports::Logging::Task::tryRotate ( void  )
inline
void Transports::Logging::Task::tryStartLog ( const std::string &  label = "")
inline

References m_active, and startLog().

Referenced by consume(), onMain(), and tryRotate().

Member Data Documentation

bool Transports::Logging::Task::m_active
Arguments Transports::Logging::Task::m_args
ByteBuffer Transports::Logging::Task::m_buffer

Referenced by logMessage().

Compression::Methods Transports::Logging::Task::m_compression

Referenced by onUpdateParameters(), and startLog().

Path Transports::Logging::Task::m_dir

Referenced by logAuxFiles(), startLog(), and tryRotate().

std::string Transports::Logging::Task::m_label

Referenced by startLog(), and tryRotate().

double Transports::Logging::Task::m_last_flush

Referenced by tryFlush().

IMC::LoggingControl Transports::Logging::Task::m_log_ctl

Referenced by consume(), startLog(), stopLog(), and Task().

std::ostream* Transports::Logging::Task::m_lsf
Path Transports::Logging::Task::m_lsf_file

Referenced by startLog(), and tryRotate().

std::string Transports::Logging::Task::m_volume_dir

Referenced by changeVolumeDirectory(), and startLog().

Collaboration diagram for Transports::Logging::Task:
Collaboration graph