Homepage Demos Overview Downloads Tutorials Reference
Credits

SensorObserverControl Class Reference

#include <SensorObserverControl.h>

Inheritance diagram for SensorObserverControl:

Inheritance graph
[legend]
List of all members.

Detailed Description

allows logging of sensor information to the console or file

Definition at line 12 of file SensorObserverControl.h.

Public Member Functions

 SensorObserverControl ()
 constructor

virtual ControlBasedoSelect ()
 opens a custom (embedded) menu to toggle individual sensors

virtual void refresh ()
 called when the child has died 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


Protected Member Functions

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

ControlBasehelpCtl
 control containing help info

ControlBasesensorCtl
 control of sensor selectors

ControlBasebuttonCtl
 control of buttons selectors

ControlBaseoutputCtl
 control of outputs selectors

ControlBasedutyCtl
 control of duty selectors

ToggleControlconsoleCtl
 turn logging to the console on and off

StringInputControlfileCtl
 turn logging to a file on and off

unsigned int numListeners
 count of active console or file control so we know if we're actually logging


Private Member Functions

 SensorObserverControl (const SensorObserverControl &)
 don't call

SensorObserverControloperator= (const SensorObserverControl &)
 don't call


Constructor & Destructor Documentation

SensorObserverControl::SensorObserverControl  ) 
 

constructor

Definition at line 11 of file SensorObserverControl.cc.

SensorObserverControl::SensorObserverControl const SensorObserverControl  )  [private]
 

don't call


Member Function Documentation

void SensorObserverControl::checkLogFile  )  [protected]
 

checks to see if logfilePath differs from the StringInputControl's value and switches it if it is

Definition at line 111 of file SensorObserverControl.cc.

Referenced by processEvent(), and refresh().

ControlBase * SensorObserverControl::doSelect  )  [virtual]
 

opens a custom (embedded) menu to toggle individual sensors

Reimplemented from ControlBase.

Definition at line 44 of file SensorObserverControl.cc.

SensorObserverControl& SensorObserverControl::operator= const SensorObserverControl  )  [private]
 

don't call

void SensorObserverControl::processEvent const EventBase event  )  [virtual]
 

sends all events received to stdout and/or logfile

Implements EventListener.

Definition at line 86 of file SensorObserverControl.cc.

void SensorObserverControl::refresh  )  [virtual]
 

called when the child has died 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 80 of file SensorObserverControl.cc.

Referenced by doSelect().


Member Data Documentation

ControlBase* SensorObserverControl::buttonCtl [protected]
 

control of buttons selectors

Definition at line 37 of file SensorObserverControl.h.

Referenced by processEvent(), and SensorObserverControl().

ToggleControl* SensorObserverControl::consoleCtl [protected]
 

turn logging to the console on and off

Definition at line 40 of file SensorObserverControl.h.

Referenced by doSelect(), processEvent(), and SensorObserverControl().

ControlBase* SensorObserverControl::dutyCtl [protected]
 

control of duty selectors

Definition at line 39 of file SensorObserverControl.h.

Referenced by processEvent(), and SensorObserverControl().

StringInputControl* SensorObserverControl::fileCtl [protected]
 

turn logging to a file on and off

Definition at line 41 of file SensorObserverControl.h.

Referenced by checkLogFile(), doSelect(), and SensorObserverControl().

ControlBase* SensorObserverControl::helpCtl [protected]
 

control containing help info

Definition at line 35 of file SensorObserverControl.h.

Referenced by SensorObserverControl().

std::ofstream SensorObserverControl::logfile [protected]
 

if a filename is given, events are logged to here

Definition at line 33 of file SensorObserverControl.h.

Referenced by checkLogFile(), doSelect(), and processEvent().

std::string SensorObserverControl::logfilePath [protected]
 

address of the logfile, if any (empty string is no logfile)

Definition at line 30 of file SensorObserverControl.h.

Referenced by checkLogFile().

unsigned int SensorObserverControl::numListeners [protected]
 

count of active console or file control so we know if we're actually logging

Definition at line 43 of file SensorObserverControl.h.

Referenced by doSelect().

ControlBase* SensorObserverControl::outputCtl [protected]
 

control of outputs selectors

Definition at line 38 of file SensorObserverControl.h.

Referenced by processEvent(), and SensorObserverControl().

ControlBase* SensorObserverControl::sensorCtl [protected]
 

control of sensor selectors

Definition at line 36 of file SensorObserverControl.h.

Referenced by processEvent(), and SensorObserverControl().


The documentation for this class was generated from the following files:
Tekkotsu v2.0
Generated Wed Jan 21 03:23:25 2004 by Doxygen 1.3.4