Writing Binary Files: Difference between revisions
Line 11: | Line 11: | ||
[[File:Storing_binary_files_file_sink_types_drop_down.png]] | [[File:Storing_binary_files_file_sink_types_drop_down.png]] | ||
Another common type is ''float'', represented by '''<span style="color:orange">orange</span>''', which stores real samples as 32-bit floats. | Another common type is ''float'', represented by '''<span style="color:orange">orange</span>''', which stores real samples as 32-bit floats. | ||
[[File:Storing_binary_files_file_sink_real_floats.png]] | [[File:Storing_binary_files_file_sink_real_floats.png]] | ||
Data may also be stored as 16-bit integers using the short type. Both real and complex samples may be stored with this type, which will be discussed later in this tutorial. | |||
[[File:Storing_binary_files_file_sink_short_ints.png]] | |||
The '''File Sink''' also has a ''File'' parameter which needs to be defined. Click on the three dots: | |||
[[File:Storing_binary_files_navigate_to_path.png]] | |||
On Ubuntu a window will appear which will allows navigation to different directories so the file can be saved. The file can be saved anywhere, including the home directory although for this example it is saved in ''/opt/tutorials'' and the output filename is ''binary_file''. | |||
[[File:Storing_binary_files_save_file.png]] |
Revision as of 23:10, 5 April 2024
The File Sink block takes incoming samples and saves them to local storage.
Block Options for Data Types
By default the File Sink block uses a 32-bit float format for saving interleaved I and Q:
Opening the blocks properties, other formats can be selected from the drop down menu:
Another common type is float, represented by orange, which stores real samples as 32-bit floats.
Data may also be stored as 16-bit integers using the short type. Both real and complex samples may be stored with this type, which will be discussed later in this tutorial.
The File Sink also has a File parameter which needs to be defined. Click on the three dots:
On Ubuntu a window will appear which will allows navigation to different directories so the file can be saved. The file can be saved anywhere, including the home directory although for this example it is saved in /opt/tutorials and the output filename is binary_file.