diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/im-asapo.c | 6 | ||||
-rw-r--r-- | src/im-asapo.h | 1 | ||||
-rw-r--r-- | src/indexamajig.c | 6 |
3 files changed, 12 insertions, 1 deletions
diff --git a/src/im-asapo.c b/src/im-asapo.c index 6df14e93..6bcffe2f 100644 --- a/src/im-asapo.c +++ b/src/im-asapo.c @@ -55,6 +55,7 @@ struct im_asapo AsapoProducerHandle producer; AsapoStringHandle group_id; int wait_for_stream; + int use_ack; }; @@ -173,7 +174,10 @@ struct im_asapo *im_asapo_connect(struct im_asapo_params *params) a->group_id = asapo_string_from_c_str(params->group_id); a->wait_for_stream = params->wait_for_stream; - asapo_consumer_set_resend_nacs(a->consumer, 1, 10000, 3); + a->use_ack = params->use_ack; + if ( a->use_ack ) { + asapo_consumer_set_resend_nacs(a->consumer, 1, 10000, 3); + } asapo_free_handle(&cred); diff --git a/src/im-asapo.h b/src/im-asapo.h index d06f9527..70f67fd0 100644 --- a/src/im-asapo.h +++ b/src/im-asapo.h @@ -45,6 +45,7 @@ struct im_asapo_params int wait_for_stream; int write_output_stream; int consumer_timeout_ms; + int use_ack; }; struct im_asapo; diff --git a/src/indexamajig.c b/src/indexamajig.c index 9416d234..00b15b55 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -474,6 +474,10 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state) } break; + case 226 : + args->asapo_params.use_ack = 1; + break; + /* ---------- Peak search ---------- */ case 't' : @@ -932,6 +936,7 @@ int main(int argc, char *argv[]) args.asapo_params.wait_for_stream = 0; args.asapo_params.write_output_stream = 0; args.asapo_params.consumer_timeout_ms = 500; + args.asapo_params.use_ack = 0; args.cpu_pin = 0; args.serial_start = 1; args.if_peaks = 1; @@ -1065,6 +1070,7 @@ int main(int argc, char *argv[]) "Shut down after this many seconds without ASAP::O data"}, {"asapo-consumer-timeout", 225, "ms", OPTION_NO_USAGE, "ASAP::O get_next timeout for one frame (milliseconds)"}, + {"asapo-acks", 226, NULL, OPTION_NO_USAGE, "Use ASAP::O acknowledgements"}, {NULL, 0, 0, OPTION_DOC, "Peak search options:", 3}, {"peaks", 301, "method", 0, "Peak search method. Default: zaef"}, |