cumbia-qtcontrols 1.x
Qt widgets on top of the cumbia C++ library
Public Member Functions | List of all members
CuControlsReaderA Class Referenceabstract

abstract class defining an interface for cumbia-qtcontrols readers More...

#include <cucontrolsreader_abs.h>

Public Member Functions

 CuControlsReaderA (Cumbia *c, CuDataListener *l)
 
virtual ~CuControlsReaderA ()
 
virtual void setSource (const QString &s)=0
 connect the specified source to the control system engine and start reading. More...
 
virtual QString source () const =0
 returns the name of the source More...
 
virtual void unsetSource ()=0
 disconnect the source More...
 
virtual void sendData (const CuData &d)=0
 send data to the reader More...
 
virtual void getData (CuData &d_ino) const =0
 get data from the reader More...
 
Cumbia * getCumbia () const
 returns a pointer to the Cumbia implementation that was passed to the class constructor More...
 
CuDataListener * getDataListener () const
 return the CuDataListener that was specified in the constructor. More...
 

Detailed Description

abstract class defining an interface for cumbia-qtcontrols readers

This abstract class defines an interface for readers. cumbia-qtcontrols readers do not know about the engine used to connect and read from the control system.

The method getCumbia returns a pointer to the Cumbia engine currently used by the reader. getDataListener returns a pointer to the CuDataListener that is listening for read updates. The CuDataListener and the Cumbia engine are passed to CuControlsReaderA in the constructor.

All the other are pure virtual methods that must be implemented in the subclass.

Constructor & Destructor Documentation

◆ CuControlsReaderA()

CuControlsReaderA::CuControlsReaderA ( Cumbia *  c,
CuDataListener *  l 
)
inline

the class constructor initialises the reader.

Parameters
ca pointer to the Cumbia instance in use.
la CuDataListener that will receive updates.
Note both parameters must be not null

◆ ~CuControlsReaderA()

virtual CuControlsReaderA::~CuControlsReaderA ( )
inlinevirtual

Member Function Documentation

◆ getCumbia()

Cumbia * CuControlsReaderA::getCumbia ( ) const
inline

returns a pointer to the Cumbia implementation that was passed to the class constructor

Returns
a pointer to the Cumbia implementation used by the reader

◆ getData()

virtual void CuControlsReaderA::getData ( CuData &  d_ino) const
pure virtual

get data from the reader

Parameters
d_inoa bundle of key/value pairs defining the data to send to the reader and containing the results filled by the reader once the function returns

Referenced by CuContext::getData().

◆ getDataListener()

CuDataListener * CuControlsReaderA::getDataListener ( ) const
inline

return the CuDataListener that was specified in the constructor.

Returns
the CuDataListener that receives new data updates.

◆ sendData()

virtual void CuControlsReaderA::sendData ( const CuData &  d)
pure virtual

send data to the reader

Parameters
da bundle of key/value pairs defining the data to send to the reader
See also
getData

Referenced by CuContext::sendData().

◆ setSource()

virtual void CuControlsReaderA::setSource ( const QString &  s)
pure virtual

connect the specified source to the control system engine and start reading.

Parameters
sthe name of the source. The syntax depends on the engine.

Subclasses can check the parameter to ensure that its form is valid.

Referenced by QuPlotCommon::addSource(), CuEngineHotSwitch::hot_switch(), QuCheckBox::setSource(), QuCircularGauge::setSource(), QuLabel::setSource(), QuLed::setSource(), QuLinearGauge::setSource(), QuTable::setSource(), QuWatcher::setSource(), and QuPlotCommon::setSources().

◆ source()

virtual QString CuControlsReaderA::source ( ) const
pure virtual

returns the name of the source

Returns
the name of the source configured with setSource.

If wildcards were used in setSource, source will return the complete source, with the substitutions.

Referenced by CuContext::disposeReader(), CuContext::findReader(), CuEngineHotSwitch::hot_switch(), QmlReaderBackend::source(), QuPlotCommon::sources(), QuSpectrumPlot::unsetSources(), and QuTrendPlot::unsetSources().

◆ unsetSource()

virtual void CuControlsReaderA::unsetSource ( )
pure virtual

disconnect the source

stop reading.

Referenced by CuContext::disposeReader().


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