Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

SensorObserverControl Class Reference

#include <SensorObserverControl.h>

Inheritance diagram for SensorObserverControl:

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 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

Protected Member Functions

void checkLogFile ()
 checks to see if logfilePath differs from the StringInputControl's value and switches it if it is
void updateRT ()
 update the real-time sub-control view (rtCtl)

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
RTViewControlrtCtl
 a submenu containing real-time view of current values
StringInputControlrtFreqCtl
 the frequency at which rtCtl should be updated
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

Friends

class RTViewControl

Classes

class  RTViewControl
 The real time view for SensorObserverControl is split into a separate class for more straightfoward handling of refreshes. More...

Constructor & Destructor Documentation

SensorObserverControl::SensorObserverControl (  ) 

constructor

Definition at line 12 of file SensorObserverControl.cc.

SensorObserverControl::SensorObserverControl ( const SensorObserverControl  )  [private]

don't call


Member Function Documentation

ControlBase * SensorObserverControl::doSelect (  )  [virtual]

opens a custom (embedded) menu to toggle individual sensors

Reimplemented from ControlBase.

Definition at line 41 of file SensorObserverControl.cc.

void SensorObserverControl::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 77 of file SensorObserverControl.cc.

Referenced by doSelect().

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

sends all events received to stdout and/or logfile

Implements EventListener.

Definition at line 90 of file SensorObserverControl.cc.

void SensorObserverControl::checkLogFile (  )  [protected]

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

Definition at line 119 of file SensorObserverControl.cc.

Referenced by processEvent(), and refresh().

void SensorObserverControl::updateRT (  )  [protected]

update the real-time sub-control view (rtCtl)

Definition at line 138 of file SensorObserverControl.cc.

Referenced by SensorObserverControl::RTViewControl::refresh().

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

don't call


Friends And Related Function Documentation

friend class RTViewControl [friend]

Definition at line 49 of file SensorObserverControl.h.

Referenced by SensorObserverControl().


Member Data Documentation

std::string SensorObserverControl::logfilePath [protected]

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

Definition at line 52 of file SensorObserverControl.h.

Referenced by checkLogFile().

std::ofstream SensorObserverControl::logfile [protected]

if a filename is given, events are logged to here

Definition at line 55 of file SensorObserverControl.h.

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

control containing help info

Definition at line 57 of file SensorObserverControl.h.

Referenced by SensorObserverControl().

control of sensor selectors

Definition at line 58 of file SensorObserverControl.h.

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

control of buttons selectors

Definition at line 59 of file SensorObserverControl.h.

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

control of outputs selectors

Definition at line 60 of file SensorObserverControl.h.

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

control of duty selectors

Definition at line 61 of file SensorObserverControl.h.

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

turn logging to the console on and off

Definition at line 62 of file SensorObserverControl.h.

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

turn logging to a file on and off

Definition at line 63 of file SensorObserverControl.h.

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

a submenu containing real-time view of current values

Definition at line 64 of file SensorObserverControl.h.

Referenced by refresh(), SensorObserverControl(), and updateRT().

the frequency at which rtCtl should be updated

Definition at line 65 of file SensorObserverControl.h.

Referenced by refresh(), and SensorObserverControl().

unsigned int SensorObserverControl::numListeners [protected]

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

Definition at line 67 of file SensorObserverControl.h.

Referenced by doSelect().


The documentation for this class was generated from the following files:

Tekkotsu v4.0
Generated Thu Nov 22 00:58:41 2007 by Doxygen 1.5.4