cumbia-tango 1.x
C++ multi threaded library based on cumbia and the Tango control system
|
#include <cutwriter.h>
Public Member Functions | |
CuTWriter (const TSource &src, CumbiaTango *ct, const CuData &conf, const CuData &options=CuData(), const CuData &tag=CuData()) | |
virtual | ~CuTWriter () |
void | setWriteValue (const CuVariant &wval) |
set the value that will be written after start is called | |
void | setConfiguration (const CuData &db_conf) |
Set database configuration. | |
void | setOptions (const CuData &options) |
void | setTag (const CuData &tag) |
void | onProgress (int step, int total, const CuData &data) |
void | onResult (const CuData &data) |
calls onUpdate on all listeners and deletes itself afterwards | |
void | onResult (const std::vector< CuData > &datalist) |
unused. To comply with interface | |
CuData | getToken () const |
const TSource & | getSource () const |
return a TSource object that stores information about the Tango source | |
Type | getType () const |
returns the type of CuTangoActionI implemented | |
void | addDataListener (CuDataListener *l) |
insert a CuDataListener to the list of listeners of data updates | |
void | removeDataListener (CuDataListener *l) |
remove a CuDataListener from the list of listeners of data updates | |
size_t | dataListenersCount () |
return the number of registered data listeners | |
void | start () |
creates and registers a CuWriteActivity to trigger a write operation on the Tango control system | |
void | stop () |
the method where activities are unregistered from Cumbia | |
void | sendData (const CuData &data) |
subclasses will implement the necessary code to set data on themselves or to the activities | |
void | getData (CuData &d_inout) const |
subclasses will implement the necessary code to analyze the request stored in the input argument and fill it in with output data | |
![]() | |
virtual | ~CuTangoActionI () |
virtual destructor, to make compilers happy | |
Additional Inherited Members | |
![]() | |
enum | Type { ActionUnknown = -1 , Reader = 0 , Writer , ReaderConfig , WriterConfig , TaDb } |
list of types of actions More... | |
CuTWriter::CuTWriter | ( | const TSource & | src, |
CumbiaTango * | ct, | ||
const CuData & | conf, | ||
const CuData & | options = CuData(), | ||
const CuData & | tag = CuData() ) |
|
virtual |
|
virtual |
insert a CuDataListener to the list of listeners of data updates
l | a CuDataListener that receives notifications when data is ready, through CuDataListener::onUpdate |
Implements CuTangoActionI.
|
virtual |
return the number of registered data listeners
Implements CuTangoActionI.
|
virtual |
subclasses will implement the necessary code to analyze the request stored in the input argument and fill it in with output data
data | a CuData compiled with the necessary fields accepted by the specific implementation as input argument. data will contain additional output fields filled in by the method when it returns. |
Implements CuTangoActionI.
|
virtual |
return a TSource object that stores information about the Tango source
Implements CuTangoActionI.
CuData CuTWriter::getToken | ( | ) | const |
|
virtual |
returns the type of CuTangoActionI implemented
Implements CuTangoActionI.
References CuTangoActionI::Writer.
Referenced by onResult().
void CuTWriter::onProgress | ( | int | step, |
int | total, | ||
const CuData & | data ) |
this method is currently void
void CuTWriter::onResult | ( | const CuData & | data | ) |
calls onUpdate on all listeners and deletes itself afterwards
data | CuData with the result to be delivered to every CuDataListener |
References getType().
void CuTWriter::onResult | ( | const std::vector< CuData > & | datalist | ) |
unused. To comply with interface
|
virtual |
remove a CuDataListener from the list of listeners of data updates
l | a CuDataListener that will be removed from the list of listeners |
Implements CuTangoActionI.
References stop().
|
virtual |
subclasses will implement the necessary code to set data on themselves or to the activities
data | a CuData compiled with the necessary fields accepted by the specific implementation |
The data can be set locally on the object implementing this interface or can be forwarded to the activity by means of Cumbia::postEvent carrying an argument derived from CuActivityEvent. See CuTReader::sendData for an example
Implements CuTangoActionI.
void CuTWriter::setConfiguration | ( | const CuData & | db_conf | ) |
Set database configuration.
db_conf | data of type TTT::Property obtained from a |
void CuTWriter::setOptions | ( | const CuData & | options | ) |
void CuTWriter::setTag | ( | const CuData & | tag | ) |
void CuTWriter::setWriteValue | ( | const CuVariant & | write_val | ) |
set the value that will be written after start is called
write_val | a const reference to a CuVariant containing the value to write when start is called |
Referenced by CuTangoWriterFactory::create().
|
virtual |
creates and registers a CuWriteActivity to trigger a write operation on the Tango control system
This method
Implements CuTangoActionI.
References CuDeviceFactoryService::CuDeviceFactoryServiceType, and TSource::SrcCmd.
|
virtual |
the method where activities are unregistered from Cumbia
This is the place where activities are unregistered from Cumbia by the Cumbia::unregisterActivity method
Implements CuTangoActionI.
Referenced by removeDataListener().