Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

SensorObserverControl Class Reference

allows logging of sensor information to the console or file More...

#include <SensorObserverControl.h>

Inheritance diagram for SensorObserverControl:

Detailed Description

allows logging of sensor information to the console or file

Definition at line 12 of file SensorObserverControl.h.

List of all members.

Classes

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

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

Constructor & Destructor Documentation

SensorObserverControl::SensorObserverControl (  ) 

constructor

Definition at line 17 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 125 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 47 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 96 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 83 of file SensorObserverControl.cc.

Referenced by doSelect().

void SensorObserverControl::updateRT (  )  [protected]

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

Definition at line 144 of file SensorObserverControl.cc.

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


Friends And Related Function Documentation

friend class RTViewControl [friend]

Definition at line 49 of file SensorObserverControl.h.

Referenced by SensorObserverControl().


Member Data Documentation

control of buttons selectors

Definition at line 59 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().

control of duty selectors

Definition at line 61 of file SensorObserverControl.h.

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

turn logging to a file on and off

Definition at line 63 of file SensorObserverControl.h.

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

control containing help info

Definition at line 57 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 55 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 52 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 67 of file SensorObserverControl.h.

Referenced by doSelect().

control of outputs selectors

Definition at line 60 of file SensorObserverControl.h.

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

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().

control of sensor selectors

Definition at line 58 of file SensorObserverControl.h.

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


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:16 2016 by Doxygen 1.6.3