Public Member Functions | Public Attributes | Static Public Attributes | List of all members
ignition::transport::DiscoveryPrivate Class Reference

ignition/transport/DiscoveryPrivate.hh More...

#include <DiscoveryPrivate.hh>

Public Member Functions

 DiscoveryPrivate ()=default
 Constructor. More...
 
virtual ~DiscoveryPrivate ()=default
 Destructor. More...
 

Public Attributes

std::map< std::string, Timestampactivity
 Activity information. More...
 
unsigned int activityInterval
 Activity interval value (ms.). More...
 
unsigned int advertiseInterval
 Advertise interval value (ms.). More...
 
MsgDiscoveryCallback connectionCb
 Callback executed when new topics are discovered. More...
 
SrvDiscoveryCallback connectionSrvCb
 Callback executed when new services are discovered. More...
 
MsgDiscoveryCallback disconnectionCb
 Callback executed when new topics are invalid. More...
 
SrvDiscoveryCallback disconnectionSrvCb
 Callback executed when a service is no longer available. More...
 
bool enabled
 When true, the service is enabled. More...
 
bool exit
 When true, the service threads will finish. More...
 
std::recursive_mutex exitMutex
 Mutex to guarantee exclusive access to the exit variable. More...
 
unsigned int heartbeatInterval
 Heartbeat interval value (ms.). More...
 
std::string hostAddr
 Host IP address. More...
 
std::vector< std::string > hostInterfaces
 List of host network interfaces. More...
 
TopicStorage< MessagePublisherinfoMsg
 Message addressing information. More...
 
TopicStorage< ServicePublisherinfoSrv
 Service addressing information. More...
 
bool initialized
 Once the discovery starts, it can take up to HeartbeatInterval milliseconds to discover the existing nodes on the network. More...
 
std::condition_variable_any initializedCv
 Used to block/unblock until the initialization phase finishes. More...
 
sockaddr_in mcastAddr
 Internet socket address for sending to the multicast group. More...
 
const std::string MulticastGroup = "224.0.0.7"
 IP Address used for multicast. More...
 
std::recursive_mutex mutex
 Mutex to guarantee exclusive access between the threads. More...
 
unsigned int numHeartbeatsUninitialized = 0
 Number of heartbeats sent while discovery is uninitialized. More...
 
std::string pUuid
 Process UUID. More...
 
unsigned int silenceInterval
 Silence interval value (ms.). More...
 
std::vector< int > sockets
 UDP socket used for sending/receiving discovery messages. More...
 
std::thread threadActivity
 Thread in charge of update the activity. More...
 
std::thread threadHeartbeat
 Thread in charge of sending heartbeats. More...
 
std::thread threadReception
 Thread in charge of receiving and handling incoming messages. More...
 
bool verbose
 Print discovery information to stdout. More...
 

Static Public Attributes

static const unsigned int DefActivityInterval = 100
 Default activity interval value (ms.). More...
 
static const unsigned int DefAdvertiseInterval = 1000
 Default advertise interval value (ms.). More...
 
static const unsigned int DefHeartbeatInterval = 1000
 Default heartbeat interval value (ms.). More...
 
static const unsigned int DefSilenceInterval = 3000
 Default silence interval value (ms.). More...
 
static const int DiscoveryPort = 11319
 Port used to broadcast the discovery messages. More...
 
static const int MaxRcvStr = 65536
 Longest string to receive. More...
 
static const int Timeout = 250
 Timeout used for receiving messages (ms.). More...
 
static const uint8_t Version = 3
 Wire protocol version. More...
 

Detailed Description

ignition/transport/DiscoveryPrivate.hh

Private data for the Discovery class.

Constructor & Destructor Documentation

ignition::transport::DiscoveryPrivate::DiscoveryPrivate ( )
default

Constructor.

virtual ignition::transport::DiscoveryPrivate::~DiscoveryPrivate ( )
virtualdefault

Destructor.

Member Data Documentation

std::map<std::string, Timestamp> ignition::transport::DiscoveryPrivate::activity

Activity information.

Every time there is a message from a remote node, its activity information is updated. If we do not hear from a node in a while, its entries in 'info' will be invalided. The key is the process uuid.

unsigned int ignition::transport::DiscoveryPrivate::activityInterval

Activity interval value (ms.).

See also
ActivityInterval.
SetActivityInterval.
unsigned int ignition::transport::DiscoveryPrivate::advertiseInterval

Advertise interval value (ms.).

See also
AdvertiseInterval.
SetAdvertiseInterval.
MsgDiscoveryCallback ignition::transport::DiscoveryPrivate::connectionCb

