SRS-control 0.1.4
 
Loading...
Searching...
No Matches
RawFrameReader.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <fstream>
4#include <print>
6#include <string>
7#include <vector>
8
9namespace srs::reader
10{
12 {
13 public:
15 explicit RawFrame() = default;
16
23 explicit RawFrame(const std::string& filename);
24
37 static auto read_one_frame(std::vector<char>& binary_data, std::ifstream& input_file) -> std::size_t;
38
50 auto read_one_frame() -> std::string_view;
51
53 auto get_binary_data() const -> const auto& { return input_buffer_; }
54
55 private:
56 std::string input_filename_;
57 std::ifstream input_file_;
58 std::vector<char> input_buffer_;
59 };
60} // namespace srs::reader
auto read_one_frame() -> std::string_view
Read one frame of the binary data from a file specified by the constructor RawFrame(conststd::string&...
std::string input_filename_
Input binary file name.
std::vector< char > input_buffer_
internal binary data buffer
RawFrame()=default
Default Constructor. No memory allocation.
auto get_binary_data() const -> const auto &
Getter to the internal binary data used by the member function read_one_frame().
std::ifstream input_file_
Input binary file handler.