A reactor element for sending messages to other reactors. More...
#include <xronos/sdk/port.hh>
Public Member Functions | |
| OutputPort (std::string_view name, const ReactorContext &context) | |
| Constructor.   | |
| Public Member Functions inherited from xronos::sdk::Element | |
| auto | name () const noexcept -> const std::string & | 
| Get the element's name.   | |
| auto | fqn () const noexcept -> const std::string & | 
| Get the element's fully qualified name.   | |
| auto | uid () const noexcept -> std::uint64_t | 
| Get the element's unique ID.   | |
| auto | add_attribute (std::string_view key, const AttributeValue &value) noexcept -> bool | 
| Annotate an element with an attribute.   | |
| template<std::ranges::input_range R>  requires requires(std::ranges::range_value_t<R> pair) { { pair.first } -> std::convertible_to<std::string_view>; { pair.second } -> std::convertible_to<AttributeValue>; }  | |
| auto | add_attributes (const R &range) noexcept -> bool | 
| Annotate an element with multiple attributes.   | |
| auto | add_attributes (std::initializer_list< std::pair< std::string_view, AttributeValue > > attributes) -> bool | 
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.   | |
| virtual | ~Element ()=default | 
| Virtual destructor.  | |
| Element (Element &&)=default | |
| Move constructor.  | |
| auto | operator= (Element &&) -> Element &=default | 
| Move assignment operator.  | |
A reactor element for sending messages to other reactors.
Output ports can be used as a reaction effect and provide an interface for reactors to send messages to other reactors.
Output ports may be connected to other ports so that messages are forwarded automatically (see Environment::connect() and Reactor::connect()).
Other reactors may also use output ports as a reaction trigger allowing an external reaction handler to receive messages directly from the port.
| T | The value type associated with messages. | 
| xronos::sdk::OutputPort< T >::OutputPort | ( | std::string_view | name, | 
| const ReactorContext & | context ) | 
Constructor.
| name | The name of the port. | 
| context | The containing reactor's context. |