DABC (Data Acquisition Backbone Core)  2.9.9
Protected Member Functions | Private Member Functions | Friends
dabc::ConnectionRequest Class Reference

Connection request. More...

#include <dabc/ConnectionRequest.h>

Inheritance diagram for dabc::ConnectionRequest:
dabc::Parameter dabc::Record dabc::Reference dabc::ConnectionRequestFull

Protected Member Functions

void ChangeState (ConnectionObject::EState state, bool force)
 
virtual const char * ParReferenceKind ()
 Indicates that only connection kind can be assigned to the reference. More...
 
void SetAllowedField (const std::string &name="")
 
void SetInitState ()
 Change state of the connection to init that other parameters can be changed. More...
 
- Protected Member Functions inherited from dabc::Parameter
int ExecuteChange (Command cmd)
 Specifies that parameter produce 'modified' events synchronous with changes of parameter. More...
 
void FireConfigured ()
 Fire parConfigured event for parameter. More...
 
bool TakeAttrModified ()
 Returns true if any parameter attribute was modified since last call to this method. More...
 
template<class T >
bool verify_object (Object *src, T *&tgt)
 Method used in reference constructor/assignments to verify is object is suitable. More...
 
- Protected Member Functions inherited from dabc::Reference
bool AcquireRefWithoutMutex (Reference &ref)
 Special method, which allows to generate new reference when object mutex is locked. More...
 
void Assign (const Reference &src)
 Method used in copy constructor and assigned operations. More...
 
MutexObjectMutex () const
 
template<class T >
bool verify_object (Object *src, T *&tgt)
 Method used in reference constructor/assignments to verify is object is suitable. More...
 

Private Member Functions

std::string GetConnDevice () const
 Device name which may be used to create connection (depends from url) More...
 
std::string GetConnThread () const
 Thread name for transport. More...
 
double GetConnTimeout () const
 time required to establish connection, if expired connection will be switched to "failed" state More...
 
std::string GetLocalUrl () const
 
std::string GetPoolName () const
 
Reference GetPort () const
 
std::string GetRemoteUrl () const
 Return url of data source to which connection should be established. More...
 
ConnectionObject::EState GetState () const
 
bool GetUseAckn () const
 Use of acknowledge in protocol. More...
 
bool IsOptional () const
 indicate if connection is optional and therefore may be ignored during failure or long timeout More...
 
bool IsServerSide () const
 Indicates if local node in connection is server or client. More...
 
void SetConfigFromXml (XMLNodePointer_t node)
 
void SetConnDevice (const std::string &dev)
 
void SetConnThread (const std::string &name)
 
void SetConnTimeout (double tm)
 
void SetOptional (bool on=true)
 
void SetPoolName (const std::string &name)
 
void SetRemoteUrl (const std::string &url)
 
void SetServerSide (bool isserver=true)
 
void SetUseAckn (bool on=true)
 
virtual ~ConnectionRequest ()
 When reference released, it is checked if we are in the init state and change object to pending state It is done to inform connection manger that connection is ready for work
More...
 

Friends

class ConnectionManager
 
class Module
 
class Port
 

Additional Inherited Members

- Public Member Functions inherited from dabc::Parameter
bool Dflt (const RecordField &v)
 Set default parameter value. More...
 
ParameterDisableAverage ()
 Disables averaging functionality. More...
 
ParameterDisableRatemeter ()
 Disable ratemeter functionality. More...
 
void FireModified ()
 Can be called by user to signal framework that parameter was modified. More...
 
const std::string GetActualUnits () const
 Return actual units of parameter value, taking into account rate (1/s) unit when enabled. More...
 
int GetDebugLevel () const
 
double GetLowerLimit () const
 
const std::string GetUnits () const
 Return units of parameter value. More...
 
double GetUpperLimit () const
 
Reference GetWorker () const
 Returns reference on the worker. More...
 
bool IsAverage () const
 Returns true if average calculation is active. More...
 
bool IsMonitored ()
 Returns true when parameter event should be delivered to the worker. More...
 
bool IsRatemeter () const
 Returns true if rate measurement is activated. More...
 
const std::string Kind () const
 
bool NeedTimeout ()
 Returns true if parameter object requires timeout processing. More...
 
void ScanParamFields (RecordFieldsMap *cont)
 
ParameterSetAverage (bool synchron=false, double interval=1.0)
 Converts parameter in statistic variable. More...
 
ParameterSetDebugLevel (int level=1)
 
ParameterSetDebugOutput (bool on=true, int level=1)
 Enable/disable debug output when parameter value is changed. More...
 
ParameterSetFld (const std::string &name, const RecordField &v)
 
ParameterSetLimits (double low, double up)
 
void SetLowerLimit (double low)
 
ParameterSetMonitored (bool on=true)
 Specify if parameter event should be delivered to the worker. More...
 
ParameterSetRatemeter (bool synchron=false, double interval=1.0)
 Converts parameter in ratemeter - all values will be summed up and divided on specified interval. More...
 
