The number of values in the values array.
An array of HI_stVALUE structures.
The size of the new_values array.
A new array of HI_stVALUEs to contain the data from values, with duplicate values inserted where the difference in time exceeds gap.
The threshold difference between adjacent X values that determines the existence of a gap.
This function inserts duplicate Y-value points into the buffer when the X-axis gap between a pair of values exceeds the specified gap threshold. This will cause the graph of the data to show a constant value spanning the gap, rather than a misleading ramp between the points.
This function requires the return value from HI_GapCountBuffer to calculate and allocate the size of the new array that will contain the additional data. These two functions, when used together, correspond to the Cascade Historian hist_gap_buffer dynamic library function.
ngaps = HI_GapCountBuffer(n, values, gap);
n2 = n + ngaps;
new_values = ME_ZMalloc( n2 * sizeof (HI_stVALUE));
HI_GapFillBuffer (n, values, n2, new_values, gap);