|
SRS-control 0.1.4
|
#include <RawFrameReader.hpp>

Public Member Functions | |
| RawFrame ()=default | |
| Default Constructor. No memory allocation. | |
| RawFrame (const std::string &filename) | |
| Constructor that opens a file with the given filename. | |
| auto | read_one_frame (std::vector< char > &binary_data, std::ifstream &input_file) -> std::expected< std::size_t, std::string > |
| Read one frame of the bianry data to a vector. | |
| auto | read_one_frame () -> std::expected< std::string_view, std::string > |
| Read one frame of the binary data from a file specified by the constructor RawFrame(const
std::string&). | |
| auto | get_binary_data () const -> const auto & |
| Getter to the internal binary data used by the member function read_one_frame(). | |
| void | reset () |
Private Attributes | |
| std::string | input_filename_ |
| Input binary file name. | |
| std::ifstream | input_file_ |
| Input binary file handler. | |
| std::vector< char > | input_buffer_ |
| internal binary data buffer | |
Definition at line 13 of file RawFrameReader.hpp.
|
explicitdefault |
Default Constructor. No memory allocation.
|
explicit |
Constructor that opens a file with the given filename.
| filename | The file name of the input binary |
Definition at line 20 of file RawFrameReader.cpp.
|
inline |
Getter to the internal binary data used by the member function read_one_frame().
Definition at line 57 of file RawFrameReader.hpp.
| auto srs::reader::RawFrame::read_one_frame | ( | ) | ->std::expected< std::string_view, std::string > |
Read one frame of the binary data from a file specified by the constructor RawFrame(const std::string&).
The binary data frame is written to the internal member variable input_buffer_; srs::common::LARGE_READ_MSG_BUFFER_SIZE bytes of memory will be reserved for the vector.
Definition at line 67 of file RawFrameReader.cpp.
| auto srs::reader::RawFrame::read_one_frame | ( | std::vector< char > & | binary_data, |
| std::ifstream & | input_file )->std::expected< std::size_t, std::string > |
Read one frame of the bianry data to a vector.
The input vector is first reserved with srs::common::LARGE_READ_MSG_BUFFER_SIZE elements and then resized with the size value, which is read from the binary file in the beginning. The vector is then set with size bytes of data from the file.
| binary_data | The vector of chars to be filled. |
| input_file | Input file handler. |
Definition at line 31 of file RawFrameReader.cpp.
| void srs::reader::RawFrame::reset | ( | ) |
Definition at line 61 of file RawFrameReader.cpp.
|
private |
internal binary data buffer
Definition at line 64 of file RawFrameReader.hpp.
|
private |
Input binary file handler.
Definition at line 63 of file RawFrameReader.hpp.
|
private |
Input binary file name.
Definition at line 62 of file RawFrameReader.hpp.