Class NetioZerocopyPublisher

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

class NetioZerocopyPublisher : public Publisher

Public Functions

explicit NetioZerocopyPublisher(const std::string &ip, uint32_t port, Bus &bus, unsigned int netio_pn, unsigned int netio_ps, unsigned int max_msg_size, uint64_t dma_buffer_vaddr, size_t dma_size)
explicit NetioZerocopyPublisher(const std::string &ip, uint32_t port, Bus &bus, unsigned int netio_pn, unsigned int netio_ps, unsigned int max_msg_size, uint64_t dma_buffer_vaddr, size_t dma_size, NetioEventLoop &evloop)
~NetioZerocopyPublisher()
NetioZerocopyPublisher(const NetioZerocopyPublisher&) = delete
NetioZerocopyPublisher &operator=(const NetioZerocopyPublisher&) = delete
virtual bool declare(const std::vector<Elink> &elinks) override

advertise served e-links

Parameters:

elinks -- to advertise.

Returns:

whether the operation was succesfull.

virtual Result publish(felix_id_t fid, iovec *iov, uint32_t iovlen, size_t bytes, uint32_t block_addr, std::uint8_t status) override

publish chunk.

Parameters:
  • fid -- e-link universal identifier.

  • iov -- pointer to array of I/O vector.

  • iovlen -- number of entries in I/O vector array.

  • bytes -- total message size in bytes.

  • block_addr -- address of block where the chunk starts (for zero-copy mode).

  • status -- felix-star status byte.

Returns:

publisher-specific return code.

virtual Result publish(felix_id_t fid, uint8_t *data, size_t len) override

publish chunk/message.

Parameters:
  • fid -- e-link universal identifier.

  • data -- pointer to the start of chunk/message to publish.

  • len -- size of message/chunk to publish.

Returns:

publisher-specific return code.

virtual Result flush(felix_id_t fid) override

send right away (flush) the current buffer.

Parameters:

fid -- e-link universal identifier. All buffers containing data from this e-link are flushed.

Returns:

publisher-specific return code.

virtual void set_periodic_callback(uint32_t period_us, Callback callback) override

configure periodic callback e.g. the function used for polling input data.

virtual void set_asynch_callback(Callback callback) override

configure a callback with an asynchronous signal associated.

virtual void fire_asynch_callback() override

fire the signal associated to the asynchronous callback.

inline virtual const CompletionTable *get_completion_table() override

zero-copy specific function to determine the DMA read pointer on the basis of outstanding network transfers.

Returns:

address in the DMA buffer.

virtual uint32_t get_resource_counter() override
Returns:

the number of available network buffers or similar resources.

virtual uint32_t get_subscription_number() override
Returns:

the number of subscriptions.

inline virtual uint64_t get_resource_available_calls() override
Returns:

the number of calls occurring when network resources become availale after exhaustion.