1
2
3
4
5
6
7
8
9gd_mplex_lookback(3) GETDATA gd_mplex_lookback(3)
10
11
12
14 gd_mplex_lookback — set the GetData lookback length for MPLEX fields.
15
16
18 #include <getdata.h>
19
20 void gd_mplex_lookback(DIRFILE *dirfile, int lookback);
21
22
24 The gd_mplex_lookback() function controls how far GetData searches
25 backwards for the initial value of a field when reading a MPLEX field
26 from the dirfile(5) database specified by dirfile.
27
28 If the first sample returned of a MPLEX field does not contain the val‐
29 ue of the field, because the index field does not take on the specified
30 multiplex index value, GetData must search the field backwards to find
31 the last time the field was updated, in order to propagate that value
32 into the initial portion of the returned data. (See gd_getdata(3) for
33 further discussion on the data returned for a MPLEX field).
34
35 This function sets the amount of data GetData searches before giving up
36 according to the value of lookback. If lookback is zero, this search
37 is disabled completely, and the start of the returned data will be
38 padded (with zero or IEEE-754-conformant not-a-number) unless the first
39 sample returned happens to contain the value of the field. If lookback
40 is the special symbol GD_LOOKBACK_ALL, GetData will exhaustively search
41 all available data before the returned portion for an initial value.
42
43 If not one of the special values, lookback should be a positive integer
44 specifying the number of MPLEX periods to search. Each MPLEX field has
45 its own period, measured in samples of the index field, which is de‐
46 fined as follows:
47
48 · if the MPLEX field in question specifies an optional period pos‐
49 itive parameter (see the MPLEX definition in dirfile-format(5)),
50 its period is that many samples;
51
52 · otherwise, if the MPLEX field's count_val is at least five, its
53 period is one more sample than twice that value;
54
55 · otherwise, the period is ten samples.
56
57 So, given the following MPLEX definitions:
58
59 field1 MPLEX data_field index_field 7 12
60 field2 MPLEX data_field index_field 2 6
61 field3 MPLEX data_field index_field 7
62 field4 MPLEX data_field index_field 2
63
64 field1 has a period of 12 samples and field2 a period of 6 samples
65 (both the value of their period parameters); field3 has a period of 15
66 samples (one more than twice it's count_val), and field4 has a period
67 of 10 samples (the default value, since its count_val is less than
68 five).
69
70 The initial value of the MPLEX lookback is ten periods. This value is
71 provided in getdata.h as GD_DEFAULT_LOOKBACK.
72
73 This function always succeeds and returns no value.
74
75
77 The gd_mplex_lookback() function appeared in GetData-0.8.0.
78
79
81 gd_getdata(3), gd_open(3), dirfile(5), dirfile-format(5)
82
83
84
85Version 0.10.0 25 December 2016 gd_mplex_lookback(3)