Classes | Typedefs | Enumerations | Functions | Variables
ignition::transport Namespace Reference

Classes

class  AdvertiseMessage
 Advertise packet used in the discovery protocol to broadcast information about the node advertising a topic. More...
 
class  AdvertiseOptions
 ignition/transport/AdvertiseOptions.hh More...
 
class  AdvertiseOptionsPrivate
 
class  Discovery
 A discovery class that implements a distributed topic discovery protocol. More...
 
class  DiscoveryPrivate
 ignition/transport/DiscoveryPrivate.hh More...
 
class  HandlerStorage
 ignition/transport/HandlerStorage.hh More...
 
class  Header
 Header included in each discovery message containing the version of the discovery protocol, the process UUID of the sender node, the type. More...
 
class  IRepHandler
 Interface class used to manage a replier handler. More...
 
class  IReqHandler
 Interface class used to manage a request handler. More...
 
class  ISubscriptionHandler
 ignition/transport/SubscriptionHandler.hh More...
 
class  MessagePublisher
 ignition/transport/Publisher.hh More...
 
class  Node
 A class that allows a client to communicate with other peers. More...
 
class  NodeOptions
 A class for customizing the behavior of the Node. More...
 
class  NodeOptionsPrivate
 ignition/transport/NodeOptionsPrivate.hh More...
 
class  NodePrivate
 Private data for Private Node class. More...
 
class  NodeShared
 Private data for the Node class. More...
 
class  Publisher
 ignition/transport/Publisher.hh More...
 
class  RepHandler
 with the service response. More...
 
class  ReqHandler
 It creates a reply handler for the specific protobuf messages used. More...
 
class  ServicePublisher
 ignition/transport/Publisher.hh More...
 
class  SubscriptionHandler
 It creates a subscription handler for a specific protobuf message. More...
 
class  SubscriptionMsg
 Subscription packet used in the discovery protocol for requesting information about a given topic. More...
 
class  TopicStorage
 Store address information about topics and provide convenient methods for adding new topics, removing them, etc. More...
 
class  TopicUtils
 This class provides different utilities related with topics. More...
 
class  Uuid
 A portable class for representing a Universally Unique Identifier. More...
 

Typedefs

using IRepHandlerPtr = std::shared_ptr< IRepHandler >
 
using IReqHandler_M = std::map< std::string, std::map< std::string, IReqHandlerPtr >>
 
using IReqHandlerPtr = std::shared_ptr< IReqHandler >
 
using ISubscriptionHandler_M = std::map< std::string, ISubscriptionHandlerPtr >
 
using ISubscriptionHandlerPtr = std::shared_ptr< ISubscriptionHandler >
 
using MsgAddresses_M = std::map< std::string, std::vector< MessagePublisher >>
 
using MsgDiscoveryCallback = std::function< void(const MessagePublisher &_publisher)>
 
using ProtoMsg = google::protobuf::Message
 
using ProtoMsgPtr = std::shared_ptr< ProtoMsg >
 
using SrvAddresses_M = std::map< std::string, std::vector< ServicePublisher >>
 
using SrvDiscoveryCallback = std::function< void(const ServicePublisher &_publisher)>
 
using Timestamp = std::chrono::steady_clock::time_point
 

Enumerations

enum  Scope_t { Scope_t::PROCESS, Scope_t::HOST, Scope_t::ALL }
 

Functions

IGNITION_VISIBLE std::string determineHost ()
 Determine IP or hostname. More...
 
IGNITION_VISIBLE std::vector< std::string > determineInterfaces ()
 Determine the list of network interfaces for this machine. More...
 
bool env (const std::string &_name, std::string &_value)
 Find the environment variable '_name' and return its value. More...
 
IGNITION_VISIBLE std::string hostname ()
 Determine the computer's hostname. More...
 
int hostnameToIp (char *_hostname, std::string &_ip)
 Determine if an IP is private. More...
 
bool isPrivateIP (const char *_ip)
 Determine if an IP is private. More...
 
IGNITION_VISIBLE std::string username ()
 Determine your login name. More...
 
IGNITION_VISIBLE void waitForShutdown ()
 Block the current thread until a SIGINT or SIGTERM is received. More...
 

Variables

static const uint8_t AdvSrvType = 6
 
static const uint8_t AdvType = 1
 
static const uint8_t ByeType = 5
 
static const uint8_t EndConnection = 10
 
static const uint8_t HeartbeatType = 4
 
static const std::vector< std::string > MsgTypesStr
 Used for debugging the message type received/send. More...
 
static const uint8_t NewConnection = 9
 
static const uint8_t SubSrvType = 7
 
