Connection management base class.
More...
#include <Transport.hpp>
Connection management base class.
Builtin transport types that can be activated.
| Enumerator |
|---|
| UNKNOWN |
|
| UDT |
|
| TCP |
|
| ALL |
|
| fipa::services::transports::Transport::Transport |
( |
Type |
type | ) |
|
|
protected |
| fipa::services::transports::Transport::Transport |
( |
const Configuration & |
configuration | ) |
|
|
protected |
| virtual fipa::services::transports::Transport::~Transport |
( |
| ) |
|
|
inlinevirtual |
| void fipa::services::transports::Transport::cleanup |
( |
const std::string & |
receiver | ) |
|
Cleanup the receiver from the outgoing connection list
Create a transport of the given type
- Returns
- TransportType
| virtual Address fipa::services::transports::Transport::getAddress |
( |
const std::string & |
interface = "eth0" | ) |
const |
|
inlinevirtual |
| std::set< Address > fipa::services::transports::Transport::getAddresses |
( |
| ) |
const |
Get addresses for this transport for all available interfaces
- Returns
- addresses of this transport for all available interfaces
| OutgoingConnection::Ptr fipa::services::transports::Transport::getCachedOutgoingConnection |
( |
const std::string & |
receiverName, |
|
|
const Address & |
address |
|
) |
| |
Retrieve and outgoing connection from cache
- Parameters
-
| receiverName | Name of the receiver |
| address | Address that should correspond to the receiver |
- Returns
- NULL if connection does not exist or is invalid (e.g. when addresses are different)
| const Configuration& fipa::services::transports::Transport::getConfiguration |
( |
| ) |
const |
|
inline |
Return the transport configuration
| std::string fipa::services::transports::Transport::getLocalIPv4Address |
( |
const std::string & |
interfaceName = "eth0" | ) |
|
|
static |
Get local IPv4 address for a given interface
- Parameters
-
| interfaceName | name of the interface, default is eth0 |
- Returns
- address as a string
| std::string fipa::services::transports::Transport::getName |
( |
| ) |
const |
|
inline |
| Type fipa::services::transports::Transport::getType |
( |
| ) |
const |
|
inline |
Get the type of this transport
- Returns
- type of this transport
| Transport::Type fipa::services::transports::Transport::getTypeFromTxt |
( |
const std::string & |
typeTxt | ) |
|
|
static |
Retrieve the type for a given string
| void fipa::services::transports::Transport::notify |
( |
const std::string & |
message | ) |
|
Trigger callbacks upon a newly arrived message
| void fipa::services::transports::Transport::registerObserver |
( |
TransportObserver |
observer | ) |
|
Register a callback function that is called via notify when new data arrives
| void fipa::services::transports::Transport::send |
( |
const std::string & |
receiverName, |
|
|
const Address & |
address, |
|
|
const std::string & |
data |
|
) |
| |
Send the encoded data
- Parameters
-
| receiverName | name of the receiver to which the data should be sent |
| address | Address to which the data should be sent |
| data | Data that should be send to the receiver |
- Exceptions
-
| std::runtime_error | if sending failed |
Send letter according to this transport
| void fipa::services::transports::Transport::setConfiguration |
( |
const Configuration & |
configuration | ) |
|
|
inline |
Set the transport configuration
| virtual void fipa::services::transports::Transport::start |
( |
| ) |
|
|
inlinevirtual |
| virtual void fipa::services::transports::Transport::update |
( |
bool |
readAllMessages = true | ) |
|
|
inlinevirtual |
| Configuration fipa::services::transports::Transport::mConfiguration |
|
protected |
| std::map< Transport::Type, std::string > fipa::services::transports::Transport::TypeTxt |
|
static |
Initial value:= boost::assign::map_list_of
The documentation for this class was generated from the following files:
- /build/rock-master-18.09-multiagent-fipa-services-0.20171213/src/transports/Transport.hpp
- /build/rock-master-18.09-multiagent-fipa-services-0.20171213/src/transports/Transport.cpp