NAME dc_context_new — create a new device-handling context
LIBRARY library “libdivecomputer”
Create a context in which dive computers may be queried. The “context” supplies logging messages and so on, and may be re-used for multiple dive computer query sessions. It is usually passed to dc_device_open(3)
to query a specific dive computer device.
On success, the context must be freed with dc_context_free(3)
. You may configure the context with dc_context_set_loglevel(3)
. This is highly recommended as the default logging behaviour of dc_context_new
depends upon compile-time values.
RETURN VALUES This returns DC_STATUS_OK on success, in which case context is filled in, or an error code on failure.