Simo 0.0.1
Loading...
Searching...
No Matches
Simo::Ports::OutPort< Payload > Class Template Reference

#include <Port.h>

Inheritance diagram for Simo::Ports::OutPort< Payload >:
Simo::Port

Public Types

enum struct  PORT_STATE : std::uint8_t { EMPTY , FILLED }
enum struct  SEND_OUTCOME : std::uint8_t { NEW , REPLACED }
Public Types inherited from Simo::Port
using TypeId = boost::typeindex::type_index

Public Member Functions

bool connect (Port *other) override
SEND_OUTCOME send (Payload &&payload)
void clear ()
PORT_STATE state () const
Public Member Functions inherited from Simo::Port
template<typename Self>
TypeId get_type_id (this Self &_)
 Utility to the get type of class. Need the type at compile time.
std::string_view name () const
void name (const std::string_view name)

Protected Attributes

Payload storage
PORT_STATE state_ = PORT_STATE::EMPTY
Protected Attributes inherited from Simo::Port
std::string name_

Friends

class InPort< Payload >

Detailed Description

template<typename Payload>
class Simo::Ports::OutPort< Payload >

Templated port that can send payloads to an InPort of the same type

Present the payload to the connected port with send and clear that state with the clear method

Member Function Documentation

◆ connect()

template<typename Payload>
bool Simo::Ports::OutPort< Payload >::connect ( Port * other)
nodiscardoverridevirtual

Implements Simo::Port.


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