cumbia-tango 1.x
C++ multi threaded library based on cumbia and the Tango control system
Public Types | Public Member Functions | List of all members
CumbiaTango Class Reference

#include <cumbiatango.h>

Inheritance diagram for CumbiaTango:
Inheritance graph
[legend]

Public Types

enum  Type { CumbiaTangoType = Cumbia::CumbiaUserType + 1 }
 
enum  UpdateOptions {
  OnPollUpdateAlways = 0x1 , OnPollUnchangedUpdateTimestamp = 0x2 , OnPollUnchangedNoUpdate = 0x4 , SkipFirstReadUpdate = 0x8 ,
  EndUpdateOptions = 0x20
}
 

Public Member Functions

 CumbiaTango (CuThreadFactoryImplI *tfi, CuThreadsEventBridgeFactory_I *teb)
 CumbiaTango two parameters constructor. More...
 
 ~CumbiaTango ()
 
void addAction (const TSource &source, CuDataListener *l, const CuTangoActionFactoryI &f)
 
void unlinkListener (const std::string &source, CuTangoActionI::Type t, CuDataListener *l)
 Removes a listener from the action with the given source and type. More...
 
void removeAction (const std::string &source, CuTangoActionI::Type t)
 
CuTangoActionIfindAction (const std::string &source, CuTangoActionI::Type t) const
 
CuThreadFactoryImplI * getThreadFactoryImpl () const
 
CuThreadsEventBridgeFactory_I * getThreadEventsBridgeFactory () const
 
void setReadUpdatePolicy (int p)
 
int readUpdatePolicy () const
 
virtual int getType () const
 

Member Enumeration Documentation

◆ Type

Enumerator
CumbiaTangoType 

◆ UpdateOptions

Enumerator
OnPollUpdateAlways 
OnPollUnchangedUpdateTimestamp 
OnPollUnchangedNoUpdate 
SkipFirstReadUpdate 
EndUpdateOptions 

Constructor & Destructor Documentation

◆ CumbiaTango()

CumbiaTango::CumbiaTango ( CuThreadFactoryImplI *  tfi,
CuThreadsEventBridgeFactory_I *  teb 
)

CumbiaTango two parameters constructor.

The class constructor accepts a factory providing a thread implementation for cumbia (mainly CuThread) and a bridge to forward events from the secondary threads to the main.

Parameters
tfia CuThreadFactoryImplI implementation, mainly CuThreadFactoryImpl
teba CuThreadsEventBridgeFactory_I implementation, for example CuThreadsEventBridgeFactory or cumbia-qtcontrols QThreadsEventBridgeFactory
example
CumbiaTango* cuta = new CumbiaTango(new CuThreadFactoryImpl(), new QThreadsEventBridgeFactory());
Definition: cumbiatango.h:155

◆ ~CumbiaTango()

CumbiaTango::~CumbiaTango ( )

Member Function Documentation

◆ addAction()

void CumbiaTango::addAction ( const TSource source,
CuDataListener *  l,
const CuTangoActionFactoryI f 
)

◆ findAction()

CuTangoActionI * CumbiaTango::findAction ( const std::string &  source,
CuTangoActionI::Type  t 
) const

◆ getThreadEventsBridgeFactory()

CuThreadsEventBridgeFactory_I * CumbiaTango::getThreadEventsBridgeFactory ( ) const

◆ getThreadFactoryImpl()

CuThreadFactoryImplI * CumbiaTango::getThreadFactoryImpl ( ) const

◆ getType()

int CumbiaTango::getType ( ) const
virtual

References CumbiaTangoType.

◆ readUpdatePolicy()

int CumbiaTango::readUpdatePolicy ( ) const

Returns the update policy in use

Default: CuDataUpdatePolicy::PollUpdateAlways

Referenced by CuPollingService::registerAction().

◆ removeAction()

void CumbiaTango::removeAction ( const std::string &  source,
CuTangoActionI::Type  t 
)

◆ setReadUpdatePolicy()

void CumbiaTango::setReadUpdatePolicy ( int  p)

Suggest a policy for read updates

Parameters
pa valid combination of values from the enum CuDataUpdatePolicy OnPoll options can be or-ed with SkipFirstReadUpdate
See also
CuDataUpdatePolicy
CuPollingActivity

◆ unlinkListener()

void CumbiaTango::unlinkListener ( const std::string &  source,
CuTangoActionI::Type  t,
CuDataListener *  l 
)

Removes a listener from the action with the given source and type.

Parameters
sourcethe source of the action
tthe CuTangoActionI::Type type (Reader, Writer, ReaderConfig, WriterConfig, TaDb)
lthe CuDataListener to be removed from the action identified by source and t
Note
Examples of CuDataListener are objects from the cumbia-qtcontrols module, such as QuLabel, QuTrendPlot, QuLed and the like.
Examples of CuTangoActionI are CuTReader CuTWriter and CuTConfiguration
An action is removed from cumbia when no more listeners reference it

References CuActionFactoryService::CuActionFactoryServiceType, CuActionFactoryService::find(), and CuTangoActionI::removeDataListener().


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