Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
FileSystemDataSource Class ReferenceManages the loading of a series of files from disk. More...
Inheritance diagram for FileSystemDataSource:
Detailed DescriptionManages the loading of a series of files from disk. Can handle an index file listing other data files and their timestamps, a directory holding a set of files, or a single explicit file. Definition at line 17 of file FileSystemDataSource.h.
Member Typedef Documentationtype of files, the list of files to load Definition at line 98 of file FileSystemDataSource.h. Constructor & Destructor Documentation
constructor Definition at line 20 of file FileSystemDataSource.h.
destructor Definition at line 21 of file FileSystemDataSource.cc.
don't call Member Function Documentation
Called when the simulator is stepping while paused or advancing a frozen data source, return true if successful, or false if no more data is available. Implements DataSource. Definition at line 41 of file FileSystemDataSource.cc. Referenced by DataThread::run(), and setFrame().
adds up the lifetime of all files, plus initialDelay Definition at line 257 of file FileSystemDataSource.cc. Referenced by loadFileList().
empties files Definition at line 277 of file FileSystemDataSource.cc. Referenced by loadFileList(), LoggedDataDriver::plistValueChanged(), and ~FileSystemDataSource().
User hook, called when the data source should release its claim on outputs with feedback (ignoringOuput()). It would be wise to call this from your destructor as well. Reimplemented from DataSource. Reimplemented in FileSystemSensorSource. Definition at line 96 of file FileSystemDataSource.cc.
user hook for when frozen is set to true; advance() will be called by simulator at user discretion. Reimplemented from DataSource. Definition at line 120 of file FileSystemDataSource.cc.
user hook for when frozen is set to false; if enteringRealtime() has been called then you should resume sending data. Reimplemented from DataSource. Definition at line 124 of file FileSystemDataSource.cc.
creates a new entry on files, virtual to allow subclasses to use a FileInfo subclass with more meta data (e.g. see FileSystemImageSource::ImageInfo) Reimplemented in FileSystemImageSource, and FileSystemSensorSource. Definition at line 168 of file FileSystemDataSource.h. Referenced by loadFileListFromDirectory(), loadFileListFromIndex(), and loadSingleFile().
User hook, called when the controller is going to be running in realtime mode, which is probably the normal mode you'd expect. You might be in realtime mode, but a debugger breakpoint will still pause things, or thread scheduling could hiccup, so try to be robust. Reimplemented from DataSource. Definition at line 108 of file FileSystemDataSource.cc.
returns the total time taken to loop over the files
Definition at line 54 of file FileSystemDataSource.h. Referenced by advance(), nextFrame(), LoggedDataDriver::plistValueChanged(), and setLoopTime().
returns the target path, either path, or parent.path if path is empty Definition at line 144 of file FileSystemDataSource.cc. Referenced by loadFileList(), loadFileListFromDirectory(), loadFileListFromIndex(), and LoggedDataDriver::plistValueChanged().
returns registered Definition at line 40 of file FileSystemDataSource.h. Referenced by LoggedDataDriver::plistValueChanged().
User hook, called when leaving realtime mode, which means you have no idea when motionCheck() is going to be called in terms of wall-clock time. Argument set to true if entering full speed mode, which indicates everything should run at full native "frame rate", and may indicate more data will be processed than normal, CPU speed permitting. However, if false, almost certainly indicates updates will be sparse, trigger by user 'step' commands. May be called multiple times if changing between full-speed mode and paused A non-realtime mode might be triggered if the user wants to pause the simulator/controller to step through something... No guarantees though! The debugger might catch a breakpoint and stop things, and this won't be called! Reimplemented from DataSource. Definition at line 112 of file FileSystemDataSource.cc. Referenced by deregisterSource(), and ~FileSystemDataSource(). call this to (re)load the list of available file names from disk If clearCurrent is set, then the current file list will be cleared; otherwise, the loaded files will be appended to the current queue Definition at line 146 of file FileSystemDataSource.cc. Referenced by LoggedDataDriver::plistValueChanged(), plistValueChanged(), and plistValueTouched().
load a list of files from a directory specified by path Definition at line 338 of file FileSystemDataSource.cc. Referenced by loadFileList().
load a list of files from an index file specified by path This supports either the format produced by VisionGUI, or a simplier ' Definition at line 401 of file FileSystemDataSource.cc. Referenced by loadFileList().
load a single file Definition at line 332 of file FileSystemDataSource.cc. Referenced by loadFileList().
Definition at line 321 of file FileSystemDataSource.cc.
increments curfile to the next frame, preparing (pre-loads) numPreload frames from the new curfile onward Definition at line 229 of file FileSystemDataSource.cc. Referenced by advance().
Returns a descriptive name of the next data segment for user feedback (e.g. a filename for logged data). Just use your class name if you don't have a useful name for individual samples. Implements DataSource. Definition at line 32 of file FileSystemDataSource.cc.
Returns the simulator time of the next data segment. Should be in the future if nothing new since last data segment, otherwise should be the timestamp of the most recent data segment (older segments are skipped), return -1U if there is no more data Implements DataSource. Definition at line 28 of file FileSystemDataSource.cc. Referenced by plistValueChanged(), resetPoller(), and DataThread::run().
don't call
Implements PrimitiveListener. Definition at line 294 of file FileSystemDataSource.cc. Referenced by loadXML(), and registerSource().
Reimplemented from PrimitiveListener. Definition at line 288 of file FileSystemDataSource.cc.
calls prepare on fi, dumping diagnostic info if verbose is high enough Definition at line 556 of file FileSystemDataSource.cc. Referenced by advance(), loadFileList(), nextFrame(), and setFrame().
User hook, called when the data source should claim which outputs it provides feedback (providingOuput()). Does not indicate the data source should start sending updates yet — wait for enteringRealtime() or advance() to be called Reimplemented from DataSource. Reimplemented in FileSystemSensorSource. Definition at line 85 of file FileSystemDataSource.cc.
Definition at line 129 of file FileSystemDataSource.cc. Referenced by doFreeze(), doUnfreeze(), enteringRealtime(), loadFileList(), and plistValueChanged().
Gives the data referenced by curfile to the simulator. Implemented in FileSystemImageSource, and FileSystemSensorSource. Referenced by advance().
sets the next frame to be sent (e.g. pass 0 to reset to the first frame) prepares (pre-loads) numPreload frames from the new curfile onward Definition at line 210 of file FileSystemDataSource.cc.
adds time to the final frame to increase total sequence time to t milliseconds Definition at line 265 of file FileSystemDataSource.cc. Referenced by LoggedDataDriver::plistValueChanged().
returns indexed Definition at line 57 of file FileSystemDataSource.h. Referenced by plistValueChanged(). Member Data Documentation
time it would take to run through all of the loaded frames Definition at line 178 of file FileSystemDataSource.h. Referenced by clearFiles(), getLoopTime(), loadFileList(), and setLoopTime().
an iterator referencing files -- indicates next file to send Definition at line 171 of file FileSystemDataSource.h. Referenced by advance(), clearFiles(), loadFileList(), nextFrame(), nextName(), nextTimestamp(), plistValueChanged(), preprepare(), and setFrame().
a regular expression (POSIX.2 extended format) to select which files to load from path, if path is a directory or index file Definition at line 80 of file FileSystemDataSource.h. Referenced by deregisterSource(), FileSystemDataSource(), loadFileList(), loadFileListFromDirectory(), loadFileListFromIndex(), plistValueChanged(), and registerSource(). Definition at line 170 of file FileSystemDataSource.h. Referenced by advance(), calcLoopTime(), clearFiles(), FileSystemSensorSource::enqueueFile(), FileSystemImageSource::enqueueFile(), enqueueFile(), loadFileList(), loadFileListFromIndex(), nextFrame(), nextName(), nextTimestamp(), plistValueChanged(), preprepare(), setFrame(), and setLoopTime(). The sensors updates per second which should be loaded. Note this is limited by the global Sensors.Framerate setting. Definition at line 86 of file FileSystemDataSource.h. Referenced by deregisterSource(), FileSystemDataSource(), loadFileListFromDirectory(), loadFileListFromIndex(), loadSingleFile(), plistValueChanged(), and registerSource().
time at which doFreeze was called Definition at line 175 of file FileSystemDataSource.h. Referenced by doFreeze(), doUnfreeze(), loadFileList(), and setFrame(). true if the file list was specified by an index file Definition at line 174 of file FileSystemDataSource.h. Referenced by loadFileListFromDirectory(), loadFileListFromIndex(), loadSingleFile(), and usingIndexFile().
milliseconds to wait before sending first frame Definition at line 172 of file FileSystemDataSource.h. Referenced by calcLoopTime(), clearFiles(), loadFileListFromIndex(), nextFrame(), and preprepare().
don't be in advance() while modifying file list Definition at line 180 of file FileSystemDataSource.h. Referenced by advance(), clearFiles(), loadFileList(), loadFileListFromDirectory(), loadFileListFromIndex(), loadSingleFile(), nextFrame(), resetPoller(), setFrame(), and ~FileSystemDataSource(). controls whether to restart curfile at the beginning of files when it reaches the end Definition at line 83 of file FileSystemDataSource.h. Referenced by deregisterSource(), FileSystemDataSource(), nextFrame(), plistValueChanged(), registerSource(), and setFrame().
maximum number of data elements to try to keep 'active'. If there's more than this in files, we'll only load one at time, and immediately release it afterward Definition at line 97 of file FileSystemDataSource.h. Referenced by nextFrame(), and setFrame().
time it would take to run through all of the frames as set immediately after load (i.e. no setLoopTime()) Definition at line 179 of file FileSystemDataSource.h. Referenced by clearFiles(), getLoopTime(), and loadFileList().
timestamp that curfile should be sent Definition at line 173 of file FileSystemDataSource.h. Referenced by advance(), deregisterSource(), doUnfreeze(), loadFileList(), loadFileListFromIndex(), nextFrame(), nextTimestamp(), plistValueChanged(), preprepare(), registerSource(), FileSystemImageSource::sendData(), and setFrame().
device driver this is a member of Definition at line 177 of file FileSystemDataSource.h. Referenced by getUsedPath(), nextFrame(), and plistValueChanged().
The directory, data file, or index file from which to load via call to loadFileListFromDirectory(), loadSingleFile(), or loadFileListFromIndex(). A single file can be either a single data file (e.g. sensor or camera image), or an index file as output by VisionGUI, or in the format 'filename <tab> time', where 'filename' is an absolute path or relative to the directory containing the index file, and 'time' is in milliseconds, relative to the time at which the index file is loaded. Definition at line 77 of file FileSystemDataSource.h. Referenced by deregisterSource(), FileSystemDataSource(), getUsedPath(), loadXML(), LoggedDataDriver::LoggedDataDriver(), LoggedDataDriver::plistValueChanged(), plistValueChanged(), plistValueTouched(), and registerSource().
Referenced by leavingRealtime(), plistValueChanged(), and resetPoller().
synced to registerSource/deregisterSource so we don't start the thread if not actually in use Definition at line 181 of file FileSystemDataSource.h. Referenced by deregisterSource(), isRegistered(), registerSource(), and resetPoller().
simulator's timeScale parameter, so we can register for updates when it changes Definition at line 176 of file FileSystemDataSource.h. Referenced by deregisterSource(), enteringRealtime(), leavingRealtime(), plistValueChanged(), resetPoller(), and ~FileSystemDataSource().
Controls how much feedback to give on the console regarding progress. 0 - none Definition at line 94 of file FileSystemDataSource.h. Referenced by advance(), FileSystemDataSource(), nextFrame(), and preprepare(). The documentation for this class was generated from the following files: |
Tekkotsu Hardware Abstraction Layer 5.1CVS |
Generated Mon May 9 05:01:41 2016 by Doxygen 1.6.3 |