Template Class SlotIn

Inheritance Relationships

Base Type

Class Documentation

template<typename DATATYPE>
class SlotIn : public ISlotIn

Public Functions

inline SlotIn(PortIn<DATATYPE> *parent, const SlotAddress &address, typename DATATYPE::Capabilities capabilities, bool cache = false)
bool RetrieveData(typename DATATYPE::Data *&data, int64_t time_out = -1)

get a prototype example of a data packet - method used from the processor implementation

Parameters
  • data – Container to load the data packet from the ring buffer

  • time_out – time to wait for a packet in microseconds. If -1, wait for a packet to arrive

Returns

an empty data packet Retrieve the older data packet in the ring buffer - method used from the processor implementation

Returns

boolean if the slot is connected

bool RetrieveDataN(uint64_t n, std::vector<typename DATATYPE::Data*> &data, int64_t time_out = -1)

Retrieve N data packets in the ring buffer - method used from the processor implementation.

Parameters
  • data – Container to load N data packets from the ring buffer

  • time_out – time to wait for a packet in microseconds. If -1, wait for a packet to arrive

Returns

boolean if the slot is connected

bool RetrieveDataAll(std::vector<typename DATATYPE::Data*> &data, int64_t time_out = -1)

Retrieve all data packets in the ring buffer - method used from the processor implementation.

Parameters
  • data – Container to load all data packets from the ring buffer

  • time_out – time to wait for a packet in microseconds. If -1, wait for a packet to arrive

Returns

boolean if the slot is connected

inline bool FlushData()

Flush all data already in the ring buffer without retrieve them - method used from the processor implementation.

Returns

boolean if the slot is connected

inline const IStreamInfo &streaminfo()
inline const DATATYPE::Data &prototype()
inline bool status_alive() const
inline uint64_t status_read() const
inline uint64_t status_backlog() const
inline virtual void Validate() override

Public Members

DATATYPE::Data *cache_

Protected Functions

void Unlock()
void check_high_water_level()

Protected Attributes

RingBufferStatus status_
const double HIGH_WATER_LEVEL = 0.85
unsigned int n_messages_
const unsigned int MAX_N_MESSAGES = 20
DATATYPE::Capabilities capabilities_