masters-thesis/listings/signal_generation.c
Dennis af25b4b828 Initial commit of master's thesis
This is the version I submitted to RWTH Aachen University at November 9,
2018.
2018-11-12 12:56:59 +01:00

25 lines
598 B
C

int signal_generator_read(struct node *n, struct sample *smps[],
unsigned cnt, unsigned *release)
{
struct signal_generator *s = (struct signal_generator *) n->_vd;
struct timespace ts;
int steps;
/* Block until 1/p->rate seconds elapsed */
steps = task_wait(&s->task);
if (steps > 1 && s->monitor_missed) {
warn("Missed steps: %u", steps-1);
s->missed_steps += steps-1;
}
ts = time_now();
/**
* Generate sample(s) with signal and timestamp ts .
* Return this sample via the *smps[] parameter of
* signal_generator_read()
*/
}