ParameterSetSynchron (bool on, double interval=1., bool everyevnt=false)
 Indicate if parameter is should generate events synchron with code which modified it. More...
 
ParameterSetUnits (const std::string &unit)
 Set units field of parameter. More...
 
void SetUpperLimit (double up)
 
bool SetValue (const RecordField &v)
 Set parameter value. More...
 
ParameterSetWidthPrecision (unsigned width, unsigned prec)
 Set parameter to convert double values to the string - used for ratemeter. More...
 
bool SubmitSetValue (const RecordField &v)
 
RecordField Value () const
 Returns parameter value. More...
 
- Public Member Functions inherited from dabc::Reference
bool AddChild (Object *obj)
 Add child to list of object children. More...
 
const char * ClassName () const
 Return class name of referenced object, if object not assigned, returns "---". More...
 
void Destroy () throw ()
 Release reference and starts destroyment of referenced object. More...
 
Reference FindChild (const char *name) const
 Searches for child in referenced object. More...
 
bool GetAllChildRef (ReferencesVector *vect) const
 Return references for all childs. More...
 
Reference GetChild (unsigned n) const
 Return reference on child n. More...
 
Reference GetFolder (const std::string &name, bool force=false) throw ()
 Return folder of specified name, no special symbols are allowed. More...
 
const char * GetName () const
 Return name of referenced object, if object not assigned, returns "---". More...
 
ObjectGetObject () const
 Return pointer on the object. More...
 
ObjectGetParent () const
 Returns pointer on parent object. More...
 
Reference GetParentRef () const
 Returns reference on parent object. More...
 
bool IsName (const char *name) const
 Returns true if object name is the same as specified one. More...
 
std::string ItemName (bool compact=true) const
 Produce string, which can be used as name argument in dabc::mgr.FindItem(name) call. More...
 
bool null () const
 Returns true if reference contains nullptr. More...
 
unsigned NumChilds () const
 Return number of childs in referenced object. More...
 
unsigned NumReferences () const
 Returns number of references on the object. More...
 
bool operator! () const
 Returns true if reference contains nullptr. More...
 
bool operator!= (const Reference &src) const
 Compare operator - return true if references refer to different object. More...
 
bool operator!= (Object *obj) const
 Compare operator - return true if reference refer to different objects. More...
 
Objectoperator() () const
 Return pointer on the object. More...
 
Referenceoperator<< (Reference &src) throw ()
 Move operator - reference moved from source to target. More...
 
Referenceoperator= (const Reference &src) throw ()
 Assignment operator - copy reference. More...
 
Referenceoperator= (Object *obj) throw ()
 Assignment operator - copy reference. More...
 
bool operator== (const Reference &src) const
 Compare operator - return true if references refer to same object. More...
 
bool operator== (Object *obj) const
 Compare operator - return true if reference refer to same object. More...
 
void Print (int lvl=0, const char *from=0) const
 Show on debug output content of reference. More...
 
 Reference (const Reference &src) throw ()
 Copy constructor, if source is transient than source reference will be emptied. More...
 
 Reference (Object *obj=nullptr)
 Constructor, creates reference on the object. More...
 
std::string RelativeName (const dabc::Reference &topitem)
 Produce name, which can be used to find item, calling topitem.FindChild(). More...
 
void Release () throw ()
 Releases reference on the object. More...
 
bool RemoveChild (const char *name, bool cleanup=true)
 Remove child with given name and return reference on that child. More...
 
bool RemoveChilds (bool cleanup=true)
 Remove all childs in referenced object If cleanup true (default) and object is owner, all objects will be destroyed. More...
 
void SetAutoDestroy (bool on=true)
 Set autodestroy flag for the object Once enabled, object will be destroyed when last reference will be cleared. More...
 
void SetObject (Object *obj, bool withmutex=true)
 Direct set of object to reference. More...
 
Reference Take ()
 Copy reference to output object. More...
 
virtual ~Reference ()
 Destructor, releases reference on the object. More...
 
- Protected Attributes inherited from dabc::Reference
ObjectfObj
 pointer on the object More...
 

Detailed Description

Connection request.

ConnectionRequest is reference on ConnectionObject, which is used to specify user-specific parameters. Not all fields of ConnectionObject accessible via ConnectionRequest.

Definition at line 181 of file ConnectionRequest.h.

Constructor & Destructor Documentation

◆ ~ConnectionRequest()

virtual dabc::ConnectionRequest::~ConnectionRequest ( )
inlineprivatevirtual

When reference released, it is checked if we are in the init state and change object to pending state It is done to inform connection manger that connection is ready for work

Definition at line 191 of file ConnectionRequest.h.

Member Function Documentation

◆ GetState()

ConnectionObject::EState dabc::ConnectionRequest::GetState ( ) const
inlineprivate

Definition at line 193 of file ConnectionRequest.h.

