coral
A C++ library for distributed co-simulation
|
Types and constants that describe model structure. More...
Classes | |
class | SlaveDescription |
A description of a specific slave. More... | |
class | SlaveTypeDescription |
A description of a slave type. More... | |
class | Variable |
An object that identifies a variable in a simulation, and which consists of a slave ID and a variable ID. More... | |
class | VariableDescription |
A description of a single variable. More... | |
class | VariableSetting |
An object which represents the action of assigning an initial value to a variable, or to connect it to another variable. More... | |
Typedefs | |
typedef std::int32_t | StepID |
A number that uniquely identifies a time step in an execution. | |
typedef double | TimePoint |
The type used to specify (simulation) time points. | |
typedef double | TimeDuration |
The type used to specify (simulation) time durations. More... | |
typedef std::uint16_t | SlaveID |
Unsigned integer type used for slave identifiers. | |
typedef std::uint32_t | VariableID |
Unsigned integer type used for variable identifiers. | |
typedef boost::variant< double, int, bool, std::string > | ScalarValue |
An algebraic type that can hold values of all supported data types. | |
Enumerations |
Functions | |
DataType | DataTypeOf (const ScalarValue &v) |
Returns the type of data stored in the given ScalarValue. | |
bool | operator== (const Variable &a, const Variable &b) |
Equality comparison for Variable objects. More... | |
bool | operator!= (const Variable &a, const Variable &b) |
Inequality comparison for Variable objects, defined as !(a==b) . | |
bool | IsValidSlaveName (const std::string &s) |
Returns whether s contains a valid slave name. More... | |
Variables | |
const StepID | INVALID_STEP_ID = -1 |
A number which will never be used for an actual time step ID. | |
const TimePoint | ETERNITY = std::numeric_limits<TimePoint>::infinity() |
A special TimePoint value that lies infinitely far in the future. | |
const SlaveID | INVALID_SLAVE_ID = 0 |
An invalid slave identifier. | |
Types and constants that describe model structure.
typedef double coral::model::TimeDuration |
The type used to specify (simulation) time durations.
If t1
and t2
have type TimePoint, then t2-t1
has type TimeDuration. If t
has type TimePoint and dt
has type TimeDuration, then t+dt
has type TimePoint.
bool coral::model::IsValidSlaveName | ( | const std::string & | s | ) |
Returns whether s
contains a valid slave name.
Basically, this checks that s
matches the regular expression [a-zA-Z][0-9a-zA-Z_]*
.