OpenCurves  0.9

Generates PlotInstance objects for plotting over real-time connections. More...

#include <realtimeplot.h>

Inheritance diagram for RealTimePlot:
PlotGenerator

Classes

struct  RealTimePlotInfo
 Data tracked about a real time source. More...
 

Public Types

enum  { DEFAULT_SAMPLE_LIMIT = 1000000, MAX_READ_BUFFER_SIZE = 4 * 1024 }
 
- Public Types inherited from PlotGenerator
enum  ControlFlag { None = 0, RelativeTime = (1 << 0) }
 Plot generation control flags. Must be set before execution. More...
 

Public Member Functions

 RealTimePlot (Curves *curves, const QStringList &connectionFiles)
 Create a real-time plot generator based on the given connection file set. More...
 
 ~RealTimePlot ()
 Destructor, ensuring the thread is stopped and connections are closed.
 
void appendLoad (const QStringList &connectionFiles)
 Adds additional comm-specs to load (xml files). More...
 
bool pendingLoad (QStringList &pendingFiles)
 Retrieve the list of connection files pending processing. More...
 
void stop ()
 Stop current real-time plots without terminating the thread.
 
- Public Member Functions inherited from PlotGenerator
 PlotGenerator (Curves *curves)
 Instantiate the generator thread to load data into curves. More...
 
virtual ~PlotGenerator ()
 Destructor. The thread should generally be stopped before destructing.
 
const Curvescurves () const
 Access the curves model to load data into.
 
void setTimeColumn (uint number)
 Set the expected time column for all curves created by this generator. More...
 
uint timeColumn () const
 The time column value in used. More...
 
void setTimeScale (double scale)
 Set the scale factor applied to all curves created by this generator. More...
 
double timeScale () const
 Access the time scale used by this generator. More...
 
void setControlFlags (uint flags)
 Sets ControlFlag values for this generator. More...
 
void setControlFlags (uint flags, bool on)
 Set the state of subset of ControlFlag values without affecting other flags. More...
 
uint controlFlags () const
 Access the current ControlFlag values.
 
void quit ()
 Call to request the generator terminate operation.
 
virtual bool isFileLoad () const
 True if this is a file loader. More...
 

Protected Member Functions

void run () override
 Run loop.
 

Additional Inherited Members

- Public Slots inherited from PlotGenerator
void abortLoad ()
 Request loading abort.
 
- Signals inherited from PlotGenerator
void itemName (const QString &name)
 Signal the current item name. More...
 
void itemProgress (int current)
 Update progress through the current item. More...
 
void overallProgress (int current, int total)
 This signal reports overall progress. More...
 
void beginNewCurves ()
 Begin the addition of new curves via Curves::newCurve() Block notification occurs at a per PlotSource level. More...
 
void endNewCurves ()
 End notification of new curves via Curves::newCurve(). More...
 
void loadComplete (int curveCount)
 Notify completion of curve generation. More...
 
- Protected Attributes inherited from PlotGenerator
Curves_curves
 Curves data model.
 
QMutex * _dataMutex
 Data mutex.
 
uint _controlFlags
 ControlFlag values affecting generation.
 
uint _timeColumn
 Index of the time column, zero for none.
 
double _timeScale
 Time scaling factor.
 
bool _abortFlag
 Abort requested?
 

Detailed Description

Generates PlotInstance objects for plotting over real-time connections.

This generator supports loading XML files which identify the real-time connections to make. See Real Time Connection File Format.

This generator is designed to run indefinitely, and will never complete. It can be started immediately with no comm-spec files. It continually checks for new comm-specs provided to appendLoad(). Existing real-time sources can be cleared by calling stop(), leaving the thread running, ready for more appendLoad() calls. Alternatively the entire thread aborted abortLoad() or quit().

Member Enumeration Documentation

anonymous enum
Enumerator
DEFAULT_SAMPLE_LIMIT 

Default sample buffer size limit (element count).

MAX_READ_BUFFER_SIZE 

Default read buffer size (bytes).

Constructor & Destructor Documentation

RealTimePlot::RealTimePlot ( Curves curves,
const QStringList &  connectionFiles 
)

Create a real-time plot generator based on the given connection file set.

Parameters
curvesCurves data model.
connectionFilesXML files defining the connections.

Member Function Documentation

void RealTimePlot::appendLoad ( const QStringList &  connectionFiles)

Adds additional comm-specs to load (xml files).

Parameters
connectionFilesAdditional connections to load.
bool RealTimePlot::pendingLoad ( QStringList &  pendingFiles)

Retrieve the list of connection files pending processing.

Parameters
pendingFilesPopulated with the pending file list.
Returns
True if there are pending files.

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