MOOS 0.2375
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
CMOOSLogger Class Reference

#include <MOOSLogger.h>

Inheritance diagram for CMOOSLogger:
Inheritance graph
[legend]
Collaboration diagram for CMOOSLogger:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CMOOSLogger ()
virtual ~CMOOSLogger ()
bool Iterate ()
bool OnConnectToServer ()
bool OnNewMail (MOOSMSG_LIST &NewMail)
bool OnStartUp ()
bool OnCommandMsg (CMOOSMsg Msg)
bool DoZipLogging ()
bool ShutDown ()

Protected Types

enum  LogType {
  XLOG, YLOG, SLOG, ALOG,
  UNKNOWN
}
typedef std::map< std::string,
double > 
VARIABLE_TIMER_MAP

Protected Member Functions

bool HandleLogRequest (std::string sParam, std::string &sNewVariable, bool bDynamic=false)
bool HandleDynamicLogRequest (std::string sRequest)
bool HandleCopyFileRequest (std::string sFileToCopy)
bool HandleWildCardLogging ()
bool IsWildCardAccepted (const std::string &sVariableName) const
bool IsWildCardRejected (const std::string &sVariableName) const
bool CopyMissionFile ()
bool ConfigureLogging ()
bool DoAsyncLog (MOOSMSG_LIST &NewMail)
bool OnLoggerRestart ()
bool AddSyncLineOfTimes (double dfTimeNow=-1)
bool LabelSyncColumns ()
bool DoBanner (std::ostream &os, std::string &sFileName)
bool IsSystemMessage (std::string &sKey)
bool LogSystemMessages (MOOSMSG_LIST &NewMail)
bool OpenAsyncFiles ()
bool OpenSystemFile ()
bool CloseFiles ()
bool OpenSyncFile ()
bool DoSyncLog (double dfTimeNow)
std::string MakeLogName (std::string sStem)
bool OpenFile (std::ofstream &of, const std::string &sName, bool bBinary=false)
bool OnNewSession ()
bool CreateDirectory (const std::string &sDirectory)
std::string MakeStatusString ()
CMOOSLogger::LogType GetDestinationLog (const std::string &sStr)

Protected Attributes

std::ofstream m_AsyncLogFile
std::ofstream m_ExcludeLogFile
std::ofstream m_SyncLogFile
std::ofstream m_SystemLogFile
std::ofstream m_BinaryLogFile
std::string m_sLogRootName
std::string m_sAsyncFileName
std::string m_sExcludeFileName
std::string m_sSyncFileName
std::string m_sSystemFileName
std::string m_sBinaryFileName
std::string m_sMissionCopyName
std::string m_sHoofCopyName
std::string m_sPath
std::string m_sStemFileName
std::string m_sLogDirectoryName
STRING_VECTOR m_SynchronousLogVars
STRING_LIST m_UnusedDynamicVariables
bool m_bSynchronousLog
bool m_bAsynchronousLog
bool m_bWildCardLogging
bool m_bUseExcludedLog
bool m_bCompressAlog
CZipper m_AlogZipper
CZipper m_XlogZipper
int m_nSyncLines
bool m_bAppendFileTimeStamp
 true if we want fancy date appended to file name
bool m_bUseUTCLogNames
 true if we want to create log directories with UTC time stamps
bool m_bLogAuxSrc
double m_dfLastSyncLogTime
double m_dfSyncLogPeriod
double m_dfLastMonitorTime
int m_nDoublePrecision
std::string m_sSummaryFile
std::streampos m_BinaryCursor
VARIABLE_TIMER_MAP m_MonitorMap
std::map< std::string, LogTypem_LogDestinations

Detailed Description

Definition at line 44 of file MOOSLogger.h.


Member Typedef Documentation

typedef std::map< std::string, double > CMOOSLogger::VARIABLE_TIMER_MAP [protected]

Definition at line 168 of file MOOSLogger.h.


Member Enumeration Documentation

enum CMOOSLogger::LogType [protected]
Enumerator:
XLOG 
YLOG 
SLOG 
ALOG 
UNKNOWN 

Definition at line 173 of file MOOSLogger.h.


Constructor & Destructor Documentation

CMOOSLogger::CMOOSLogger ( )

Definition at line 77 of file MOOSLogger.cpp.

CMOOSLogger::~CMOOSLogger ( ) [virtual]

Definition at line 126 of file MOOSLogger.cpp.


Member Function Documentation

bool CMOOSLogger::AddSyncLineOfTimes ( double  dfTimeNow = -1) [protected]

Definition at line 999 of file MOOSLogger.cpp.

bool CMOOSLogger::CloseFiles ( ) [protected]

Definition at line 137 of file MOOSLogger.cpp.

bool CMOOSLogger::ConfigureLogging ( ) [protected]

Definition at line 324 of file MOOSLogger.cpp.

bool CMOOSLogger::CopyMissionFile ( ) [protected]

Definition at line 1304 of file MOOSLogger.cpp.

bool CMOOSLogger::CreateDirectory ( const std::string &  sDirectory) [protected]

Definition at line 1021 of file MOOSLogger.cpp.

bool CMOOSLogger::DoAsyncLog ( MOOSMSG_LIST NewMail) [protected]

Definition at line 1206 of file MOOSLogger.cpp.

bool CMOOSLogger::DoBanner ( std::ostream &  os,
std::string &  sFileName 
) [protected]

Definition at line 950 of file MOOSLogger.cpp.

bool CMOOSLogger::DoSyncLog ( double  dfTimeNow) [protected]

Definition at line 697 of file MOOSLogger.cpp.

bool CMOOSLogger::DoZipLogging ( )

a endless loop looking to compress data to a zip file (if required)

CMOOSLogger::LogType CMOOSLogger::GetDestinationLog ( const std::string &  sStr) [protected]

Definition at line 1196 of file MOOSLogger.cpp.

bool CMOOSLogger::HandleCopyFileRequest ( std::string  sFileToCopy) [protected]

Definition at line 1411 of file MOOSLogger.cpp.

bool CMOOSLogger::HandleDynamicLogRequest ( std::string  sRequest) [protected]

Definition at line 1457 of file MOOSLogger.cpp.

bool CMOOSLogger::HandleLogRequest ( std::string  sParam,
std::string &  sNewVariable,
bool  bDynamic = false 
) [protected]

called to set up machinery to log a variable geiven a command string Log = Var @ etc

Definition at line 437 of file MOOSLogger.cpp.

bool CMOOSLogger::HandleWildCardLogging ( ) [protected]

Definition at line 545 of file MOOSLogger.cpp.

bool CMOOSLogger::IsSystemMessage ( std::string &  sKey) [protected]

Definition at line 942 of file MOOSLogger.cpp.

bool CMOOSLogger::IsWildCardAccepted ( const std::string &  sVariableName) const [protected]

Definition at line 641 of file MOOSLogger.cpp.

bool CMOOSLogger::IsWildCardRejected ( const std::string &  sVariableName) const [protected]

Definition at line 633 of file MOOSLogger.cpp.

bool CMOOSLogger::Iterate ( ) [virtual]

virtual overide of base class CMOOSApp member. Here we do all the processing and IO

Reimplemented from CMOOSApp.

Definition at line 477 of file MOOSLogger.cpp.

bool CMOOSLogger::LabelSyncColumns ( ) [protected]

Definition at line 961 of file MOOSLogger.cpp.

bool CMOOSLogger::LogSystemMessages ( MOOSMSG_LIST NewMail) [protected]

Definition at line 906 of file MOOSLogger.cpp.

std::string CMOOSLogger::MakeLogName ( std::string  sStem) [protected]

Definition at line 656 of file MOOSLogger.cpp.

std::string CMOOSLogger::MakeStatusString ( ) [protected, virtual]

make a status string - overload this in a derived class if you want to modify or what the statuts string looks like

Reimplemented from CMOOSApp.

Definition at line 1525 of file MOOSLogger.cpp.

bool CMOOSLogger::OnCommandMsg ( CMOOSMsg  Msg) [virtual]

called when command mesage is recieved - use this channle for dynamic logging

Reimplemented from CMOOSApp.

Definition at line 1379 of file MOOSLogger.cpp.

bool CMOOSLogger::OnConnectToServer ( ) [virtual]

virtual overide of base class CMOOSApp member. Here we register for data we wish be informed about

Reimplemented from CMOOSApp.

Definition at line 171 of file MOOSLogger.cpp.

bool CMOOSLogger::OnLoggerRestart ( ) [protected]

Definition at line 1179 of file MOOSLogger.cpp.

bool CMOOSLogger::OnNewMail ( MOOSMSG_LIST NewMail) [virtual]

called when new mail arrives

Reimplemented from CMOOSApp.

Definition at line 182 of file MOOSLogger.cpp.

bool CMOOSLogger::OnNewSession ( ) [protected]

Definition at line 1077 of file MOOSLogger.cpp.

bool CMOOSLogger::OnStartUp ( ) [virtual]

called just as the application is starting up

Reimplemented from CMOOSApp.

Definition at line 213 of file MOOSLogger.cpp.

bool CMOOSLogger::OpenAsyncFiles ( ) [protected]

Definition at line 860 of file MOOSLogger.cpp.

bool CMOOSLogger::OpenFile ( std::ofstream &  of,
const std::string &  sName,
bool  bBinary = false 
) [protected]

Definition at line 774 of file MOOSLogger.cpp.

bool CMOOSLogger::OpenSyncFile ( ) [protected]

Definition at line 794 of file MOOSLogger.cpp.

bool CMOOSLogger::OpenSystemFile ( ) [protected]

Definition at line 846 of file MOOSLogger.cpp.

bool CMOOSLogger::ShutDown ( )

call to shut everything down and exit cleanly

Definition at line 131 of file MOOSLogger.cpp.


Member Data Documentation

Definition at line 135 of file MOOSLogger.h.

std::ofstream CMOOSLogger::m_AsyncLogFile [protected]

Definition at line 105 of file MOOSLogger.h.

true if we want fancy date appended to file name

Definition at line 143 of file MOOSLogger.h.

Definition at line 129 of file MOOSLogger.h.

Definition at line 134 of file MOOSLogger.h.

std::streampos CMOOSLogger::m_BinaryCursor [protected]

Definition at line 163 of file MOOSLogger.h.

std::ofstream CMOOSLogger::m_BinaryLogFile [protected]

Definition at line 109 of file MOOSLogger.h.

Definition at line 149 of file MOOSLogger.h.

Definition at line 128 of file MOOSLogger.h.

Definition at line 131 of file MOOSLogger.h.

true if we want to create log directories with UTC time stamps

Definition at line 146 of file MOOSLogger.h.

Definition at line 130 of file MOOSLogger.h.

Definition at line 154 of file MOOSLogger.h.

Definition at line 152 of file MOOSLogger.h.

double CMOOSLogger::m_dfSyncLogPeriod [protected]

Definition at line 153 of file MOOSLogger.h.

std::ofstream CMOOSLogger::m_ExcludeLogFile [protected]

Definition at line 106 of file MOOSLogger.h.

std::map<std::string, LogType> CMOOSLogger::m_LogDestinations [protected]

Definition at line 183 of file MOOSLogger.h.

Definition at line 169 of file MOOSLogger.h.

Definition at line 157 of file MOOSLogger.h.

int CMOOSLogger::m_nSyncLines [protected]

Definition at line 140 of file MOOSLogger.h.

std::string CMOOSLogger::m_sAsyncFileName [protected]

Definition at line 113 of file MOOSLogger.h.

std::string CMOOSLogger::m_sBinaryFileName [protected]

Definition at line 117 of file MOOSLogger.h.

std::string CMOOSLogger::m_sExcludeFileName [protected]

Definition at line 114 of file MOOSLogger.h.

std::string CMOOSLogger::m_sHoofCopyName [protected]

Definition at line 120 of file MOOSLogger.h.

std::string CMOOSLogger::m_sLogDirectoryName [protected]

Definition at line 124 of file MOOSLogger.h.

std::string CMOOSLogger::m_sLogRootName [protected]

Definition at line 112 of file MOOSLogger.h.

std::string CMOOSLogger::m_sMissionCopyName [protected]

Definition at line 119 of file MOOSLogger.h.

std::string CMOOSLogger::m_sPath [protected]

Definition at line 122 of file MOOSLogger.h.

std::string CMOOSLogger::m_sStemFileName [protected]

Definition at line 123 of file MOOSLogger.h.

std::string CMOOSLogger::m_sSummaryFile [protected]

Definition at line 160 of file MOOSLogger.h.

std::string CMOOSLogger::m_sSyncFileName [protected]

Definition at line 115 of file MOOSLogger.h.

std::string CMOOSLogger::m_sSystemFileName [protected]

Definition at line 116 of file MOOSLogger.h.

Definition at line 126 of file MOOSLogger.h.

std::ofstream CMOOSLogger::m_SyncLogFile [protected]

Definition at line 107 of file MOOSLogger.h.

std::ofstream CMOOSLogger::m_SystemLogFile [protected]

Definition at line 108 of file MOOSLogger.h.

Definition at line 127 of file MOOSLogger.h.

Definition at line 136 of file MOOSLogger.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines