diff --git a/common/utils/T/tracer/logger/framelog.c b/common/utils/T/tracer/logger/framelog.c index 057960c38246b98b0e4c7be1225ec02dc9238495..45ae3e399f98dd4e1e091cf39606ad3b7ad3a88f 100644 --- a/common/utils/T/tracer/logger/framelog.c +++ b/common/utils/T/tracer/logger/framelog.c @@ -21,6 +21,7 @@ struct framelog { */ int skip_current; /* internal data for the skip mechanism */ int skip_on; /* internal data for the skip mechanism */ + int update_only_at_sf9; }; static void _event(void *p, event e) @@ -76,7 +77,7 @@ static void _event(void *p, event e) l->buffer[subframe * nsamples + i] = 10*log10(1.0+(float)(I*I+Q*Q)); } - if (subframe == 9) + if (l->update_only_at_sf9 == 0 || subframe == 9) for (i = 0; i < l->common.vsize; i++) l->common.v[i]->append(l->common.v[i], l->x, l->buffer, l->blength); } @@ -91,6 +92,8 @@ logger *new_framelog(event_handler *h, void *database, ret = calloc(1, sizeof(struct framelog)); if (ret == NULL) abort(); + ret->update_only_at_sf9 = 1; + ret->common.event_name = strdup(event_name); if (ret->common.event_name == NULL) abort(); ret->database = database; @@ -144,3 +147,9 @@ void framelog_set_skip(logger *_this, int skip_delay) l->skip_current = 0; l->skip_on = 0; } + +void framelog_set_update_only_at_sf9(logger *_this, int update_only_at_sf9) +{ + struct framelog *l = _this; + l->update_only_at_sf9 = update_only_at_sf9; +} diff --git a/common/utils/T/tracer/logger/logger.h b/common/utils/T/tracer/logger/logger.h index e3e4b97aa5e4e85844376c61663036d3f7a78b5b..c9779731601e25864fb95d05194a9887f59b2ea1 100644 --- a/common/utils/T/tracer/logger/logger.h +++ b/common/utils/T/tracer/logger/logger.h @@ -15,6 +15,7 @@ logger *new_ticklog(void *event_handler, void *database, char *event_name, char *frame_name, char *subframe_name); void framelog_set_skip(logger *_this, int skip_delay); +void framelog_set_update_only_at_sf9(logger *_this, int update_only_at_sf9); #include "view/view.h"