DC_PARSER_SAMPLES_FOREACH(3) | Library Functions Manual | DC_PARSER_SAMPLES_FOREACH(3) |
dc_parser_samples_foreach
—
#include
<libdivecomputer/parser.h>
typedef void
(*dc_sample_callback_t)
(dc_sample_type_t
type, dc_sample_value_t value,
void *userdata);
dc_status_t
dc_parser_samples_foreach
(dc_parser_t
*parser, dc_sample_callback_t callback,
void *userdata);
Samples are invoked as a sequence of sample sets. Each sequence
begins with a DC_SAMPLE_TIME
, then a number of
sample types in the set. When the next
DC_SAMPLE_TIME
is recorded, the sample set may be
closed and a new one reopened. After all samples have been rendered, the
last sample set should be closed.
The following sample types may be raised:
DC_SAMPLE_TIME
DC_SAMPLE_DEPTH
DC_SAMPLE_PRESSURE
DC_FIELD_TANK_COUNT
in
dc_parser_get_field(3))
and the pressure in bar.DC_SAMPLE_TEMPERATURE
DC_SAMPLE_EVENT
SAMPLE_EVENT_NONE
,
SAMPLE_EVENT_DECOSTOP
,
SAMPLE_EVENT_RBT
,
SAMPLE_EVENT_ASCENT
,
SAMPLE_EVENT_CEILING
,
SAMPLE_EVENT_WORKLOAD
,
SAMPLE_EVENT_TRANSMITTER
,
SAMPLE_EVENT_VIOLATION
,
SAMPLE_EVENT_BOOKMARK
,
SAMPLE_EVENT_SURFACE
,
SAMPLE_EVENT_SAFETYSTOP
,
SAMPLE_EVENT_SAFETYSTOP_VOLUNTARY
,
SAMPLE_EVENT_SAFETYSTOP_MANDATORY
,
SAMPLE_EVENT_DEEPSTOP
,
SAMPLE_EVENT_CEILING_SAFETYSTOP
,
SAMPLE_EVENT_FLOOR
,
SAMPLE_EVENT_DIVETIME
,
SAMPLE_EVENT_MAXDEPTH
,
SAMPLE_EVENT_OLF
,
SAMPLE_EVENT_PO2
,
SAMPLE_EVENT_AIRTIME
,
SAMPLE_EVENT_RGBM
,
SAMPLE_EVENT_HEADING
, or
SAMPLE_EVENT_TISSUELEVEL
.DC_SAMPLE_RBT
DC_SAMPLE_HEARTBEAT
DC_SAMPLE_BEARING
DC_SAMPLE_VENDOR
DC_SAMPLE_SETPOINT
DC_SAMPLE_PPO2
DC_SAMPLE_CNS
DC_SAMPLE_DECO
DC_DECO_NDL
(no decompression limit),
DC_DECO_SAFETYSTOP
(the safety stop),
DC_DECO_DECOSTOP
(a decompression stop), or
DC_DECO_DEEPSTOP
(a mandatory or suggested
deep-stop). Also sets the depth in metres and the
time in seconds.DC_SAMPLE_GASMIX
DC_FIELD_GASMIX_COUNT
in
dc_parser_get_field(3)).
Sets the gasmix field.DC_STATUS_OK
on success and another code on
failure.
January 5, 2017 | NetBSD 10.0 |