coral
A C++ library for distributed co-simulation
Public Member Functions | Public Attributes | List of all members
coral::master::AddedSlave Struct Reference

Used in Execution::Reconstitute() to specify a slave which should be added to the simulation. More...

#include "coral/master/execution.hpp"

Public Member Functions

 AddedSlave () CORAL_NOEXCEPT
 Default constructor.
 
 AddedSlave (coral::net::SlaveLocator locator_, std::string name_)
 Constructor which sets the locator and name fields.
 

Public Attributes

coral::net::SlaveLocator locator
 [Input] The slave's network location
 
std::string name
 [Input] A name for the slave, unique in the execution
 
coral::model::SlaveID id = coral::model::INVALID_SLAVE_ID
 [Output] The slave's unique ID number
 
std::error_code error
 [Output] The error reported by the slave, if any
 

Detailed Description

Used in Execution::Reconstitute() to specify a slave which should be added to the simulation.

This class is used to supply information about the slave which is to be added, and to obtain information about the slave after it has been added (including any errors that may have occurred in the process).

Before an object of this type is passed to Reconstitute(), the locator and name fields must be set. After Reconstitute() has completed successfully, the id field contains the ID number of the new slave. If the function throws, the error field may be queried to figure out whether this particular slave is the source of the failure, and if so, why.


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