Public Member Functions |
| AofFile (const std::string &name, FILE *fd, bool close_on_exit=true) |
virtual Encoding | type () const throw () |
| Get the name of the dba_file.
|
bool | read (Rawmsg &msg) |
| Read a message from the file.
|
void | write (const Rawmsg &msg) |
| Write the encoded message data to the file.
|
void | read_header () |
| Read the file header, perform some consistency checks then discard the data.
|
void | write_dummy_header () |
| Write a dummy file header.
|
void | fix_header () |
| Rewrite the file header, scanning the file to compute a correct one.
|
Protected Member Functions |
bool | read_record (std::string &res) |
| Read a Fortran Unformatted Sequential Binary record from a file.
|
void | write_record (const std::string &res) |
| Write a Fortran Unformatted Sequential Binary record to a file.
|
void | write_record (const uint32_t *words, size_t wordcount) |
| Write a Fortran Unformatted Sequential Binary record to a file.
|
void | write_word (uint32_t word) |
| Write a word to the file, byteswapping it for endianness if needed.
|
Member Function Documentation
Read a message from the file.
- Parameters:
-
msg | The Rawmsg that will hold the data. |
- Returns:
- true if a message has been found in the file, else false.
Implements dballe::File.
Read a Fortran Unformatted Sequential Binary record from a file.
- Parameters:
-
res | The data read. The resulting data is an array of 32bit words that will be byteswapped to native endianness if needed. |
- Returns:
- true if a record was found, false on EOF
Get the name of the dba_file.
- Returns:
- The file name.
Implements dballe::File.
Write the encoded message data to the file.
- Parameters:
-
msg | The ::dba_rawmsg with the encoded data to write |
Reimplemented from dballe::File.
Write a Fortran Unformatted Sequential Binary record to a file.
- Parameters:
-
res | The data to be written, considered an array of 32bit words that will be byteswapped for endianness if needed |
Write a Fortran Unformatted Sequential Binary record to a file.
- Parameters:
-
words | The data to be written, as an array of 32bit words that will be byteswapped for endianness if needed |
The documentation for this class was generated from the following file: