File Source / Sink
Source
Usage:
src19 = gr.file_source ( type_t type,
char *filename,
bool repeat )
valid types are
- gr.sizeof_char
- gr.sizeof_double
- gr.sizeof_float
- gr.sizeof_gr_complex
- gr.sizeof_int
- gr.sizeof_short
Example:
src19 = gr.file_source ( gr.sizeof_gr_complex, "input_wave", 1)
will read a file named "input_wave" as a complex signal and repeat it continuously.
Example:
disk_src = gr.file_source ( gr.sizeof_short, "burst", 0)
reads a file named "burst" as short (2 byte) integers one time.
Sink
Usage:
dst = gr.file_sink ( type_t type,
char *filename )
Example:
sig_cap = gr.file_sink ( gr.sizeof_float, "capture")
Creates and records to a floating point file named "capture"