// Copyright (2019-2024) Paul Scherrer Institute #ifndef JUNGFRAUJOCH_SENDBUFFERCONTROL_H #define JUNGFRAUJOCH_SENDBUFFERCONTROL_H #include "SendBuffer.h" #include "ThreadSafeFIFO.h" #include "ZeroCopyReturnValue.h" #include "DiffractionExperiment.h" class SendBufferControl { ThreadSafeFIFO send_buffer_avail; std::vector send_buffer_zero_copy_ret_val; SendBuffer &buffer; public: SendBufferControl(const DiffractionExperiment& experiment, SendBuffer &buffer); ZeroCopyReturnValue *GetBufLocation(); size_t GetAvailBufLocations(); bool CheckIfBufferReturned(std::chrono::microseconds timeout); }; #endif //JUNGFRAUJOCH_SENDBUFFERCONTROL_H