Template Class ToHost

Class Documentation

template<class CFG, class DEV, class BUF>
class ToHost

Core of felix-tohost and felix-file2host.

Template Parameters:
  • CFG -- Configuration class that provides device IDs, DMA buffer sizes, and network settings (e.g. ConfigToHost)

  • DEV -- Represents a FELIX device (e.g. FlxDevice, FileDevice) that handles hardware communication

  • BUF -- ToHost DMA buffer implementation (e.g. FlxFToHostBuffer, FileToHostBuffer) for memory management

Public Functions

inline explicit ToHost(std::unique_ptr<CFG> config)

ToHost constructor: scalable readout of multiple devices and DMA buffers.

This constructor initialises the object; it does not start reading operations.

Parameters:

config -- configuration parameters.

void start()

Open devices, allocate buffers, create publishers and start reading data.

void print_monitoring()

retrieve and write monitoring information. To be executed by the thread that creates an instance of this class.

void stop()

Stop reading all associated DMA buffers.

Public Members

std::unique_ptr<CFG> cfg
std::list<std::shared_ptr<DEV>> devices
std::map<int, std::shared_ptr<BUF>> dma_buffers