static const uint8_t SubType = 2
 
static const uint8_t UnadvSrvType = 8
 
static const uint8_t UnadvType = 3
 
static const uint8_t Uninitialized = 0
 

Typedef Documentation

using ignition::transport::IRepHandlerPtr = typedef std::shared_ptr<IRepHandler>
using ignition::transport::IReqHandler_M = typedef std::map<std::string, std::map<std::string, IReqHandlerPtr>>
using ignition::transport::IReqHandlerPtr = typedef std::shared_ptr<IReqHandler>
using ignition::transport::MsgAddresses_M = typedef std::map<std::string, std::vector<MessagePublisher>>
using ignition::transport::MsgDiscoveryCallback = typedef std::function<void(const MessagePublisher&_publisher)>
using ignition::transport::ProtoMsg = typedef google::protobuf::Message
using ignition::transport::ProtoMsgPtr = typedef std::shared_ptr<ProtoMsg>
using ignition::transport::SrvAddresses_M = typedef std::map<std::string, std::vector<ServicePublisher>>
using ignition::transport::SrvDiscoveryCallback = typedef std::function<void(const ServicePublisher&_publisher)>
using ignition::transport::Timestamp = typedef std::chrono::steady_clock::time_point

Enumeration Type Documentation

Enumerator
PROCESS 

Topic/service only available to subscribers in the same process as the publisher.

HOST 

Topic/service only available to subscribers in the same machine as the publisher.

ALL 

Topic/service available to any subscriber (default scope).

Function Documentation

IGNITION_VISIBLE std::string ignition::transport::determineHost ( )

Determine IP or hostname.

Reference: https://github.com/ros/ros_comm/blob/hydro-devel/clients/ roscpp/src/libros/network.cpp

Returns
The IP or hostname of this host.
IGNITION_VISIBLE std::vector<std::string> ignition::transport::determineInterfaces ( )

Determine the list of network interfaces for this machine.

Reference: https://github.com/ros/ros_comm/blob/hydro-devel/clients/ roscpp/src/libros/network.cpp

Returns
The list of network interfaces.
bool ignition::transport::env ( const std::string &  _name,
std::string &  _value 
)

Find the environment variable '_name' and return its value.

Parameters
[in]_nameName of the environment variable.
[out]_valueValue if the variable was found.
Returns
True if the variable was found or false otherwise.
IGNITION_VISIBLE std::string ignition::transport::hostname ( )

Determine the computer's hostname.

Returns
The computer's hostname.
int ignition::transport::hostnameToIp ( char *  _hostname,
std::string &  _ip 
)

Determine if an IP is private.

Parameters
[in]_hostnameHostname
[out]_ipIP associated to the input hostname.
Returns
0 when success.
bool ignition::transport::isPrivateIP ( const char *  _ip)

Determine if an IP is private.

Reference: https://github.com/ros/ros_comm/blob/hydro-devel/clients/ roscpp/src/libros/network.cpp

Parameters
[in]_ipInput IP address.
Returns
true if the IP address is private.
IGNITION_VISIBLE std::string ignition::transport::username ( )

Determine your login name.

Returns
Name used to gain access to the computer.
IGNITION_VISIBLE void ignition::transport::waitForShutdown ( )

Block the current thread until a SIGINT or SIGTERM is received.

Note that this function registers a signal handler. Do not use this function if you want to manage yourself SIGINT/SIGTERM.

Variable Documentation

const uint8_t ignition::transport::AdvSrvType = 6
static
const uint8_t ignition::transport::AdvType = 1
static
const uint8_t ignition::transport::ByeType = 5
static
const uint8_t ignition::transport::EndConnection = 10
static
const uint8_t ignition::transport::HeartbeatType = 4
static
const std::vector<std::string> ignition::transport::MsgTypesStr
static
Initial value:
=
{
"UNINITIALIZED", "ADVERTISE", "SUBSCRIBE", "UNADVERTISE", "HEARTBEAT",
"BYE", "ADV_SRV", "SUB_SRV", "UNADVERTISE_SRV", "NEW_CONNECTION",
"END_CONNECTION"
}

Used for debugging the message type received/send.

Referenced by ignition::transport::Discovery::DisconnectionsSrvCb().

const uint8_t ignition::transport::NewConnection = 9
static
const uint8_t ignition::transport::SubSrvType = 7
static
const uint8_t ignition::transport::SubType = 2
static
const uint8_t ignition::transport::UnadvSrvType = 8
static
const uint8_t ignition::transport::UnadvType = 3
static
const uint8_t ignition::transport::Uninitialized = 0
static