MatLogger2  1.0.0
Library for logging of numeric data to HDF5 MAT-files, which is RT-safe and multithreaded.
matio_backend.h
Go to the documentation of this file.
1 #ifndef __XBOT_MATLOGGER2_MATIO_BACKEND_H__
2 #define __XBOT_MATLOGGER2_MATIO_BACKEND_H__
3 
4 #include <cstdio>
5 
6 #include <matio-cmake/matio/src/matio.h>
7 #include "matlogger2_backend.h"
8 
9 namespace XBot { namespace matlogger2 {
10 
11  class MatioBackend : public Backend
12  {
13 
14  public:
15 
16  virtual bool init(std::string logger_name,
17  bool enable_compression) override;
18 
19  virtual bool write(const char * name,
20  const double * data,
21  int rows,
22  int cols,
23  int slices) override;
24 
25  virtual bool close() override;
26 
27  private:
28 
29  mat_t * _mat_file;
30  matio_compression _compression;
31  };
32 
33 } }
34 
35 
36 
37 #endif
virtual bool close() override
virtual bool init(std::string logger_name, bool enable_compression) override
virtual bool write(const char *name, const double *data, int rows, int cols, int slices) override