qumbia-tango-controls 1.x
Library on top of cumbia-qtcontrols and cumbia-tango
Public Member Functions | List of all members
CuTReaderFactory Class Reference

this factory creates Tango readers. Options can be set. More...

#include <cutcontrolsreader.h>

Inheritance diagram for CuTReaderFactory:
Inheritance graph
[legend]

Public Member Functions

 CuTReaderFactory ()
 
virtual ~CuTReaderFactory ()
 the class destructor More...
 
CuControlsReaderA * create (Cumbia *c, CuDataListener *l) const
 creates and returns a new CuTControlsReader, configured with the given Cumbia and CuDataListener. More...
 
void setOptions (const CuData &o)
 
CuData getOptions () const
 returns the options set with setOptions, or an empty CuData. More...
 
CuControlsReaderFactoryI * clone () const
 clones the reader factory, allocating a new one with the same options More...
 

Detailed Description

this factory creates Tango readers. Options can be set.

Given a pointer to a Cumbia object and a CuDataListener, the create method instantiates and returns a CuTControlsReader, that implements CuControlsReaderA interface. If setOptions is called before create, the options are set on the CuTControlsReader.

Constructor & Destructor Documentation

◆ CuTReaderFactory()

CuTReaderFactory::CuTReaderFactory ( )

the class constructor

Referenced by clone().

◆ ~CuTReaderFactory()

CuTReaderFactory::~CuTReaderFactory ( )
virtual

the class destructor

Member Function Documentation

◆ clone()

CuControlsReaderFactoryI * CuTReaderFactory::clone ( ) const

clones the reader factory, allocating a new one with the same options

Returns
a new CuTReaderFactory with options copied from this object

References CuTReaderFactory().

◆ create()

CuControlsReaderA * CuTReaderFactory::create ( Cumbia *  c,
CuDataListener *  l 
) const

creates and returns a new CuTControlsReader, configured with the given Cumbia and CuDataListener.

Call setOptions before create to configure the reader.

Parameters
ca pointer to the Cumbia object
la pointer to an object implementing the CuDataListener interface
Returns
a CuTControlsReader, an implementation of CuControlsReaderA abstract class
Important note
The options are reset (to an empty CuData) by CuTReaderFactory::create after CuTControlsReader creation and initialization. This avoids applying the same options to subsequent create calls on the same factory

References CuTControlsReader::setOptions().

◆ getOptions()

CuData CuTReaderFactory::getOptions ( ) const

returns the options set with setOptions, or an empty CuData.

Returns
CuData with the options set with setOptions, or an empty CuData

◆ setOptions()

void CuTReaderFactory::setOptions ( const CuData &  o)

call this before create to configure the reader

Parameters
oa CuData compiled with the following options:
  • "period" an integer, in milliseconds, for the polling period. Converted with: CuVariant::toInt
  • "refresh_mode": an integer defining the Tango refresh mode. Converted with: CuVariant::toInt
Important note
The options are reset (to an empty CuData) by CuTReaderFactory::create after CuTControlsReader creation and initialization.
note
Please use the CuTangoOptBuilder class rather than filling in the options manually.
Note
this method must be called before create in order to transfer the options to the Tango CuTControlsReader.
See also
CuTangoOptBuilder

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