xronos-sdk 0.2.0
Xronos C++ SDK
 
Loading...
Searching...
No Matches
xronos::sdk::TestEnvironment Class Reference

A variant of the environment that is configured for testing. More...

#include <xronos/sdk/environment.hh>

Inheritance diagram for xronos::sdk::TestEnvironment:
[legend]

Public Member Functions

 TestEnvironment (Duration timeout=Duration::max())
 Construct a new TestEnvironment object.
 
- Public Member Functions inherited from xronos::sdk::Environment
 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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ TestEnvironment()

xronos::sdk::TestEnvironment::TestEnvironment ( Duration timeout = Duration::max())

Construct a new TestEnvironment object.

Parameters
timeoutThe maximum amount of time to simulate before terminating.

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