16 #ifndef DABC_ConnectionRequest 
   17 #define DABC_ConnectionRequest 
   19 #ifndef DABC_Parameter 
   27 #ifndef DABC_ConfigBase 
   36    class ConnectionManager;
 
   37    class ConnectionRequest;
 
   38    class ConnectionRequestFull;
 
  148          virtual const char* 
ClassName()
 const { 
return "ConnectionObject"; }
 
  156 #define GET_PAR_FIELD( field_name, defvalue ) \ 
  158        LockGuard guard(GetObject()->fObjectMutex); \ 
  159        return GetObject()-> field_name; \ 
  163 #define SET_PAR_FIELD( field_name, value ) \ 
  165      LockGuard guard(GetObject()->fObjectMutex); \ 
  166      GetObject()-> field_name = value; \ 
#define SET_PAR_FIELD(field_name, value)
 
#define GET_PAR_FIELD(field_name, defvalue)
 
#define DABC_REFERENCE(RefClass, ParentClass, T)
 
Represents command with its arguments.
 
Connections manager class.
 
Container for connection parameters.
 
int fInlineDataSize
property of the port, if does not match, will be ruled by the server
 
void ChangeState(EState state, bool force)
Change state of connection object.
 
virtual const char * ClassName() const
Returns class name of the object instance.
 
std::string fPoolName
pool which should be used for the connections
 
static const char * ObjectName()
 
double fAccDelay
accounting spent time, when negative - record is active
 
double fSetDelay
set value for delay, will be activated first time timeout processing done
 
@ sDisconnected
connection is down by user, will not be reconnected
 
@ sConnected
connection is up and working
 
@ sInit
connection in initial state
 
@ sConnecting
connection is in progress
 
@ sPending
connection is pending (want to be connected)
 
@ sBroken
connection is broken and should be reactivated by connection manager
 
@ sFailed
connection cannot be established by connection manager
 
std::string fConnId
unique id for that connection, defined by the server (can be overwritten by device)
 
ConnectionObject::EState GetState()
 
virtual std::string DefaultFiledName() const
 
ConnectionObject(Reference port, const std::string &localurl)
 
std::string fAllowedField
name of field which is allowed to change in any state
 
std::string fClientId
identifier for client side
 
EState fConnState
actual state of the connection, is parameter value
 
double CheckDelay(double shift)
Function accounts time spent and returns true, if delay is not yet finished.
 
virtual bool _CanChangeField(const std::string &)
Reimplement virtual method of ParameterContainer to block field change if object in non-init state.
 
Command fRemoteCmd
command from remote, interpretation depends from the state
 
std::string fServerId
identifier for server side
 
static const char * GetStateName(EState state)
 
virtual ~ConnectionObject()
 
void SetDelay(double v, bool force=false)
Set delay how long record is inactive.
 
std::string fLocalUrl
full url of local port
 
Reference fCustomData
implementation specific data, managed by the device, cleanuped by the record when connection is destr...
 
Full description of connection request.
 
void SetPoolName(const std::string &name)
 
bool GetUseAckn() const
Use of acknowledge in protocol.
 
void SetServerSide(bool isserver=true)
 
std::string GetPoolName() const
 
std::string GetConnThread() const
Thread name for transport.
 
void SetUseAckn(bool on=true)
 
std::string GetLocalUrl() const
 
void SetConfigFromXml(XMLNodePointer_t node)
 
bool IsOptional() const
indicate if connection is optional and therefore may be ignored during failure or long timeout
 
void ChangeState(ConnectionObject::EState state, bool force)
 
void SetConnDevice(const std::string &dev)
 
void SetRemoteUrl(const std::string &url)
 
void SetAllowedField(const std::string &name="")
 
void SetConnThread(const std::string &name)
 
double GetConnTimeout() const
time required to establish connection, if expired connection will be switched to "failed" state
 
ConnectionObject::EState GetState() const
 
virtual const char * ParReferenceKind()
Indicates that only connection kind can be assigned to the reference.
 
std::string GetRemoteUrl() const
Return url of data source to which connection should be established.
 
void SetConnTimeout(double tm)
 
std::string GetConnDevice() const
Device name which may be used to create connection (depends from url)
 
Reference GetPort() const
 
void SetInitState()
Change state of the connection to init that other parameters can be changed.
 
bool IsServerSide() const
Indicates if local node in connection is server or client.
 
void SetOptional(bool on=true)
 
Base for dabc::ModuleSync and dabc::ModuleAsync classes.
 
EState GetState() const
Returns object state value.
 
Container for parameter object.
 
Base class for input and output ports.
 
bool AsBool(bool dflt=false) const
 
std::string AsStr(const std::string &dflt="") const
 
double AsDouble(double dflt=0.) const
 
RecordField GetField(const std::string &name) const
 
bool SetField(const std::string &name, const RecordField &v)
 
Reference on the arbitrary object
 
Object * GetObject() const
Return pointer on the object.
 
Reference(Object *obj=nullptr)
Constructor, creates reference on the object.
 
Object * GetParent() const
Returns pointer on parent object.
 
const char * xmlTimeoutAttr
 
const char * xmlUseacknAttr
 
const char * xmlDeviceAttr
 
const char * xmlOptionalAttr
 
const char * xmlThreadAttr