Falcon
Loading...
Searching...
No Matches

Public Member Functions

 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
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.
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.
bool FlushData ()
 Flush all data already in the ring buffer without retrieve them - method used from the processor implementation.
const IStreamInfo & streaminfo ()
const DATATYPE::Data & prototype ()
bool status_alive () const
uint64_t status_read () const
uint64_t status_backlog () const
void Validate () override
Public Member Functions inherited from ISlotIn
 ISlotIn (IPortIn *parent, const SlotAddress &address, bool cache=false)
const SlotAddress & address () const
IPortIn * parent ()
void NegotiateUpstream ()
bool connected () const
void ReleaseData ()
const SlotAddress & upstream_address ()
const PortOutPolicy & upstream_policy () const

Public Attributes

DATATYPE::Data * cache_

Protected Member Functions

void Unlock ()
void check_high_water_level ()
Protected Member Functions inherited from ISlotIn
RingSequence * sequence ()
void Connect (ISlotOut *upstream)
void PrepareProcessing ()

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_
Protected Attributes inherited from ISlotIn
bool cache_enabled_
int64_t ncached_ = 0
int64_t nretrieved_ = 0
AnyType::Data * cache_ = nullptr
ISlotOut * upstream_ = nullptr
RingSequence sequence_
IPortIn * parent_
SlotAddress address_

Friends

class PortIn< DATATYPE >

Member Function Documentation

◆ FlushData()

template<typename DATATYPE>
bool SlotIn< DATATYPE >::FlushData ( )
inline

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

Returns
boolean if the slot is connected

◆ RetrieveData()

template<typename DATATYPE>
bool SlotIn< DATATYPE >::RetrieveData ( typename DATATYPE::Data *& data,
int64_t time_out = -1 )

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

Returns
an empty data packet

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

Parameters
dataContainer to load the data packet from the ring buffer
time_outtime to wait for a packet in microseconds. If -1, wait for a packet to arrive
Returns
boolean if the slot is connected

◆ RetrieveDataAll()

template<typename DATATYPE>
bool SlotIn< DATATYPE >::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
dataContainer to load all data packets from the ring buffer
time_outtime to wait for a packet in microseconds. If -1, wait for a packet to arrive
Returns
boolean if the slot is connected

◆ RetrieveDataN()

template<typename DATATYPE>
bool SlotIn< DATATYPE >::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
dataContainer to load N data packets from the ring buffer
time_outtime to wait for a packet in microseconds. If -1, wait for a packet to arrive
Returns
boolean if the slot is connected

◆ Validate()

template<typename DATATYPE>
void SlotIn< DATATYPE >::Validate ( )
inlineoverridevirtual

Implements ISlotIn.


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