All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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  AdvertiseMessageOptions
 A class for customizing the publication options for a topic advertised. More...
 
class  AdvertiseOptions
 ignition/transport/AdvertiseOptions.hh More...
 
class  AdvertiseServiceOptions
 A class for customizing the publication options for a service advertised. More...
 
class  Discovery
 A discovery class that implements a distributed topic discovery protocol. 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  MessageInfo
 A class that provides information about the message received. 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
 
class  NodePrivate
 
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  ReqHandler< google::protobuf::Message, google::protobuf::Message >
 
class  ServicePublisher
 ignition/transport/Publisher.hh More...
 
class  SubscribeOptions
 ignition/transport/SubscribeOptions.hh More...
 
class  SubscribeOptionsPrivate
 ignition/transport/SubscribeOptionsPrivate.hh More...
 
class  SubscriptionHandler
 It creates a subscription handler for a specific protobuf message. More...
 
class  SubscriptionHandler< ProtoMsg >
 Specialized template when the user prefers a callbacks that accepts a generic google::protobuf::message instead of a specific type. 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

template<typename T >
using Addresses_M = std::map< std::string, std::vector< T >>
 
template<typename T >
using DiscoveryCallback = std::function< void(const T &_publisher)>
 
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 = Addresses_M< MessagePublisher >
 
template<typename T >
using MsgCallback = std::function< void(const T &_msg, const MessageInfo &_info)>
 
using MsgDiscovery = Discovery< MessagePublisher >
 
using MsgDiscoveryCallback = std::function< void(const MessagePublisher &_publisher)>
 
using ProtoMsg = google::protobuf::Message
 
using ProtoMsgPtr = std::shared_ptr< ProtoMsg >
 
using SrvAddresses_M = Addresses_M< ServicePublisher >
 
using SrvDiscovery = Discovery< 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_TRANSPORT_VISIBLE
std::string 
determineHost ()
 Determine IP or hostname. More...
 
IGNITION_TRANSPORT_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_TRANSPORT_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_TRANSPORT_VISIBLE
std::string 
username ()
 Determine your login name. More...
 
IGNITION_TRANSPORT_VISIBLE void waitForShutdown ()
 Block the current thread until a SIGINT or SIGTERM is received. More...
 

Variables

static const uint8_t AdvType = 1
 
static const uint8_t ByeType = 5
 
static const uint8_t EndConnection = 7
 
static const uint8_t HeartbeatType = 4
 
const std::string kGenericMessageType = "google.protobug.Message"
 The string type used for generic messages. More...
 
static const uint64_t kUnthrottled = std::numeric_limits<uint64_t>::max()
 Constant used when not interested in throttling. More...
 
static const std::vector
< std::string > 
MsgTypesStr
 Used for debugging the message type received/send. More...
 
static const uint8_t NewConnection = 6
 
static const uint8_t SubType = 2
 
static const uint8_t UnadvType = 3
 
static const uint8_t Uninitialized = 0
 

Typedef Documentation

template<typename T >
using ignition::transport::Addresses_M = typedef std::map<std::string, std::vector<T>>
template<typename T >
using ignition::transport::DiscoveryCallback = typedef std::function<void(const T &_publisher)>
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>
template<typename T >
using ignition::transport::MsgCallback = typedef std::function<void(const T &_msg, const MessageInfo &_info)>
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::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_TRANSPORT_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_TRANSPORT_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.

Referenced by ignition::transport::Discovery< Pub >::Discovery().

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.

Referenced by ignition::transport::Discovery< Pub >::Discovery().

IGNITION_TRANSPORT_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_TRANSPORT_VISIBLE std::string ignition::transport::username ( )

Determine your login name.

Returns
Name used to gain access to the computer.
IGNITION_TRANSPORT_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::AdvType = 1
static
const uint8_t ignition::transport::ByeType = 5
static
const uint8_t ignition::transport::EndConnection = 7
static
const uint8_t ignition::transport::HeartbeatType = 4
static
const std::string ignition::transport::kGenericMessageType = "google.protobug.Message"
const uint64_t ignition::transport::kUnthrottled = std::numeric_limits<uint64_t>::max()
static

Constant used when not interested in throttling.

const std::vector<std::string> ignition::transport::MsgTypesStr
static
Initial value:
=
{
"UNINITIALIZED", "ADVERTISE", "SUBSCRIBE", "UNADVERTISE", "HEARTBEAT",
"BYE", "NEW_CONNECTION", "END_CONNECTION"
}

Used for debugging the message type received/send.

const uint8_t ignition::transport::NewConnection = 6
static
const uint8_t ignition::transport::SubType = 2
static
const uint8_t ignition::transport::UnadvType = 3
static
const uint8_t ignition::transport::Uninitialized = 0
static