File file_writer_service.hpp
This file implements a service for writing results asynchronously to the signal output file and manages the buffered communication between clients and the file server (head node).
- Author
Benjamin Lindner ben@benlabs.net
- Version
See VERSION in CMakeLists.txt
- Copyright
GNU General Public License
Enums
-
struct HDF5DataEntry
- #include <file_writer_service.hpp>
Type class which is used to buffer the result data before it is written to file.
-
class HDF5WriterClient
- #include <file_writer_service.hpp>
Client side code which implements buffered writing of the results and does automatic flushing of the data towards the server
Public Functions
-
HDF5WriterClient(boost::asio::ip::tcp::endpoint server)
-
~HDF5WriterClient()
-
void write(CartesianCoor3D qvector, const std::vector<std::complex<double>> &data, const std::complex<double> data2, const std::complex<double> data3)
-
void write(CartesianCoor3D qvector, const fftw_complex *data, size_t NF, const std::complex<double> data2, const std::complex<double> data3)
-
void flush()
Private Members
-
boost::asio::ip::tcp::endpoint m_endpoint
-
boost::posix_time::ptime m_lastflush
-
std::queue<HDF5DataEntry> data_queue
-
HDF5WriterClient(boost::asio::ip::tcp::endpoint server)
-
class HDF5WriterService
- #include <file_writer_service.hpp>
Server side code which implements buffered writing of the results and does automatic flushing of the data into the signal file.
Public Functions
-
inline boost::asio::ip::tcp::endpoint get_endpoint()
-
std::vector<CartesianCoor3D> get_qvectors()
-
void hangup()
-
void run()
Private Functions
-
void init_new(size_t nf)
-
void init(size_t nf)
-
bool test_fqt_dim(size_t nf)
-
void listener()
-
void flush()
-
inline boost::asio::ip::tcp::endpoint get_endpoint()