HosrDiretta
Loading...
Searching...
No Matches
DIRETTA::Connection Class Reference

Diretta Connection class Performs basic communication processing for the host. More...

#include <Connection.hpp>

Inheritance diagram for DIRETTA::Connection:
DIRETTA::Find DIRETTA::Sync DIRETTA::SyncBuffer

Classes

struct  IfInfo
 Represents network interface information. More...
 

Public Member Functions

 Connection ()
 create connection
 
 Connection (ACQUA::EthernetSocket &)
 create connection with socket
 
 ~Connection ()
 destroy connection
 
void setAdditionalAddress (const std::list< ACQUA::IPAddress > &add)
 Configure the address of a Target that cannot respond to multicast.
 

Protected Member Functions

bool open (ACQUA::IPAddress &)
 open socket
 
void close ()
 close socket
 
bool sendAck (const ConnectionBuffer &, const ACQUA::IPAddress &, MessageID, ConnectionBuffer &, ACQUA::Clock=ACQUA::Clock::MilliSeconds(30))
 Send message and wait for response.
 
bool send (const ConnectionBuffer &data)
 Send message.
 
bool receive (ConnectionBuffer &data, ACQUA::IPAddress &add, ACQUA::Clock wtt=ACQUA::Clock())
 Receive message.
 
bool member (const ACQUA::IPAddress &addme)
 Begin receiving multicast data (join members)
 
bool sendMulti (const ConnectionBuffer &msg, MessageID respMsg, std::map< ACQUA::IPAddress, std::unique_ptr< ConnectionBuffer > > &resalt, bool)
 Send message to multiple message and wait for response.
 
std::list< IfInfogetIfList (bool, bool discash=false)
 Get network interfaces.
 
bool getIfMTU (std::uint32_t, std::uint32_t &)
 Get MTU of interface.
 
 operator ACQUA::EthernetSocket * ()
 Get socket object pointer.
 

Static Protected Member Functions

static void dumpfile (ACQUA::BufferCS_const, const std::string &=std::string())
 Dump packet data during debugging.
 

Protected Attributes

std::list< IfInfoIfList
 
bool IfListLoop
 
ACQUA::EthernetSocketudpCn
 
const bool udpSelf
 

Detailed Description

Diretta Connection class Performs basic communication processing for the host.

Member Function Documentation

◆ dumpfile()

static void DIRETTA::Connection::dumpfile ( ACQUA::BufferCS_const ,
const std::string & = std::string() )
staticprotected

Dump packet data during debugging.

Parameters
dumpbuffer
filnname (defalt /tmp/dump or ./dump)

◆ getIfList()

std::list< IfInfo > DIRETTA::Connection::getIfList ( bool ,
bool discash = false )
protected

Get network interfaces.

Parameters
loopbackinterface support
notuse cache (update cahs)

◆ getIfMTU()

bool DIRETTA::Connection::getIfMTU ( std::uint32_t ,
std::uint32_t &  )
protected

Get MTU of interface.

Parameters
interfacenumber
MTU
Returns
success or failure

◆ member()

bool DIRETTA::Connection::member ( const ACQUA::IPAddress & addme)
inlineprotected

Begin receiving multicast data (join members)

Parameters
joinaddress

◆ open()

bool DIRETTA::Connection::open ( ACQUA::IPAddress & )
protected

open socket

Parameters
Specifythe interface to use

◆ sendAck()

bool DIRETTA::Connection::sendAck ( const ConnectionBuffer & ,
const ACQUA::IPAddress & ,
MessageID ,
ConnectionBuffer & ,
ACQUA::Clock = ACQUA::Clock::MilliSeconds(30) )
protected

Send message and wait for response.

Parameters
sendmessage buffer
sendaddress
waitresponse message ID
receivemessage buffer
waittime (default 30ms)

◆ sendMulti()

bool DIRETTA::Connection::sendMulti ( const ConnectionBuffer & msg,
MessageID respMsg,
std::map< ACQUA::IPAddress, std::unique_ptr< ConnectionBuffer > > & resalt,
bool  )
protected

Send message to multiple message and wait for response.

Parameters
sendmessage buffer
waitresponse message ID
receivemessages
loopbackinterface support
Returns
success or failure

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