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

SysLog Class Reference

Collaboration diagram for SysLog:
[legend]
List of all members.

Detailed Description

System logger to write to during information - laptop 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

int getfd ()
 get the file descriptor for the syslog


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.


Static Private Attributes

SysLoginstance
 the one and only instance of sysLog

int sysLogHandle
 the handle returned by opening the System Log

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


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

int SysLog::getfd  ) 
 

get the file descriptor for the syslog

Return values:
the file descriptor for the syslog

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 80 of file sysLog.h.


The documentation for this class was generated from the following file:
Generated on Sat Mar 26 00:07:05 2005 for CS498EmbeddedSystemsProgramming by doxygen 1.3.6