Skip to content

File wfmgen.h

FileList > inc > wfm > wfmgen.h

Go to the source code of this file

Public Functions

Type Name
int doppler_wfmgen (int argc, char * argv)
Run the wfmgen composer CLI in-process (argv in, exit code out).

Public Functions Documentation

function doppler_wfmgen

Run the wfmgen composer CLI in-process (argv in, exit code out).

int doppler_wfmgen (
    int argc,
    char * argv
) 

Parses argv exactly as the wfmgen binary does (--type, --count, --from-file, --output, --record, the container/wire/endian flags, the zmq:// sink, --realtime pacing, …), composes the waveform, and writes it to the chosen destination (a file, stdout, or a ZMQ PUB endpoint). Output is byte-identical to invoking the CLI with the same arguments — it is the same code path, not a reimplementation.

Process-global only in the ways the CLI is: it may write to stdout / stderr and create the --output / --record files. It installs no signal handlers, registers no atexit hooks, and keeps no mutable global state, so it is safe to call repeatedly within one process. Not reentrant across threads (it shares stdout).

Parameters:

  • argc Argument count, including argv``[0] (the program name).
  • argv Argument vector; argv``[0] is used only in diagnostics/usage.

Returns:

0 on success; a non-zero shell exit code on a usage or I/O error (mirrors the CLI: 1 = runtime/I/O failure, 2 = bad arguments).

// Generate a 4096-sample QPSK capture to a file, in-process.
char *av[] = { "wfmgen", "--type", "qpsk", "--count", "4096",
               "--output", "out.cf32", NULL };
int rc = doppler_wfmgen(7, av);   // rc == 0; out.cf32 written


The documentation for this class was generated from the following file native/inc/wfm/wfmgen.h