A variant of the environment that is configured for testing. More...
#include <xronos/sdk/environment.hh>
Public Member Functions | |
TestEnvironment (Duration timeout=Duration::max()) | |
Construct a new TestEnvironment object. | |
![]() | |
Environment () | |
Construct a new Environment object. | |
void | execute () |
Execute the reactor program. | |
void | request_shutdown () |
Request the termination of a currently running reactor program. | |
auto | context (std::source_location source_location=std::source_location::current()) noexcept -> EnvironmentContext |
Get the top-level initialization context object. | |
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) |
template<class T> | |
void | connect (const OutputPort< T > &from, const InputPort< T > &to) |
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) |
template<class T> | |
void | connect (const OutputPort< T > &from, const InputPort< T > &to, Duration delay) |
void | enable_tracing (std::string_view application_name="xronos", std::string_view endpoint="localhost:4317") |
Enable tracing for the environment. | |
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() | ) |
Construct a new TestEnvironment
object.
timeout | The maximum amount of time to simulate before terminating. |