Callback executed when new topics are discovered.

SrvDiscoveryCallback ignition::transport::DiscoveryPrivate::connectionSrvCb

Callback executed when new services are discovered.

const unsigned int ignition::transport::DiscoveryPrivate::DefActivityInterval = 100
static

Default activity interval value (ms.).

See also
ActivityInterval.
SetActivityInterval.
const unsigned int ignition::transport::DiscoveryPrivate::DefAdvertiseInterval = 1000
static

Default advertise interval value (ms.).

See also
AdvertiseInterval.
SetAdvertiseInterval.
const unsigned int ignition::transport::DiscoveryPrivate::DefHeartbeatInterval = 1000
static

Default heartbeat interval value (ms.).

See also
HeartbeatInterval.
SetHeartbeatInterval.
const unsigned int ignition::transport::DiscoveryPrivate::DefSilenceInterval = 3000
static

Default silence interval value (ms.).

See also
MaxSilenceInterval.
SetMaxSilenceInterval.
MsgDiscoveryCallback ignition::transport::DiscoveryPrivate::disconnectionCb

Callback executed when new topics are invalid.

SrvDiscoveryCallback ignition::transport::DiscoveryPrivate::disconnectionSrvCb

Callback executed when a service is no longer available.

const int ignition::transport::DiscoveryPrivate::DiscoveryPort = 11319
static

Port used to broadcast the discovery messages.

bool ignition::transport::DiscoveryPrivate::enabled

When true, the service is enabled.

bool ignition::transport::DiscoveryPrivate::exit

When true, the service threads will finish.

std::recursive_mutex ignition::transport::DiscoveryPrivate::exitMutex

Mutex to guarantee exclusive access to the exit variable.

unsigned int ignition::transport::DiscoveryPrivate::heartbeatInterval

Heartbeat interval value (ms.).

See also
HeartbeatInterval.
SetHeartbeatInterval.
std::string ignition::transport::DiscoveryPrivate::hostAddr

Host IP address.

std::vector<std::string> ignition::transport::DiscoveryPrivate::hostInterfaces

List of host network interfaces.

TopicStorage<MessagePublisher> ignition::transport::DiscoveryPrivate::infoMsg

Message addressing information.

TopicStorage<ServicePublisher> ignition::transport::DiscoveryPrivate::infoSrv

Service addressing information.

bool ignition::transport::DiscoveryPrivate::initialized

Once the discovery starts, it can take up to HeartbeatInterval milliseconds to discover the existing nodes on the network.

This variable is 'false' during the first HeartbeatInterval period and is set to 'true' after that.

std::condition_variable_any ignition::transport::DiscoveryPrivate::initializedCv

Used to block/unblock until the initialization phase finishes.

const int ignition::transport::DiscoveryPrivate::MaxRcvStr = 65536
static

Longest string to receive.

sockaddr_in ignition::transport::DiscoveryPrivate::mcastAddr

Internet socket address for sending to the multicast group.

const std::string ignition::transport::DiscoveryPrivate::MulticastGroup = "224.0.0.7"

IP Address used for multicast.

std::recursive_mutex ignition::transport::DiscoveryPrivate::mutex

Mutex to guarantee exclusive access between the threads.

unsigned int ignition::transport::DiscoveryPrivate::numHeartbeatsUninitialized = 0

Number of heartbeats sent while discovery is uninitialized.

std::string ignition::transport::DiscoveryPrivate::pUuid

Process UUID.

unsigned int ignition::transport::DiscoveryPrivate::silenceInterval

Silence interval value (ms.).

See also
MaxSilenceInterval.
SetMaxSilenceInterval.
std::vector<int> ignition::transport::DiscoveryPrivate::sockets

UDP socket used for sending/receiving discovery messages.

std::thread ignition::transport::DiscoveryPrivate::threadActivity

Thread in charge of update the activity.

std::thread ignition::transport::DiscoveryPrivate::threadHeartbeat

Thread in charge of sending heartbeats.

std::thread ignition::transport::DiscoveryPrivate::threadReception

Thread in charge of receiving and handling incoming messages.

const int ignition::transport::DiscoveryPrivate::Timeout = 250
static

Timeout used for receiving messages (ms.).

bool ignition::transport::DiscoveryPrivate::verbose

Print discovery information to stdout.

const uint8_t ignition::transport::DiscoveryPrivate::Version = 3
static

Wire protocol version.

Bump up the version number if you modify the wire protocol (for discovery or message/service exchange).


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