◆ GetPort()

Reference dabc::ConnectionRequest::GetPort ( ) const
inlineprivate

Definition at line 195 of file ConnectionRequest.h.

◆ GetLocalUrl()

std::string dabc::ConnectionRequest::GetLocalUrl ( ) const
inlineprivate

Definition at line 197 of file ConnectionRequest.h.

◆ GetPoolName()

std::string dabc::ConnectionRequest::GetPoolName ( ) const
inlineprivate

Definition at line 199 of file ConnectionRequest.h.

◆ SetPoolName()

void dabc::ConnectionRequest::SetPoolName ( const std::string &  name)
inlineprivate

Definition at line 200 of file ConnectionRequest.h.

◆ GetRemoteUrl()

std::string dabc::ConnectionRequest::GetRemoteUrl ( ) const
inlineprivate

Return url of data source to which connection should be established.

Definition at line 203 of file ConnectionRequest.h.

◆ IsServerSide()

bool dabc::ConnectionRequest::IsServerSide ( ) const
inlineprivate

Indicates if local node in connection is server or client.

Definition at line 206 of file ConnectionRequest.h.

◆ IsOptional()

bool dabc::ConnectionRequest::IsOptional ( ) const
inlineprivate

indicate if connection is optional and therefore may be ignored during failure or long timeout

Definition at line 209 of file ConnectionRequest.h.

◆ GetConnDevice()

std::string dabc::ConnectionRequest::GetConnDevice ( ) const
inlineprivate

Device name which may be used to create connection (depends from url)

Definition at line 212 of file ConnectionRequest.h.

◆ GetConnThread()

std::string dabc::ConnectionRequest::GetConnThread ( ) const
inlineprivate

Thread name for transport.

Definition at line 215 of file ConnectionRequest.h.

◆ GetUseAckn()

bool dabc::ConnectionRequest::GetUseAckn ( ) const
inlineprivate

Use of acknowledge in protocol.

Definition at line 218 of file ConnectionRequest.h.

◆ GetConnTimeout()

double dabc::ConnectionRequest::GetConnTimeout ( ) const
inlineprivate

time required to establish connection, if expired connection will be switched to "failed" state

Definition at line 221 of file ConnectionRequest.h.

◆ SetRemoteUrl()

void dabc::ConnectionRequest::SetRemoteUrl ( const std::string &  url)
inlineprivate

Definition at line 224 of file ConnectionRequest.h.

◆ SetServerSide()

void dabc::ConnectionRequest::SetServerSide ( bool  isserver = true)
inlineprivate

Definition at line 226 of file ConnectionRequest.h.

◆ SetConnDevice()

void dabc::ConnectionRequest::SetConnDevice ( const std::string &  dev)
inlineprivate

Definition at line 228 of file ConnectionRequest.h.

◆ SetOptional()

void dabc::ConnectionRequest::SetOptional ( bool  on = true)
inlineprivate

Definition at line 230 of file ConnectionRequest.h.

◆ SetUseAckn()

void dabc::ConnectionRequest::SetUseAckn ( bool  on = true)
inlineprivate

Definition at line 232 of file ConnectionRequest.h.

◆ SetConnTimeout()

void dabc::ConnectionRequest::SetConnTimeout ( double  tm)
inlineprivate

Definition at line 234 of file ConnectionRequest.h.

◆ SetConnThread()

void dabc::ConnectionRequest::SetConnThread ( const std::string &  name)
inlineprivate

Definition at line 236 of file ConnectionRequest.h.

◆ SetConfigFromXml()

void dabc::ConnectionRequest::SetConfigFromXml ( XMLNodePointer_t  node)
private

Definition at line 127 of file ConnectionRequest.cxx.

◆ ChangeState()

void dabc::ConnectionRequest::ChangeState ( ConnectionObject::EState  state,
bool  force 
)
protected

Definition at line 113 of file ConnectionRequest.cxx.

◆ SetInitState()

void dabc::ConnectionRequest::SetInitState ( )
inlineprotected

Change state of the connection to init that other parameters can be changed.

Definition at line 245 of file ConnectionRequest.h.

◆ SetAllowedField()

void dabc::ConnectionRequest::SetAllowedField ( const std::string &  name = "")
protected

Definition at line 119 of file ConnectionRequest.cxx.

◆ ParReferenceKind()

virtual const char* dabc::ConnectionRequest::ParReferenceKind ( )
inlineprotectedvirtual

Indicates that only connection kind can be assigned to the reference.

Reimplemented from dabc::Parameter.

Definition at line 250 of file ConnectionRequest.h.

Friends And Related Function Documentation

◆ Port

friend class Port
friend

Definition at line 183 of file ConnectionRequest.h.

◆ Module

friend class Module
friend

Definition at line 184 of file ConnectionRequest.h.

◆ ConnectionManager

friend class ConnectionManager
friend

Definition at line 185 of file ConnectionRequest.h.


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