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

Specifies a slave which is to be added to an execution. 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] Information about the slave's network location.
 
std::string name
 [Input] A name for the slave, unique in the execution. More...
 
coral::model::SlaveID id = coral::model::INVALID_SLAVE_ID
 [Output] The slave's unique ID.
 
std::error_code error
 [Output] The error reported by the slave, if any.
 

Detailed Description

Specifies a slave which is to be added to an execution.

This class is used in calls to Execution::Reconstitute() to supply information about the slave which is to be added, and to obtain new 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.

Member Data Documentation

std::string coral::master::AddedSlave::name

[Input] A name for the slave, unique in the execution.

Slave names may only consist of letters (a-z, A-Z), digits (0-9) and underscores (_). The first character must be a letter. If the string is empty, a unique name will be generated.


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