10 #ifndef CORAL_BUS_SLAVE_AGENT_HPP 11 #define CORAL_BUS_SLAVE_AGENT_HPP 18 #include "boost/bimap.hpp" 19 #include "boost/bimap/multiset_of.hpp" 22 #include "coral/config.h" 29 #include "execution.pb.h" 135 bool Step(
const coralproto::execution::StepData& stepData);
150 ~Timeout() CORAL_NOEXCEPT;
151 Timeout(
const Timeout&) =
delete;
152 Timeout& operator=(
const Timeout&) =
delete;
153 Timeout(Timeout&&) =
delete;
154 Timeout& operator=(Timeout&&) =
delete;
168 return ((a.Slave() << 16) + a.ID()) < ((b.Slave() << 16) + b.ID());
200 typedef boost::bimap<
201 boost::bimaps::multiset_of<coral::model::Variable, VariableLess>,
205 ConnectionBimap m_connections;
210 Timeout m_masterInactivityTimeout;
215 Connections m_connections;
226 const char* what()
const CORAL_NOEXCEPT
override {
return "Normal shutdown requested by master"; }
231 #endif // header guard
An object that identifies a variable in a simulation, and which consists of a slave ID and a variable...
Definition: model.hpp:270
Contains the coral::net::Reactor class and related functionality.
Main module header for coral::net.
Exception thrown when the slave receives a TERMINATE command.
Definition: slave_agent.hpp:223
A class which handles subscriptions to and receiving of variable values.
Definition: variable_io.hpp:95
Module header for coral::net::zmqx.
A class which contains the state of the slave and takes care of responding to requests from the maste...
Definition: slave_agent.hpp:42
A protocol/transport independent endpoint address specification.
Definition: net.hpp:34
coral::net::Endpoint BoundDataPubEndpoint() const
The endpoint to which the slave is publishing its output data.
Defines the coral::bus::VariablePublisher and coral::bus::VariableSubscriber classes.
Definition: variable_io.hpp:28
A class which handles publishing of variable values on the network.
Definition: variable_io.hpp:35
SlaveAgent(coral::net::Reactor &reactor, coral::slave::Instance &slaveInstance, const coral::net::Endpoint &controlEndpoint, const coral::net::Endpoint &dataPubEndpoint, std::chrono::milliseconds masterInactivityTimeout)
Constructs a new SlaveAgent.
Defines the coral::slave::Instance interface.
coral::net::Endpoint BoundControlEndpoint() const
The endpoint on which the slave is listening for incoming messages from the master.
An implementation of the reactor pattern.
Definition: reactor.hpp:41
A server socket for communication with one or more client nodes in a request-reply pattern...
Definition: zmqx.hpp:224
Main module header for coral::model.
An interface for classes that represent slave instances.
Definition: instance.hpp:42