Default ADTF DAT File Writer to write an ADTF DAT File (IFHD file with ADTF type and sample content).
More...
#include <adtf_file_writer.h>
|
| | ADTFDatFileWriter (const std::string &file_name, std::chrono::nanoseconds history_duration, StreamTypeSerializers type_serializers, TargetADTFVersion target_adtf_version=adtf3ns, uint32_t writer_flags=0) |
| | CTOR for a new ADTF file for writing.
|
| |
|
| ADTFDatFileWriter (const ADTFDatFileWriter &)=delete |
| |
|
| ADTFDatFileWriter (ADTFDatFileWriter &&)=default |
| | move CTOR
|
| |
| size_t | createStream (const std::string &name, const StreamType &initial_type, const std::shared_ptr< SampleSerializer > &serializer) |
| | Create a Stream and retrieve the stream id for it.
|
| |
| void | write (size_t stream_id, std::chrono::nanoseconds time_stamp, const StreamType &type) |
| | Writes a type to the file or the history.
|
| |
| void | write (size_t stream_id, std::chrono::nanoseconds time_stamp, const WriteSample &sample) |
| | Writes a sample to the file or the history.
|
| |
| void | writeTrigger (size_t stream_id, std::chrono::nanoseconds time_stamp) |
| | Writes a trigger to the file or the history.
|
| |
|
void | quitHistory () |
| | quits the history.
|
| |
| std::shared_ptr< OutputStream > | getExtensionStream (const std::string &name, uint32_t user_id, uint32_t type_id, uint32_t file_version_id) |
| | Creates and gets a extension stream to write information into an extension.
|
| |
| void | setFileDescription (const std::string &description) |
| | Set the File Description.
|
| |
Default ADTF DAT File Writer to write an ADTF DAT File (IFHD file with ADTF type and sample content).
◆ TargetADTFVersion
◆ ADTFDatFileWriter()
| adtf_file::ADTFDatFileWriter::ADTFDatFileWriter |
( |
const std::string & | file_name, |
|
|
std::chrono::nanoseconds | history_duration, |
|
|
StreamTypeSerializers | type_serializers, |
|
|
TargetADTFVersion | target_adtf_version = adtf3ns, |
|
|
uint32_t | writer_flags = 0 ) |
CTOR for a new ADTF file for writing.
- Parameters
-
| file_name | the filename / filepath to create |
| history_duration | time for history of the file in nanoseconds |
| type_serializers | ther serializers for the stream type to use |
| target_adtf_version | the target ADTF version the file to create for
|
| writer_flags | Writing flags. See ifhd::v201_v301::OpenMode |
- Exceptions
-
| exceptions::ErrorFileAccess,exceptions::ErrorFileAlreadyExists | |
◆ createStream()
| size_t adtf_file::ADTFDatFileWriter::createStream |
( |
const std::string & | name, |
|
|
const StreamType & | initial_type, |
|
|
const std::shared_ptr< SampleSerializer > & | serializer ) |
Create a Stream and retrieve the stream id for it.
- Parameters
-
| name | the name of the stream |
| initial_type | the initial stream type of the stream |
| serializer | the sample serializer to use for the stream |
- Returns
- size_t the stream id
◆ getExtensionStream()
| std::shared_ptr< OutputStream > adtf_file::ADTFDatFileWriter::getExtensionStream |
( |
const std::string & | name, |
|
|
uint32_t | user_id, |
|
|
uint32_t | type_id, |
|
|
uint32_t | file_version_id ) |
Creates and gets a extension stream to write information into an extension.
- Parameters
-
| name | name of the extension |
| user_id | the user id for the extension |
| type_id | the type id for the extension |
| file_version_id | the file version id for the extension |
- Returns
- std::shared_ptr<OutputStream> to write the extension to
◆ setFileDescription()
| void adtf_file::ADTFDatFileWriter::setFileDescription |
( |
const std::string & | description | ) |
|
Set the File Description.
- Parameters
-
| description | The description to write to. |
◆ write() [1/2]
| void adtf_file::ADTFDatFileWriter::write |
( |
size_t | stream_id, |
|
|
std::chrono::nanoseconds | time_stamp, |
|
|
const StreamType & | type ) |
Writes a type to the file or the history.
- Parameters
-
| stream_id | stream id the type belongs to |
| time_stamp | appearance time of the type |
| type | the type to write |
◆ write() [2/2]
| void adtf_file::ADTFDatFileWriter::write |
( |
size_t | stream_id, |
|
|
std::chrono::nanoseconds | time_stamp, |
|
|
const WriteSample & | sample ) |
Writes a sample to the file or the history.
- Parameters
-
| stream_id | stream id the sample belongs to |
| time_stamp | appearance time of the sample |
| sample | the sample to write |
◆ writeTrigger()
| void adtf_file::ADTFDatFileWriter::writeTrigger |
( |
size_t | stream_id, |
|
|
std::chrono::nanoseconds | time_stamp ) |
Writes a trigger to the file or the history.
- Parameters
-
| stream_id | stream id the trigger belongs to |
| time_stamp | appearance time of the trigger |
The documentation for this class was generated from the following file: