Main Xronos SDK namespace. More...
Namespaces | |
| namespace | operators |
| Contains convenience streaming operators that allow printing time points and durations including their units. | |
Classes | |
| class | BaseReaction |
| Base class for implementing reactions. More... | |
| struct | DefaultRuntimeProvider |
| A runtime provider that provides the default runtime. More... | |
| class | Element |
| Base class for all reactor elements. More... | |
| class | Environment |
| The entry point for assembling and executing reactor programs. More... | |
| class | EnvironmentContext |
| Opaque data type used for constructing reactors. More... | |
| class | InputPort |
| A reactor element for receiving messages from other reactors. More... | |
| class | Metric |
| A reactor element for recording metric data to an external data base. More... | |
| class | OutputPort |
| A reactor element for sending messages to other reactors. More... | |
| class | PeriodicTimer |
| A reactor element that emits events in regular intervals. More... | |
| class | PhysicalEvent |
| A reactor element for receiving events from external sources. More... | |
| class | Port |
| class | ProgrammableTimer |
| A reactor element for scheduling new events. More... | |
| class | Reaction |
| Reaction base class with reactor access. More... | |
| class | ReactionContext |
| Opaque data type used for constructing reaction triggers and effects Reaction effect classes.. More... | |
| class | ReactionProperties |
| Opaque data type used for constructing reactions. More... | |
| class | Reactor |
| An abstract reactor that can be subclassed to define new reactors. More... | |
| class | ReactorContext |
| Opaque data type used for constructing Elements. More... | |
| struct | RuntimeProvider |
| Abstract interface for providing a concrete runtime instance. More... | |
| class | Shutdown |
| A reactor element that emits an event right before the program shuts down. More... | |
| class | Startup |
| A reactor element that emits an event when the program starts up. More... | |
| class | TestEnvironment |
| A variant of the environment that is configured for testing. More... | |
| class | ValidationError |
| Exception that is thrown when a program reaches an invalid state. More... | |
Typedefs | |
| using | Context = std::variant<EnvironmentContext, ReactorContext> |
| Can either hold an EnvironmentContext or a ReactorContext. | |
| using | AttributeValue = std::variant<std::string, bool, std::int64_t, double> |
| Possible value types for an attribute. | |
| using | Duration = std::chrono::nanoseconds |
| Data type used to represent durations. | |
| using | TimePoint = std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> |
| Data type used to represent time points. | |
| template<class T> | |
| using | MutableValuePtr = detail::MutableValuePtr<T, detail::is_trivial<T>()> |
| Smart pointer to a mutable value. | |
| template<class T> | |
| using | ImmutableValuePtr = detail::ImmutableValuePtr<T, detail::is_trivial<T>()> |
| Smart pointer to an immutable value. | |
Functions | |
| auto | operator<< (std::ostream &os, TimePoint tp) -> std::ostream & |
| Write a timepoint to an ostream. | |
| auto | operator<< (std::ostream &os, std::chrono::seconds dur) -> std::ostream & |
| Write a duration in seconds including the unit to an ostream. | |
| auto | operator<< (std::ostream &os, std::chrono::milliseconds dur) -> std::ostream & |
| Write a duration in milliseconds including the unit to an ostream. | |
| auto | operator<< (std::ostream &os, std::chrono::microseconds dur) -> std::ostream & |
| Write a duration in microseconds including the unit to an ostream. | |
| auto | operator<< (std::ostream &os, std::chrono::nanoseconds dur) -> std::ostream & |
| Write a duration in nanoseconds including the unit to an ostream. | |
| template<class T, class... Args> | |
| auto | make_immutable_value (Args &&... args) -> ImmutableValuePtr< T > |
| Create an instance of ImmutableValuePtr. | |
| template<class T, class... Args> | |
| auto | make_mutable_value (Args &&... args) -> MutableValuePtr< T > |
| Create an instance of MutableValuePtr. | |
Main Xronos SDK namespace.
| using xronos::sdk::MutableValuePtr = detail::MutableValuePtr<T, detail::is_trivial<T>()> |
Smart pointer to a mutable value.
This behaves similarly to std::unique_ptr<T>. While the value can be modified, there may at most one owner.
| using xronos::sdk::ImmutableValuePtr = detail::ImmutableValuePtr<T, detail::is_trivial<T>()> |
Smart pointer to an immutable value.
Ownership may be shared, but none of the owners may modify the value. This behaves similarly to std::shared_ptr<const T>.
| auto xronos::sdk::make_immutable_value | ( | Args &&... | args | ) | -> ImmutableValuePtr<T> |
Create an instance of ImmutableValuePtr.
Creates and initializes a new instance of T and returns a new ImmutableValuePtr owning this value. This is analogues to std::make_shared().
| T | The type of the value to be created. |
| Args | The types of T's constructor arguments. Usually, this does not need to be given explicitly and will be inferred automatically from the given @p args. @param args Arguments to be forwarded to T's constructor. @returns A new immutable value pointer owning an instance of T`. |
| auto xronos::sdk::make_mutable_value | ( | Args &&... | args | ) | -> MutableValuePtr<T> |
Create an instance of MutableValuePtr.
Creates and initializes a new instance of T and returns a new MutableValuePtr owning this value. This is analogues to std::make_unique().
| T | The type of the value to be created. |
| Args | The types of T's constructor arguments. Usually, this does not need to be given explicitly and will be inferred automatically from the given @p args. @param args Arguments to be forwarded to T's constructor. @returns A new mutable value pointer owning an instance of T`. |