The ts_hide_elem() function
The ts_hide_elem() function marks the element at the given time stamp as invisible to a scan unless TS_SCAN_HIDDEN is set.
Syntax
ts_timeseries
ts_hide_elem(ts_tsdesc *tsdesc,
mi_datetime *tstamp)
- tsdesc
- The time series descriptor returned by ts_open() for the source time series.
- tstamp
- The time stamp to be made invisible to the scan.
Description
When an element is hidden, element
retrieval API functions such as ts_elem() and ts_nth_elem() return
the hidden element; however, their STATUS argument has the
TS_NULL_HIDDEN bit set. The values for the element's STATUS argument
are:
- If STATUS is TS_NULL_HIDDEN, the element is hidden.
- If STATUS is TS_NULL_NOTALLOCED, the element is
NULL
. - If STATUS is both TS_NULL_HIDDEN and TS_NULL_NOTALLOCED,
the element is both hidden and
NULL
. - If STATUS is 0 (zero), the element is not hidden and is
not
NULL
.
The TS_ELEM_HIDDEN and TS_ELEM_NULL macros are provided to check the value of STATUS.
Hidden elements cannot be modified; they must be revealed first using ts_reveal_elem().
The equivalent SQL function is HideElem.
Returns
The modified time series. If there is no element at the given time stamp, an error is raised.