1DC_DEVICE_OPEN(3)        BSD Library Functions Manual        DC_DEVICE_OPEN(3)
2

NAME

4     dc_device_open — open a dive computer device
5

LIBRARY

7     library “libdivecomputer”
8

SYNOPSIS

10     #include <libdivecomputer/device.h>
11
12     dc_status_t
13     dc_device_open(dc_device_t **device, dc_context_t *context,
14         dc_descriptor_t *descriptor, const char *name);
15

DESCRIPTION

17     Open a dive computer device for processing.  Accepts a context opened
18     with dc_context_new(3), a dive computer descriptor usually found by
19     searching through dc_descriptor_iterator(3), and a platform-specific
20     device name (such as /dev/ttyUSBx on Linux, /dev/tty.xxx on Mac OS X,
21     /dev/ttyUx on the BSDs, or COMx on Microsoft Windows).
22
23     Upon returning DC_STATUS_SUCCESS, the device pointer must be freed with
24     dc_device_close(3).
25

RETURN VALUES

27     Returns DC_STATUS_SUCCESS on success or one of several error values on
28     error.  On success, the device pointer is filled in with an open handle.
29

SEE ALSO

31     dc_context_new(3), dc_descriptor_iterator(3), dc_device_close(3)
32

AUTHORS

34     The library “libdivecomputer” library was written by Jef Driesen,
35     jef@libdivecomputer.org.  The manpages were written by
36     Kristaps Dzonsons, kristaps@bsd.lv.
37
38BSD                             January 5, 2017                            BSD
Impressum