gd_mplex_lookback(3)
π gd_mplex_lookback π
okay bestie, gather round, because we're talking about gd_mplex_lookback(3) β a lil function from the GETDATA family that does exactly one job and does it slayfully. no cap.
β¨ NAME β¨
gd_mplex_lookback β set the GetData lookback length for MPLEX fields. that's it, that's the whole vibe π
πΈ SYNOPSIS πΈ
#include <getdata.h>
void gd_mplex_lookback(DIRFILE *dirfile, int lookback);
π¦ DESCRIPTION π¦
so. gd_mplex_lookback() controls how far back GetData will search for the initial value of a field when it's reading an MPLEX field out of the dirfile(5) database you handed it in dirfile. it's giving "how deep are we digging, bestie" π
here's the situation: if the first sample returned for a MPLEX field doesn't contain the value of the field β because the index field doesn't take on the specified multiplex index value β then GetData has to search the field backwards to find the last time the field was actually updated, so it can propagate that value into the initial portion of the returned data. (peep gd_getdata(3) for the full tea on what data comes back for a MPLEX field.)
this function sets how much data GetData searches before it gives up, based on lookback. two special cases, bestie, listen close:
- if
lookbackis zero, the search is disabled completely, and the start of the returned data gets padded (with zero or IEEE-754-conformant not-a-number) β unless the first sample returned happens to contain the value of the field. so like, no digging, hope for the best π - if
lookbackis the special symbolGD_LOOKBACK_ALL, GetData will exhaustively search all available data before the returned portion for an initial value. full send. π₯
if it's not one of those special values, lookback should be a positive integer specifying the number of MPLEX periods to search. and every MPLEX field has its own period, measured in samples of the index field, defined like this:
- if the MPLEX field in question specifies an optional period positive parameter (check the MPLEX definition in
dirfile-format(5)), its period is that many samples; - otherwise, if the MPLEX field's
count_valis at least five, its period is one more sample than twice that value; - otherwise, the period is ten samples.
so given these MPLEX definitions, right:
field1 MPLEX data_field index_field 7 12
field2 MPLEX data_field index_field 2 6
field3 MPLEX data_field index_field 7
field4 MPLEX data_field index_field 2
field1has a period of 12 samples, andfield2has a period of 6 samples (both of those are just the value of their period parameters);field3has a period of 15 samples (one more than twice it'scount_val);field4has a period of 10 samples (the default value, since itscount_valis less than five).
the initial value of the MPLEX lookback is ten periods. this value is provided in getdata.h as GD_DEFAULT_LOOKBACK. iconic of it honestly π
and the best part? this function always succeeds and returns no value. no error codes, no drama, no notes. it just does the thing and moves on. main character energy fr fr β¨
π HISTORY π
gd_mplex_lookback() appeared in GetData-0.8.0. a whole era began π
π SEE ALSO π
gd_getdata(3), gd_open(3), dirfile(5), dirfile-format(5)
and that's the whole page, bestie!! this lil gem is from Version 0.10.0, dated 25 December 2016 β happy holidays from the GetData girlies ππ periodt.
π¦ where this page comes from
- debian bookworm: libgetdata-doc 0.11.0-6
- debian trixie: libgetdata-doc 0.11.0-15
- fedora 43: getdata-devel 0.11.0-13.fc43 Β· GPL-2.0-or-later
- fedora 43: getdata-devel 0.11.0-13.fc43 Β· GPL-2.0-or-later
- fedora 44: getdata-devel 0.11.0-14.fc44 Β· GPL-2.0-or-later
- fedora 44: getdata-devel 0.11.0-14.fc44 Β· GPL-2.0-or-later
- nixos 26.05: getdata 0.11.0
- nixpkgs unstable: getdata 0.11.0
- ubuntu jammy: libgetdata-doc 0.11.0-3ubuntu1
- ubuntu noble: libgetdata-doc 0.11.0-13
- ubuntu questing: libgetdata-doc 0.11.0-15
- ubuntu resolute: libgetdata-doc 0.11.0-17build1
- ubuntu stonking: libgetdata-doc 0.11.0-17build2
- Copyright (C) 2016 D. V. Wiebe
- Copyright (C) 2012, 2013, 2016 D.V. Wiebe
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms