Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

SysLog Class Reference

List of all members.

Detailed Description

System logger to write to during information - via version.

Definition at line 12 of file sysLog.h.

Public Types

enum  status {
  OPEN = 1,
  CLOSED = 0,
  RECORDING = 2,
  ERROR = -1
}
 enumeration for the status of the sysLog More...


Public Member Functions

int openSysLog ()
 spawns the sysLogName and opens the Log

int closeSysLog ()
 closes the system Log

int copySysLog (char *newFile)
 creates a complete copy of the current system Log based on the location specified

int sysLogWrite (char *message)
 writes to the system Log

char * getSysLogName ()
 returns the complete path and name of the systemLogger


Static Public Member Functions

SysLogtheInstance ()
 returns pointer to the only instance


Public Attributes

tm * logTime
 time stuct from when the log was opened


Protected Member Functions

 SysLog ()
 brief constructor of singleton class

 ~SysLog ()
 brief destructor for the SysLog class


Private Attributes

char * sysLogName
 name of the System Log file.

status LogStatus
 status of the System Log - defined in sensorManager.h


Static Private Attributes

int sysLogHandle
 the handle returned by opening the System Log


Member Enumeration Documentation

enum SysLog::status
 

enumeration for the status of the sysLog

Enumeration values:
OPEN  the log is open
CLOSED  The log is closed.
RECORDING  The log is recording.
ERROR  Error opening the log.

Definition at line 29 of file sysLog.h.


Member Function Documentation

int SysLog::closeSysLog  ) 
 

closes the system Log

Return values:
-1 on error
1 on success

int SysLog::copySysLog char *  newFile  ) 
 

creates a complete copy of the current system Log based on the location specified

Parameters:
newFile to copy the current sysLog to
Return values:
the new file handle
-1 on error

char* SysLog::getSysLogName  ) 
 

returns the complete path and name of the systemLogger

Return values:
the path of the systemLogger

int SysLog::openSysLog  ) 
 

spawns the sysLogName and opens the Log

Return values:
on success returns sysLogHandle
on failure returns -1

int SysLog::sysLogWrite char *  message  ) 
 

writes to the system Log

Parameters:
message to write to the log
Return values:
0 on sucess,
-1 for error

SysLog* SysLog::theInstance  )  [static]
 

returns pointer to the only instance

Return values:
the singleton instance of the systemLogger


Member Data Documentation

struct tm* SysLog::logTime
 

time stuct from when the log was opened

Return values:
the time the log was opened

Definition at line 81 of file sysLog.h.


The documentation for this class was generated from the following file:
Generated on Fri Mar 25 23:48:46 2005 for CS498EmbeddedSystemsProgramming by doxygen 1.3.6