FreeCalypso > hg > ice1-trau-tester
view pcm-br/user_cmd.c @ 52:626180a15857 default tip
ater play-d144: emit E-data frames manually,
osmo_trau_frame_encode() is currently broken for this frame type
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 25 Sep 2024 06:40:43 +0000 |
parents | 499d065ee591 |
children |
line wrap: on
line source
/* * In this module we handle user-issued stdin commands during * itt-pcm-br running session. */ #include <stdint.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <osmocom/core/select.h> #include "globals.h" static struct cmdtab { char *cmd; void (*func)(int argc, char **argv); } cmdtab[] = { {"record-a", cmd_record_a_start}, {"record-a-stop", cmd_record_a_stop}, {"record-b", cmd_record_b_start}, {"record-b-stop", cmd_record_b_stop}, {"show-a", cmd_show_a}, {"show-b", cmd_show_b}, /* table search terminator */ {NULL, NULL} }; void handle_user_cmd(int argc, char **argv) { struct cmdtab *tp; for (tp = cmdtab; tp->cmd; tp++) if (!strcmp(tp->cmd, argv[0])) break; if (!tp->func) { printf("error: unknown or unimplemented command\n"); return; } tp->func(argc, argv); }