File wfm_compose_bridge.h¶
File List > doppler > wfm_compose > wfm_compose_bridge.h
Go to the documentation of this file
/*
* wfm_compose_bridge.h — straight-C seams of the `wfm_compose` composer
* (generated by jm; gh-998).
*
* Every function declared here is written by THIS PROJECT, in plain C, and
* called by the generated binding. The declarations are jm's so that there
* is exactly one of each: include this header from a test, a benchmark or a
* sibling component rather than re-declaring a signature jm already owns.
*/
#ifndef DP_WFM_COMPOSE_BRIDGE_H
#define DP_WFM_COMPOSE_BRIDGE_H
#include "doppler/wfm/wfm_compose.h"
#include "doppler/wfm_synth/wfm_synth_core.h"
#include "doppler/frame/frame_core.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Build the composed generator from a source config (source -> generator). */
dp_wfm_synth_state_t *dp_wfm_source_to_synth(const wfm_source_t *, double);
/* Why dp_wfm_source_to_synth() refused: a reason raised as ValueError, or NULL
* for none (RuntimeError). Same arguments; called only after it returned
* NULL (gh-1307). */
const char *dp_wfm_source_to_synth_error(const wfm_source_t *, double);
/* Read a str as the bits of `acq_code`, `data_code`, `bits`, `data`, `fill`
* (coerce_str_fn, gh-1709): out NULL sizes; returns the bit count, or 0
* with *why set on a refusal. */
size_t dp_wfm_source_bits_refuse_text(const char *, uint8_t *, size_t, const char **);
/* Read a str as the bits of `sync` (coerce_str_fn, gh-1709): out NULL
* sizes; returns the bit count, or 0 with *why set on a refusal. */
size_t dp_wfm_source_sync_refuse_text(const char *, uint8_t *, size_t, const char **);
/* Read a str as the bits of `crc` (coerce_str_fn, gh-1709): out NULL sizes;
* returns the bit count, or 0 with *why set on a refusal. */
size_t dp_wfm_source_crc_refuse_text(const char *, uint8_t *, size_t, const char **);
/* Owned pointer `frame` (gh-1711): copy. */
wfm_frame_desc_t *dp_wfm_frame_copy(const wfm_frame_desc_t *);
/* Owned pointer `frame` (gh-1711): free. */
void dp_wfm_frame_free(wfm_frame_desc_t *);
/* Owned pointer `frame` (gh-1711): parse, naming a refusal in *why. */
wfm_frame_desc_t *dp_wfm_frame_refuse_text(const char *, const char **why);
/* Owned pointer `frame` (gh-1711): format. */
char *dp_wfm_frame_to_json(const wfm_frame_desc_t *);
#ifdef __cplusplus
}
#endif
#endif /* DP_WFM_COMPOSE_BRIDGE_H */