Public Member Functions | Private Attributes
socrob::multicast::Manager Class Reference

Main class of SocRob Multicast. More...

#include <manager.h>

Inheritance diagram for socrob::multicast::Manager:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Manager (ManagerOptions const &options)
 Constructor.
bool startShortRound (std::vector< uint8_t > const &question, std::set< id_type > const &required_sids, short_callback_type const &callback=empty_short_callback)
 Starts a short round for multiple agents.
bool startShortRound (std::vector< uint8_t > const &question, id_type required_sid, short_callback_type const &callback=empty_short_callback)
 Starts a short round for a single agent.
 ~Manager ()
 Destructor.

Private Attributes

boost::shared_ptr< implementation > impl_

Detailed Description

Main class of SocRob Multicast.

This class is the Manager, responsible to coordinate everything.

Definition at line 337 of file manager.h.


Constructor & Destructor Documentation

Constructor.

The Manager constructor creates the SocRob Multicast Manager and starts threads and communication. For this reason, please declare the Manager as the last variable of your class or use a shared_ptr to it, so that you initialize it only after everything is ready to start.

Parameters:
optionsOptions to be used by the Manager.

Destructor.

The Manager destructor stops communication and threads.


Member Function Documentation

bool socrob::multicast::Manager::startShortRound ( std::vector< uint8_t > const &  question,
std::set< id_type > const &  required_sids,
short_callback_type const &  callback = empty_short_callback 
)

Starts a short round for multiple agents.

Starts a short question round that will transmit the question to all agents specified in the required_sids set. When all the answers are received or agents are considered offline, the callback will be called.

Parameters:
questionQuestion to be transmitted.
required_sidsSet of agents that need to answer.
callbackCallback function to be called when all answers arrive.
bool socrob::multicast::Manager::startShortRound ( std::vector< uint8_t > const &  question,
id_type  required_sid,
short_callback_type const &  callback = empty_short_callback 
) [inline]

Starts a short round for a single agent.

Starts a short question round that will transmit the question to the specified agent. When the answer is received or the agent is considered offline, the callback will be called.

Parameters:
questionQuestion to be transmitted.
required_sidAgent that needs to answer.
callbackCallback function to be called when all answers arrive.

Definition at line 387 of file manager.h.


Member Data Documentation

boost::shared_ptr<implementation> socrob::multicast::Manager::impl_ [private]

Definition at line 396 of file manager.h.


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


socrob_multicast
Author(s): Joao Reis/jreis@isr.ist.utl.pt
autogenerated on Mon Jan 6 2014 11:47:49