Class Reader
Contents
Class Reader#
Defined in File eh5_reader.h
Inheritance Relationships#
Base Type#
public measurement::base::Reader
Class Documentation#
-
class Reader : public measurement::base::Reader#
Hdf5 based Reader Implementation.
Public Functions
-
Reader() = default#
Constructor.
-
inline explicit Reader(const std::string &path)#
Constructor.
- Parameters
path – Input file path / measurement directory path (see meas directory structure description bellow, in Open method).
-
inline bool Open(const std::string &path) override#
Open file.
- Parameters
path – Input file path / Reader directory path.
Default Reader directory structure: - root directory e.g.: M:\Reader_directory\Reader01 - documents directory: |_doc - hosts directories: |_Host1 (e.g.: CARPC01) |_Host2 (e.g.: CARPC02) File path as input - root directory (e.g.: M:\Reader_directory\Reader01) in this case all hosts subdirectories will be iterated, - host directory (e.g.: M:\Reader_directory\Reader01\CARPC01), - file path, path to file from Reader (e.g.: M:\Reader_directory\Reader01\CARPC01\meas01_05.hdf5).
- Returns
true if input measurement/file path was opened, false otherwise.
-
inline bool Close() override#
Close file.
- Returns
true if succeeds, false if it fails
-
inline bool IsOk() const override#
Checks if file/measurement is ok.
- Returns
true if meas can be opened(read) false otherwise
-
inline std::string GetFileVersion() const override#
Get the File Type Version of the current opened file.
- Returns
file version
-
inline std::set<std::string> GetChannelNames() const override#
Get the available channel names of the current opened file / measurement.
- Returns
channel names
-
inline bool HasChannel(const std::string &channel_name) const override#
Check if channel exists in measurement.
- Parameters
channel_name – name of the channel
- Returns
true if exists, false otherwise
-
inline std::string GetChannelDescription(const std::string &channel_name) const override#
Get the channel description for the given channel.
- Parameters
channel_name – channel name
- Returns
channel description
-
inline std::string GetChannelType(const std::string &channel_name) const override#
Gets the channel type of the given channel.
- Parameters
channel_name – channel name
- Returns
channel type
-
inline long long GetMinTimestamp(const std::string &channel_name) const override#
Gets minimum timestamp for specified channel.
- Parameters
channel_name – channel name
- Returns
minimum timestamp value
-
inline long long GetMaxTimestamp(const std::string &channel_name) const override#
Gets maximum timestamp for specified channel.
- Parameters
channel_name – channel name
- Returns
maximum timestamp value
-
inline bool GetEntriesInfo(const std::string &channel_name, EntryInfoSet &entries) const override#
Gets the header info for all data entries for the given channel Header = timestamp + entry id.
- Parameters
channel_name – [in] channel name
entries – [out] header info for all data entries
- Returns
true if succeeds, false if it fails
-
inline bool GetEntriesInfoRange(const std::string &channel_name, long long begin, long long end, EntryInfoSet &entries) const override#
Gets the header info for data entries for the given channel included in given time range (begin->end) Header = timestamp + entry id.
- Parameters
channel_name – [in] channel name
begin – [in] time range begin timestamp
end – [in] time range end timestamp
entries – [out] header info for data entries in given range
- Returns
true if succeeds, false if it fails
-
inline bool GetEntryDataSize(long long entry_id, size_t &size) const override#
Gets data size of a specific entry.
- Parameters
entry_id – [in] Entry ID
size – [out] Entry data size
- Returns
true if succeeds, false if it fails
-
inline bool GetEntryData(long long entry_id, void *data) const override#
Gets data from a specific entry.
- Parameters
entry_id – [in] Entry ID
data – [out] Entry data
- Returns
true if succeeds, false if it fails
-
Reader() = default#