Skip to content

Commit

Permalink
WIP: Add scaffold for history configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
BatchDrake committed Apr 4, 2024
1 parent 6ad6e82 commit d81a586
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions analyzer/slow.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,21 @@ suscan_local_analyzer_set_dc_remove_cb(
return SU_FALSE;
}

SUPRIVATE SUBOOL
suscan_local_analyzer_set_history_size_cb(
struct suscan_mq *mq_out,
void *wk_private,
void *cb_private)
{
suscan_local_analyzer_t *analyzer = (suscan_local_analyzer_t *) wk_private;
SUSCOUNT size = (SUSCOUNT) (uintptr_t) cb_private;

/* TODO: Implement me! */

return SU_FALSE;
}


SUPRIVATE SUBOOL
suscan_local_analyzer_set_agc_cb(
struct suscan_mq *mq_out,
Expand Down Expand Up @@ -638,6 +653,38 @@ suscan_local_analyzer_slow_seek(
return SU_TRUE;
}

SUBOOL
suscan_local_analyzer_slow_set_replay(
suscan_local_analyzer_t *self,
SUBOOL replay)
{
SU_TRYCATCH(
self->parent->params.mode == SUSCAN_ANALYZER_MODE_CHANNEL,
return SU_FALSE);

self->replay_req_state = replay;
self->replay_req = SU_TRUE;

/* This request is to be processed by the source thread */
return SU_TRUE;
}

SUBOOL
suscan_local_analyzer_slow_set_history_size(
suscan_local_analyzer_t *self,
SUSCOUNT size)
{
SU_TRYCATCH(
self->parent->params.mode == SUSCAN_ANALYZER_MODE_CHANNEL,
return SU_FALSE);

return suscan_worker_push(
self->slow_wk,
suscan_local_analyzer_set_history_size_cb,
(void *) (uintptr_t) size);
}


SUBOOL
suscan_local_analyzer_slow_set_dc_remove(
suscan_local_analyzer_t *analyzer,
Expand Down

0 comments on commit d81a586

Please sign in to comment.