EventLogger Class Reference#include <EventLogger.h>
Inheritance diagram for EventLogger:
[legend]List of all members.
Detailed Description
allows logging of events to the console or a file
Definition at line 13 of file EventLogger.h.
|
Public Member Functions |
| EventLogger () |
| constructor
|
virtual | ~EventLogger () |
virtual ControlBase * | doSelect () |
| opens a custom (embedded) menu to toggle individual EGIDs
|
virtual void | refresh () |
| called when the child has deactivated and this control should refresh its display, or some other event (such as the user pressing the refresh button) has happened to cause a refresh to be needed
|
virtual void | processEvent (const EventBase &event) |
| sends all events received to stdout and/or logfile
|
Static Public Member Functions |
static class Socket * | getLogSocket () |
| returns logSocket
|
static int | getLogSocketPort () |
| returns port
|
static void | setLogSocketPort (int p) |
| sets port
|
static void | logImage (FilterBankGenerator &fbg, unsigned int layer, unsigned int channel, const BehaviorBase *source=NULL) |
| send the current camera image over the log socket
|
static void | logMessage (std::string msg, const BehaviorBase *source=NULL, const char *icon=NULL, unsigned int placement=0) |
| send a string over the log socket
|
static void | logWebcam (const BehaviorBase *source=NULL) |
| request that the desktop side take a picture with the webcam (if available)
|
Protected Member Functions |
virtual void | clearSlots () |
| deletes each slot item and clears the slots
|
void | setStatus (unsigned int i, char c) |
| sets the status char of slot i to c
|
void | checkLogFile () |
| checks to see if logfilePath differs from the StringInputControl's value and switches it if it is
|
Protected Attributes |
std::string | logfilePath |
| address of the logfile, if any (empty string is no logfile)
|
std::ofstream | logfile |
| if a filename is given, events are logged to here
|
unsigned int | verbosity |
| controls the level of verbosity - currently 0 through 2
|
Static Protected Attributes |
static class Socket * | logSocket = NULL |
| events which are logged will be sent over this port in an xml format. See eventlog.dtd in the docs directory
|
static int | port = 10080 |
| port number logSocket will listen on
|
static unsigned int | logSocketRefCount = 0 |
| reference count for logSocket -- when this hits 0, close the socket
|
Constructor & Destructor Documentation
EventLogger::EventLogger |
( |
|
) |
|
|
EventLogger::~EventLogger |
( |
|
) |
[virtual] |
|
Member Function Documentation
void EventLogger::checkLogFile |
( |
|
) |
[protected] |
|
void EventLogger::clearSlots |
( |
|
) |
[protected, virtual] |
|
|
opens a custom (embedded) menu to toggle individual EGIDs
Reimplemented from ControlBase.
Definition at line 47 of file EventLogger.cc. |
static class Socket* EventLogger::getLogSocket |
( |
|
) |
[inline, static] |
|
static int EventLogger::getLogSocketPort |
( |
|
) |
[inline, static] |
|
|
send the current camera image over the log socket
Definition at line 117 of file EventLogger.cc. |
void EventLogger::logMessage |
( |
std::string |
msg, |
|
|
const BehaviorBase * |
source = NULL , |
|
|
const char * |
icon = NULL , |
|
|
unsigned int |
placement = 0 |
|
) |
[static] |
|
void EventLogger::logWebcam |
( |
const BehaviorBase * |
source = NULL |
) |
[static] |
|
|
request that the desktop side take a picture with the webcam (if available)
Definition at line 176 of file EventLogger.cc. |
void EventLogger::processEvent |
( |
const EventBase & |
event |
) |
[virtual] |
|
void EventLogger::refresh |
( |
|
) |
[virtual] |
|
|
called when the child has deactivated and this control should refresh its display, or some other event (such as the user pressing the refresh button) has happened to cause a refresh to be needed
Reimplemented from ControlBase.
Definition at line 82 of file EventLogger.cc.
Referenced by doSelect(). |
static void EventLogger::setLogSocketPort |
( |
int |
p |
) |
[inline, static] |
|
void EventLogger::setStatus |
( |
unsigned int |
i, |
|
|
char |
c |
|
) |
[protected] |
|
Member Data Documentation
The documentation for this class was generated from the following files:
|