libcdx: Interfaces to the Channel Data Exchange (CDX) File Format
C++, Python, and Matlab library to exchange data for radio propagation channels
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
CDX::File Class Reference

Base class for the processing of Channel Data Exchange (CDX) files. More...

#include <File.h>

Inheritance diagram for CDX::File:
Inheritance graph
[legend]

Public Member Functions

 File (std::string _file_name)
 Construction from a file name. More...
 
 File (std::string _file_name, double _c0_m_s, double _cir_rate_Hz, double _transmitter_frequency_Hz, const std::vector< std::string > &_link_names)
 Construction from file name and parameters. More...
 
virtual ~File ()
 Destructor.
 
H5::H5File get_file_handle () const
 Returns the file handle to the HDF5 file. More...
 
size_t get_nof_links () const
 Returns number of links. More...
 
double get_cir_rate_Hz () const
 Return the CIR rate of the file. More...
 
double get_c0_m_s () const
 Returns the speed of light in m/s as defined in the CDX file. More...
 
double get_transmitter_frequency_Hz () const
 Returns the transmitter frequency in Hz. More...
 
std::vector< std::string > get_link_names () const
 Returns the link names. More...
 

Static Public Member Functions

static double read_double_h5 (H5::H5File file, std::string dataset_name)
 Reads a double from an HDF5 file. More...
 
static std::string read_string_h5 (H5::H5File file, std::string path)
 Reads string of given path from an CDX file. More...
 

Protected Attributes

const std::string file_name
 the CDX file's name
 
H5::H5File h5file
 the handle to the HDF5 file
 
double c0_m_s
 the speed of light in m/s
 
double cir_rate_Hz
 the CIR update rate in Hz
 
double transmitter_frequency_Hz
 the transmitter frequency in Hz
 
std::string delay_type
 the delay type, either "continuous-delay" or "discrete-delay"
 
std::vector< std::string > link_names
 vector of the link names
 
H5::Group links_group
 handle to the group in the HDF5 file that stores the links
 
const size_t nof_links
 the number of the links
 
std::map< std::string, H5::Group * > link_groups
 vector of pointers to HDF5 groups which contain data for each link in file
 

Detailed Description

Base class for the processing of Channel Data Exchange (CDX) files.

The CDX format is designed to store radio channel responses in terms of multipath components. Each component has a delay and a complex amplitude. The channel response is time-variant, i.e. a channel impulse response is stored for each time step.

A CDX file can contain multiple links and store a channel reponse for each link.

A channel response can be stored with continuous-delay or discrete-delay data.

Continuous-delay data stores a vector of multipath components using the floating point format for their delay. Radio channel models usually generate channel responses in this format.

A discrete-delay CDX file stores the channel response data on a fix delay-time plane. It can be interpreted as measurements stemming from a channel sounding measurement campaign.

A continuous-delay CDX file can be converted to a discrete-delay CDX file with the tool convert-continuous-to-discrete-cdx in the support_programs/ directory.

Constructor & Destructor Documentation

◆ File() [1/2]

CDX::File::File ( std::string  _file_name)

Construction from a file name.

Parameters
[in]_file_nameFile name

◆ File() [2/2]

CDX::File::File ( std::string  _file_name,
double  _c0_m_s,
double  _cir_rate_Hz,
double  _transmitter_frequency_Hz,
const std::vector< std::string > &  _link_names 
)

Construction from file name and parameters.

Parameters
[in]_file_nameFile name
[in]_c0_m_sSpeed of light in m/s
[in]_cir_rate_HzCIR rate in Hz
[in]_transmitter_frequency_HzTransmitter Frequency in Hz
[in]_link_namesVector of strings for the link names

Member Function Documentation

◆ get_c0_m_s()

double CDX::File::get_c0_m_s ( ) const
inline

Returns the speed of light in m/s as defined in the CDX file.

Returns
Speed of light in Hz

◆ get_cir_rate_Hz()

double CDX::File::get_cir_rate_Hz ( ) const
inline

Return the CIR rate of the file.

Returns
CIR rate in Hz

◆ get_file_handle()

H5::H5File CDX::File::get_file_handle ( ) const
inline

Returns the file handle to the HDF5 file.

Returns
File handle

◆ get_link_names()

std::vector<std::string> CDX::File::get_link_names ( ) const
inline

Returns the link names.

Returns
Vector of strings with the link names

◆ get_nof_links()

size_t CDX::File::get_nof_links ( ) const
inline

Returns number of links.

Returns
Number of links

◆ get_transmitter_frequency_Hz()

double CDX::File::get_transmitter_frequency_Hz ( ) const
inline

Returns the transmitter frequency in Hz.

Returns
Transmitter Frequency in Hz

◆ read_double_h5()

double CDX::File::read_double_h5 ( H5::H5File  file,
std::string  dataset_name 
)
static

Reads a double from an HDF5 file.

Parameters
[in]fileFile name
[in]dataset_nameDataset name
Returns
value of Dataset member

◆ read_string_h5()

std::string CDX::File::read_string_h5 ( H5::H5File  file,
std::string  path 
)
static

Reads string of given path from an CDX file.

Parameters
[in]fileFile name
[in]pathDataset name
Returns
value of Dataset member

The documentation for this class was generated from the following files: