libcosim 0.8.2
C++ library for distributed co-simulation
Classes | Namespaces | Typedefs | Enumerations | Functions
model_description.hpp File Reference

Model-descriptive types and constants. More...

#include <cstdint>
#include <optional>
#include <ostream>
#include <string>
#include <string_view>
#include <variant>
#include <vector>

Go to the source code of this file.

Classes

struct  cosim::variable_description
 A description of a model variable. More...
 
struct  cosim::model_description
 A description of a model. More...
 

Namespaces

namespace  cosim
 Top-level libcosim namespace.
 

Typedefs

using cosim::value_reference = std::uint32_t
 Unsigned integer type used for variable identifiers.
 
using cosim::scalar_value = std::variant< double, int, bool, std::string >
 An algebraic type that can hold a scalar value of one of the supported variable types.
 
using cosim::scalar_value_view = std::variant< double, int, bool, std::string_view >
 An algebraic type that can hold a (possibly) non-owning, read-only view of a scalar value of one of the supported variable types. More...
 

Enumerations

enum class  cosim::variable_type {
  real , integer , boolean , string ,
  enumeration
}
 Variable data types.
 
enum  cosim::variable_causality {
  parameter , calculated_parameter , input , output ,
  local
}
 Variable causalities. These correspond to FMI causality definitions.
 
enum  cosim::variable_variability {
  constant , fixed , tunable , discrete ,
  continuous
}
 Variable variabilities. These correspond to FMI variability definitions.
 
enum class  cosim::step_result { cosim::complete , cosim::failed , cosim::canceled }
 Possible outcomes of a subsimulator time step. More...
 

Functions

constexpr const char * cosim::to_text (variable_type v)
 Returns a textual representation of v.
 
constexpr const char * cosim::to_text (variable_causality v)
 Returns a textual representation of v.
 
constexpr const char * cosim::to_text (variable_variability v)
 Returns a textual representation of v.
 
std::ostreamcosim::operator<< (std::ostream &stream, variable_type v)
 Writes a textual representation of v to stream.
 
std::ostreamcosim::operator<< (std::ostream &stream, variable_causality v)
 Writes a textual representation of v to stream.
 
std::ostreamcosim::operator<< (std::ostream &stream, variable_variability v)
 Writes a textual representation of v to stream.
 
variable_description cosim::find_variable (const model_description &description, const std::string &variable_name)
 Getter for returning a variable description.
 

Detailed Description

Model-descriptive types and constants.