libcdx: Interfaces to the Channel Data Exchange (CDX) File Format
C++, Python, and Matlab library to exchange data for radio propagation channels
WriteFile.h
Go to the documentation of this file.
1 
7 #ifndef WRITECDXFILE_H_
8 #define WRITECDXFILE_H_
9 
10 #include "File.h"
11 
12 namespace CDX {
13 
17 class WriteFile: public File {
18 public:
19  WriteFile(std::string _file_name, double _c0_m_s, double _cir_rate_Hz,
20  double _transmitter_frequency, std::vector<std::string> _link_names);
21 
22  virtual ~WriteFile();
23 
25  void create_group(std::string path);
26 
30  void write(std::string path, std::string data);
31 
35  void write(std::string path, double data);
36 
40  void write(std::string path, double *data, size_t num);
41 
45  void write(std::string path, const std::vector<double> &data);
46 
50  void write(const H5::CommonFG *h5file, const std::string &path,
51  const std::vector<std::string> &data);
52 
56  void write(const H5::CommonFG *h5file, const std::string &path,
57  const std::map<uint16_t, std::string> &data);
58 
62  void write(H5::Group *group, std::string path,
63  const std::vector<double> &data);
64 
68  void write(std::string path, const std::vector<std::vector<double> > &data);
69 
70 protected:
75  void create_reference_delays_dataset(H5::Group *group);
76 
80  void append_reference_delay(H5::Group *group, double reference_delay);
81 };
82 
83 } // end of namespace CDX
84 
85 #endif /* WRITECDXFILE_H_ */
void write(std::string path, std::string data)
Writes string data to path.
Base class for writing continuous-delay and discrete-delay CDX files.
Definition: WriteFile.h:17
Base class for the processing of Channel Data Exchange (CDX) files.
Definition: File.h:95
H5::H5File h5file
the handle to the HDF5 file
Definition: File.h:196
void append_reference_delay(H5::Group *group, double reference_delay)
Append single value to reference delay dataset.
Definition: WriteFile.cpp:236
Contains all CDX classes and types.
Definition: File.cpp:19
void create_group(std::string path)
Definition: WriteFile.cpp:52
void create_reference_delays_dataset(H5::Group *group)
Creates 1D dataset for reference delays in file. Initial size is zero and dataset has unlimited dimen...
Definition: WriteFile.cpp:197