Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
LoadDataThread Class Reference#include <LoadDataThread.h>
Inheritance diagram for LoadDataThread:
![]() Detailed DescriptionProvides resources for loading time-based data from disk.Runs in a separate thread, preloads data into shared memory buffers, and then sends the buffer when the time is right. Thread doesn't start until you set the source or call loadFileList(). Definition at line 18 of file LoadDataThread.h.
Member Typedef Documentation
member function pointer to call on DeviceDriver to get the data sources available for this thread
Member Enumeration Documentation
Definition at line 149 of file LoadDataThread.h.
Constructor & Destructor Documentation
constructor
Definition at line 34 of file LoadDataThread.h.
do not call
Member Function Documentation
sends the next frame as soon as possible, blocking until sent
safe to force the next frame ourselves Definition at line 28 of file LoadDataThread.cc. Referenced by Simulator::incrementTime().
Implements PrimitiveListener. Definition at line 74 of file LoadDataThread.cc. Referenced by dataSourcesUpdated(), and getAvailableDataSources().
Definition at line 85 of file LoadDataThread.h.
Definition at line 86 of file LoadDataThread.h.
Definition at line 87 of file LoadDataThread.h.
Reimplemented from PollThread. Definition at line 127 of file LoadDataThread.cc. Referenced by plistValueChanged(), Simulator::resetSpeedMode(), and setDataSource().
Reimplemented from Thread. Definition at line 132 of file LoadDataThread.cc. Referenced by plistValueChanged(), Simulator::resetSpeedMode(), Simulator::run(), and setDataSource().
recovers data from serialized IPC message, returns beginning of payload, or NULL if there's an error each parameter can be a pointer where to store the field, or NULL if you don't care Definition at line 170 of file LoadDataThread.cc. Referenced by Main::gotCamera().
Definition at line 96 of file LoadDataThread.h.
destructor indicates a data source has been added or removed Implements DeviceDriver::SourceListener. Definition at line 100 of file LoadDataThread.h.
called from constructor to build list of available data source names, resets the source help text
Definition at line 210 of file LoadDataThread.cc. Referenced by LoadDataThread(), loadXML(), plistCollectionEntriesChanged(), plistCollectionEntryAdded(), and plistCollectionEntryRemoved().
Makes a data source eligible for providing data. This is protected because you shouldn't be calling it directly. Instead, set source to the driver instance name, which will cause this to be called via plistValueChanged Definition at line 235 of file LoadDataThread.cc. Referenced by plistValueChanged().
monitor msgr, send new messages when their timestamp indicates they are due, then load upcoming messages
Reimplemented from Thread. Definition at line 271 of file LoadDataThread.cc.
removes and returns first region in regions with only one reference, or NULL if none exists
Definition at line 138 of file LoadDataThread.cc. Referenced by advanceFrame(), runloop(), and sendHeartbeat().
sets up some header info in the specified RCRegion, reallocating if the suggested region is not large enough (or is NULL), returns pointer to end of header info in the region
Definition at line 149 of file LoadDataThread.cc. Referenced by advanceFrame(), runloop(), and sendHeartbeat().
removes our reference to a region created by loadFile()
Definition at line 125 of file LoadDataThread.h. Referenced by setupRegion(), and ~LoadDataThread().
sends an empty heartbeat message indicating previous data should be reused
Definition at line 128 of file LoadDataThread.h. Referenced by advanceFrame(), and runloop().
sends an empty heartbeat message indicating previous data should be reused, assuming that curt is the current time
Definition at line 193 of file LoadDataThread.cc.
returns time of next heartbeat
Definition at line 205 of file LoadDataThread.cc. Referenced by calcSleepTime().
do not call
Member Data Documentation
Names the device driver from which the DataSource will be taken. If you simply provide a device driver name, the first entry of the appropriate data queue will be used. Alternatively, use drivername.entryname to specify a specific data source entry in case the driver has multiple data sources for the queue type. Definition at line 60 of file LoadDataThread.h. Referenced by dataSourcesUpdated(), getAvailableDataSources(), LoadDataThread(), plistValueChanged(), and Simulator::run().
frames per second to send -- this is only a suggestion to hardware devices, which generally use their 'native' framerate, but may use this to limit data flow
Definition at line 63 of file LoadDataThread.h. Referenced by calcNextHeartbeat(), LoadDataThread(), plistValueChanged(), runloop(), setDataSource(), and ~LoadDataThread().
Controls how much feedback to give on the console regarding progress.
0 - none Definition at line 71 of file LoadDataThread.h. Referenced by advanceFrame(), LoadDataThread(), plistValueChanged(), runloop(), sendHeartbeat(), setDataSource(), setupRegion(), and ~LoadDataThread().
if enabled, an empty "heartbeat" message is sent at the appropriate framerate, even if no data is being processed (i.e. no data loaded or out of frames); this will cause an update event within the simulator, repeating processing on the previous data.
Definition at line 74 of file LoadDataThread.h. Referenced by advanceFrame(), Simulator::getNextFrame(), LoadDataThread(), plistValueChanged(), runloop(), and start().
if true, no frames will be sent, except via explicit (external) calls to advanceFrame(); if false, the thread will run and send messages at the requested times
Definition at line 77 of file LoadDataThread.h. Referenced by advanceFrame(), Simulator::getNextFrame(), LoadDataThread(), plistValueChanged(), runloop(), setDataSource(), start(), and ~LoadDataThread(). for efficiency, reuse old buffers -- oldest at front, most recently used at back
Definition at line 138 of file LoadDataThread.h. Referenced by advanceFrame(), firstUnusedRegion(), runloop(), sendHeartbeat(), and ~LoadDataThread().
member function pointer to be called on DeviceDriver to get its available data sources
Definition at line 141 of file LoadDataThread.h. Referenced by getAvailableDataSources(), and plistValueChanged().
the MessageQueue through which to send the data
Definition at line 143 of file LoadDataThread.h. Referenced by advanceFrame(), plistValueChanged(), runloop(), and sendHeartbeat().
allows mutual exclusion over this object's member variables
Definition at line 144 of file LoadDataThread.h. Referenced by advanceFrame(), plistValueChanged(), runloop(), and ~LoadDataThread().
timestamp of most recently sent message (or heartbeat); -1 if hasn't sent any from current source
Definition at line 145 of file LoadDataThread.h. Referenced by advanceFrame(), calcNextHeartbeat(), runloop(), sendHeartbeat(), and setDataSource().
serial number of next message to send
Definition at line 146 of file LoadDataThread.h. Referenced by setupRegion().
serial number of the last data from curDS; 0 if hasn't received any from current source
Definition at line 147 of file LoadDataThread.h. Referenced by advanceFrame(), runloop(), and setDataSource().
set to true by start(), false by stop(), but reset if we call start or stop ourselves based on changes to freeze or heartbeat
Definition at line 148 of file LoadDataThread.h. Referenced by plistValueChanged(), setDataSource(), start(), and stop().
Referenced by advanceFrame(), runloop(), and stop().
pointer to the current data source
Definition at line 156 of file LoadDataThread.h. Referenced by advanceFrame(), getDataSource(), nextName(), nextTimestamp(), plistValueChanged(), runloop(), sendHeartbeat(), and setDataSource().
pointer to the data source's driver
Definition at line 157 of file LoadDataThread.h. Referenced by setDataSource().
The documentation for this class was generated from the following files: |
Tekkotsu Hardware Abstraction Layer 4.0 |
Generated Thu Nov 22 01:01:22 2007 by Doxygen 1.5.4 |