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

an activity to get properties from the Tango database More...

#include <cugettdbpropactivity.h>

Inheritance diagram for CuGetTDbPropActivity:
Inheritance graph
[legend]

Public Types

enum  Type { CuGetTDbPropA_Type = CuActivity::UserAType + 22 }
 

Public Member Functions

 CuGetTDbPropActivity (const std::vector< CuData > &in_data)
 the class constructor, that accepts a list of CuData defining the properties the client wants to fetch from the Tango database More...
 
virtual ~CuGetTDbPropActivity ()
 the class destructor More...
 
void event (CuActivityEvent *e)
 Receive events from the main thread to the CuActivity thread. More...
 
bool matches (const CuData &token) const
 returns true if the passed token is the same as this activity's token More...
 
int getType () const
 
int repeat () const
 

Protected Member Functions

void init ()
 implements the CuActivity::init method More...
 
void execute ()
 get Tango database properties and post the result on the main thread. More...
 
void onExit ()
 implements the onExit method from CuActivity More...
 

Detailed Description

an activity to get properties from the Tango database

This activity implements CuIsolatedActivity to fetch Tango properties from the database. It's designed to be executed once (CuIsolatedActivity).

Member Enumeration Documentation

◆ Type

Enumerator
CuGetTDbPropA_Type 

Constructor & Destructor Documentation

◆ CuGetTDbPropActivity()

CuGetTDbPropActivity::CuGetTDbPropActivity ( const std::vector< CuData > &  in_data)

the class constructor, that accepts a list of CuData defining the properties the client wants to fetch from the Tango database

Parameters
in_dataa std::list of CuData describing the names and the types of properties that have to be read from the database.
activity flags
The activity sets to true the following two flags: CuActivity::CuAUnregisterAfterExec and CuActivity::CuADeleteOnExit to automatically get rid of the activity once its task is accomplished.

◆ ~CuGetTDbPropActivity()

CuGetTDbPropActivity::~CuGetTDbPropActivity ( )
virtual

the class destructor

class destructor

Member Function Documentation

◆ event()

void CuGetTDbPropActivity::event ( CuActivityEvent *  e)

Receive events from the main thread to the CuActivity thread.

Parameters
ethe event. Do not delete e after use. Cumbia will delete it after this method invocation.
See also
CuActivity::event
Note
the body of this function is void

◆ execute()

void CuGetTDbPropActivity::execute ( )
protected

get Tango database properties and post the result on the main thread.

Implements the CuActivity::execute hook

Property fetch is delegated to CuTangoWorld::get_properties publishResult delivers data to the main thread.

References CuTangoWorld::get_properties().

◆ getType()

int CuGetTDbPropActivity::getType ( ) const

References CuGetTDbPropA_Type.

◆ init()

void CuGetTDbPropActivity::init ( )
protected

implements the CuActivity::init method

Note
The body of this function is empty.

Database property access is set up and executed within the CuGetTDbPropActivity::execute method.

◆ matches()

bool CuGetTDbPropActivity::matches ( const CuData &  token) const

returns true if the passed token is the same as this activity's token

Parameters
tokena CuData containg key/value pairs of another activity's token
Returns
true if the input token is exactly the same as this activity's token

◆ onExit()

void CuGetTDbPropActivity::onExit ( )
protected

implements the onExit method from CuActivity

Note
this method is currently empty. See CuGetTDbPropActivity::execute

◆ repeat()

int CuGetTDbPropActivity::repeat ( ) const

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