coral
A C++ library for distributed co-simulation
Classes | Namespaces | Typedefs | Enumerations | Functions
slave_control_messenger.hpp File Reference

Defines the coral::bus::ISlaveControlMessenger interface and the two related functions ConnectToSlave() and MakeSlaveControlMessenger(). More...

#include <chrono>
#include <functional>
#include <memory>
#include <system_error>
#include <vector>
#include "boost/noncopyable.hpp"
#include "coral/config.h"
#include "coral/bus/slave_setup.hpp"
#include "coral/net/reactor.hpp"
#include "coral/model.hpp"
#include "coral/net.hpp"

Go to the source code of this file.

Classes

class  coral::bus::PendingSlaveControlConnection
 A handle for a pending connection to a slave. More...
 
class  coral::bus::SlaveControlConnection
 A handle for an established connection to a slave. More...
 
class  coral::bus::ISlaveControlMessenger
 An interface for classes that implement various versions of the master/slave communication protocol. More...
 

Namespaces

 coral::bus
 Functions and classes related to the simulation bus structure.
 

Typedefs

typedef std::function< void(const std::error_code &, SlaveControlConnection)> coral::bus::ConnectToSlaveHandler
 Completion handler type for ConnectToSlave()
 
typedef std::function< void(const std::error_code &)> coral::bus::MakeSlaveControlMessengerHandler
 Completion handler type for MakeSlaveControlMessenger()
 

Enumerations

Functions

PendingSlaveControlConnection coral::bus::ConnectToSlave (coral::net::Reactor &reactor, const coral::net::SlaveLocator &slaveLocator, int maxAttempts, std::chrono::milliseconds timeout, ConnectToSlaveHandler onComplete)
 Initiates a master's connection to a slave. More...
 
std::unique_ptr< ISlaveControlMessenger > coral::bus::MakeSlaveControlMessenger (SlaveControlConnection connection, coral::model::SlaveID slaveID, const std::string &slaveName, const SlaveSetup &setup, MakeSlaveControlMessengerHandler onComplete)
 Returns an object which handles communication with a slave after the connection has been established. More...
 

Detailed Description

Defines the coral::bus::ISlaveControlMessenger interface and the two related functions ConnectToSlave() and MakeSlaveControlMessenger().

ConnectToSlave() is a good place to start for understanding how to use the stuff in this header.