A variant of the environment that is configured for testing. More...
#include <xronos/sdk/environment.hh>
Public Member Functions | |
| TestEnvironment (Duration timeout=Duration::max()) | |
| Constructor.   | |
| Public Member Functions inherited from xronos::sdk::Environment | |
| Environment () | |
| Constructor.  | |
| ~Environment () | |
| Destructor.  | |
| void | execute (const RuntimeProvider &runtime_provider=DefaultRuntimeProvider{}) | 
| Execute the reactor program.   | |
| auto | context (std::source_location source_location=std::source_location::current()) noexcept -> EnvironmentContext | 
| Get a context object for constructing top-level reactors.   | |
| template<class T> | |
| void | connect (const InputPort< T > &from, const InputPort< T > &to) | 
| Connect two ports.   | |
| template<class T> | |
| void | connect (const OutputPort< T > &from, const OutputPort< T > &to) | 
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.  | |
| template<class T> | |
| void | connect (const OutputPort< T > &from, const InputPort< T > &to) | 
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.  | |
| template<class T> | |
| void | connect (const InputPort< T > &from, const InputPort< T > &to, Duration delay) | 
| Connect two ports with a delay.   | |
| template<class T> | |
| void | connect (const OutputPort< T > &from, const OutputPort< T > &to, Duration delay) | 
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.  | |
| template<class T> | |
| void | connect (const OutputPort< T > &from, const InputPort< T > &to, Duration delay) | 
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.  | |
| void | enable_telemetry (std::string_view application_name="xronos", std::string_view endpoint="localhost:4317") | 
| Enable collecting and sending telemetry data from the application.   | |
A variant of the environment that is configured for testing.
Uses a special mode of execution that skips waiting between executing events and instead processes events as fast as possible.
| xronos::sdk::TestEnvironment::TestEnvironment | ( | Duration | timeout = Duration::max() | ) | 
Constructor.
| timeout | The maximum amount of time to simulate before terminating. |