Input/trace32_ad: Add reset() function

This commit is contained in:
Soeren Apel 2016-05-02 18:16:21 +02:00 committed by Uwe Hermann
parent 4c55ea47a7
commit 87616181f9
1 changed files with 16 additions and 0 deletions

View File

@ -748,6 +748,21 @@ static int end(struct sr_input *in)
return ret; return ret;
} }
static int reset(struct sr_input *in)
{
struct context *inc = in->priv;
inc->meta_sent = FALSE;
inc->header_read = FALSE;
inc->records_read = FALSE;
inc->trigger_sent = FALSE;
inc->cur_record = 0;
g_string_truncate(in->buf, 0);
return SR_OK;
}
static struct sr_option options[] = { static struct sr_option options[] = {
{ "podA", "Import pod A / iprobe", { "podA", "Import pod A / iprobe",
"Create channels and data for pod A / iprobe", NULL, NULL }, "Create channels and data for pod A / iprobe", NULL, NULL },
@ -797,4 +812,5 @@ SR_PRIV struct sr_input_module input_trace32_ad = {
.init = init, .init = init,
.receive = receive, .receive = receive,
.end = end, .end = end,
.reset = reset,
}; };