Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

LogNode Class Reference

On activation, start logging data to disk as a series of image and/or sensor files. More...

#include <LogNode.h>

Inheritance diagram for LogNode:

Detailed Description

On activation, start logging data to disk as a series of image and/or sensor files.

Definition at line 10 of file LogNode.h.

List of all members.

Public Member Functions

 LogNode ()
 default constructor, use type name as instance name
 LogNode (const std::string &nm)
 constructor, take an instance name
virtual void postStart ()
 Called by start() after the doStart(), allows superclasses to complete initialization.
virtual void doEvent ()
 Delegate function for event processing, the event itself is pointed to (only for the duration of the doEvent() call!) by event.
virtual void stop ()
 Just like a behavior, called when it's time to stop doing your thing.
virtual void writeImage (unsigned int time, class FilterBankGenerator &fbk, bool isPNG)
virtual void writeSensor (unsigned int time)
virtual std::string getDescription () const
 Gives a short description of what this particular instantiation does (in case a more specific description is needed on an individual basis).

Static Public Member Functions

static std::string getClassDescription ()
 Gives a short description of what this class of behaviors does... you should override this (but don't have to).

Public Attributes

plist::Primitive< std::string > basepath
plist::Primitive< std::string > basename
plist::Primitive< bool > incrementNameIfExists
plist::Primitive< bool > logSensors
plist::Primitive< bool > logImages
plist::Primitive< bool > initial
plist::Primitive< std::string > compression

Protected Attributes

std::ofstream indexFile
std::string path
unsigned int startTime
unsigned int fileCount
unsigned int imageStartFrame
unsigned int sensorStartFrame

Private Member Functions

 LogNode (const LogNode &)
 don't call (copy constructor)
LogNodeoperator= (const LogNode &)
 don't call (assignment operator)

Constructor & Destructor Documentation

LogNode::LogNode (  ) 

default constructor, use type name as instance name

Definition at line 17 of file LogNode.h.

LogNode::LogNode ( const std::string &  nm  ) 

constructor, take an instance name

Definition at line 25 of file LogNode.h.

LogNode::LogNode ( const LogNode  )  [private]

don't call (copy constructor)


Member Function Documentation

void LogNode::doEvent (  )  [virtual]

Delegate function for event processing, the event itself is pointed to (only for the duration of the doEvent() call!) by event.

Default implementation watches for 'private' text message events (those forwarded by a BehaviorSwitchControl from ControllerGUI input) and will publically rebroadcast them. The idea is that your own processEvent gets first dibs, but if the behavior doesn't handle the text message, it will be handed off for others.

Reimplemented from BehaviorBase.

Definition at line 115 of file LogNode.cc.

static std::string LogNode::getClassDescription (  )  [static]

Gives a short description of what this class of behaviors does... you should override this (but don't have to).

If you do override this, also consider overriding getDescription() to return it

Reimplemented from BehaviorBase.

Definition at line 65 of file LogNode.h.

Referenced by getDescription().

virtual std::string LogNode::getDescription (  )  const [virtual]

Gives a short description of what this particular instantiation does (in case a more specific description is needed on an individual basis).

By default simply returns getName(), because any calls from a BehaviorBase function to getClassDescription() are going to call BehaviorBase::getClassDescription(), not ~YourSubClass~getClassDescription(), because static functions can't be virtual in C++ (doh!)

This means that getDescription called on a pointer to a BehaviorBase of unknown subtype would always return an empty string, which is pretty useless. So instead we return the name in this situation. If you want getDescription to return getClassDescription, you'll have to override it in your subclass to do so.

Reimplemented from BehaviorBase.

Definition at line 66 of file LogNode.h.

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

don't call (assignment operator)

void LogNode::postStart (  )  [virtual]

Called by start() after the doStart(), allows superclasses to complete initialization.

For robustness to future change, subclasses should be sure to call the superclass implementation.

Reimplemented from BehaviorBase.

Definition at line 24 of file LogNode.cc.

void LogNode::stop (  )  [virtual]

Just like a behavior, called when it's time to stop doing your thing.

Reimplemented from StateNode.

Definition at line 137 of file LogNode.cc.

void LogNode::writeImage ( unsigned int  time,
class FilterBankGenerator fbk,
bool  isPNG 
) [virtual]

Definition at line 142 of file LogNode.cc.

Referenced by doEvent(), and postStart().

void LogNode::writeSensor ( unsigned int  time  )  [virtual]

Definition at line 163 of file LogNode.cc.

Referenced by doEvent(), and postStart().


Member Data Documentation

Definition at line 38 of file LogNode.h.

Referenced by postStart(), writeImage(), and writeSensor().

Definition at line 37 of file LogNode.h.

Referenced by postStart().

Definition at line 43 of file LogNode.h.

Referenced by postStart().

unsigned int LogNode::fileCount [protected]

Definition at line 49 of file LogNode.h.

Referenced by postStart(), writeImage(), and writeSensor().

unsigned int LogNode::imageStartFrame [protected]

Definition at line 50 of file LogNode.h.

Referenced by postStart(), and writeImage().

Definition at line 39 of file LogNode.h.

Referenced by postStart().

std::ofstream LogNode::indexFile [protected]

Definition at line 46 of file LogNode.h.

Referenced by postStart(), stop(), writeImage(), and writeSensor().

Definition at line 42 of file LogNode.h.

Referenced by postStart().

Definition at line 41 of file LogNode.h.

Referenced by postStart().

Definition at line 40 of file LogNode.h.

Referenced by postStart().

std::string LogNode::path [protected]

Definition at line 47 of file LogNode.h.

Referenced by postStart(), writeImage(), and writeSensor().

unsigned int LogNode::sensorStartFrame [protected]

Definition at line 51 of file LogNode.h.

Referenced by postStart(), and writeSensor().

unsigned int LogNode::startTime [protected]

Definition at line 48 of file LogNode.h.

Referenced by postStart(), writeImage(), and writeSensor().


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

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