├── .github
└── workflows
│ ├── build.yml
│ └── release.yml
├── .gitignore
├── .travis.yml
├── COPYING
├── Makefile.am
├── NEWS
├── README
├── configure.ac
├── contrib
├── README
├── android
│ └── Android.mk
├── msvc
│ ├── libdivecomputer.vcxproj
│ └── libdivecomputer.vcxproj.filters
└── udev
│ └── libdivecomputer.rules
├── doc
├── Makefile.am
├── McLeanExtreme-wire-format.txt
├── doxygen.cfg.in
└── man
│ ├── Makefile.am
│ ├── dc_bluetooth_addr2str.3
│ ├── dc_bluetooth_device_free.3
│ ├── dc_bluetooth_device_get_address.3
│ ├── dc_bluetooth_device_get_name.3
│ ├── dc_bluetooth_iterator_new.3
│ ├── dc_bluetooth_open.3
│ ├── dc_bluetooth_str2addr.3
│ ├── dc_buffer_append.3
│ ├── dc_buffer_free.3
│ ├── dc_buffer_get_data.3
│ ├── dc_buffer_get_size.3
│ ├── dc_buffer_new.3
│ ├── dc_buffer_prepend.3
│ ├── dc_context_free.3
│ ├── dc_context_new.3
│ ├── dc_context_set_logfunc.3
│ ├── dc_context_set_loglevel.3
│ ├── dc_datetime_gmtime.3
│ ├── dc_datetime_localtime.3
│ ├── dc_datetime_mktime.3
│ ├── dc_datetime_now.3
│ ├── dc_descriptor_free.3
│ ├── dc_descriptor_get_model.3
│ ├── dc_descriptor_get_product.3
│ ├── dc_descriptor_get_transports.3
│ ├── dc_descriptor_get_vendor.3
│ ├── dc_descriptor_iterator_new.3
│ ├── dc_device_close.3
│ ├── dc_device_foreach.3
│ ├── dc_device_open.3
│ ├── dc_device_set_cancel.3
│ ├── dc_device_set_events.3
│ ├── dc_device_set_fingerprint.3
│ ├── dc_iostream_close.3
│ ├── dc_irda_device_free.3
│ ├── dc_irda_device_get_address.3
│ ├── dc_irda_device_get_name.3
│ ├── dc_irda_iterator_new.3
│ ├── dc_irda_open.3
│ ├── dc_iterator_free.3
│ ├── dc_iterator_next.3
│ ├── dc_parser_destroy.3
│ ├── dc_parser_get_datetime.3
│ ├── dc_parser_get_field.3
│ ├── dc_parser_new.3
│ ├── dc_parser_samples_foreach.3
│ ├── dc_serial_device_free.3
│ ├── dc_serial_device_get_name.3
│ ├── dc_serial_iterator_new.3
│ ├── dc_serial_open.3
│ ├── dc_usbhid_device_free.3
│ ├── dc_usbhid_device_get_pid.3
│ ├── dc_usbhid_device_get_vid.3
│ ├── dc_usbhid_iterator_new.3
│ ├── dc_usbhid_open.3
│ └── libdivecomputer.3
├── examples
├── Makefile.am
├── common.c
├── common.h
├── dctool.c
├── dctool.h
├── dctool_download.c
├── dctool_dump.c
├── dctool_fwupdate.c
├── dctool_help.c
├── dctool_list.c
├── dctool_parse.c
├── dctool_read.c
├── dctool_scan.c
├── dctool_timesync.c
├── dctool_version.c
├── dctool_write.c
├── output-private.h
├── output.c
├── output.h
├── output_raw.c
├── output_xml.c
├── utils.c
└── utils.h
├── include
├── Makefile.am
└── libdivecomputer
│ ├── Makefile.am
│ ├── atomics_cobalt.h
│ ├── ble.h
│ ├── bluetooth.h
│ ├── buffer.h
│ ├── common.h
│ ├── context.h
│ ├── custom.h
│ ├── datetime.h
│ ├── descriptor.h
│ ├── device.h
│ ├── divesystem_idive.h
│ ├── hw_frog.h
│ ├── hw_ostc.h
│ ├── hw_ostc3.h
│ ├── ioctl.h
│ ├── iostream.h
│ ├── irda.h
│ ├── iterator.h
│ ├── oceanic_atom2.h
│ ├── oceanic_veo250.h
│ ├── oceanic_vtpro.h
│ ├── parser.h
│ ├── reefnet_sensus.h
│ ├── reefnet_sensuspro.h
│ ├── reefnet_sensusultra.h
│ ├── serial.h
│ ├── suunto_d9.h
│ ├── suunto_eon.h
│ ├── suunto_vyper2.h
│ ├── units.h
│ ├── usb.h
│ ├── usbhid.h
│ └── version.h.in
├── libdivecomputer.pc.in
├── m4
├── ax_append_compile_flags.m4
├── ax_append_flag.m4
├── ax_check_compile_flag.m4
├── ax_require_defined.m4
└── pkg.m4
└── src
├── Makefile.am
├── aes.c
├── aes.h
├── array.c
├── array.h
├── atomics_cobalt.c
├── atomics_cobalt.h
├── atomics_cobalt_parser.c
├── ble.c
├── bluetooth.c
├── buffer.c
├── checksum.c
├── checksum.h
├── citizen_aqualand.c
├── citizen_aqualand.h
├── citizen_aqualand_parser.c
├── cochran_commander.c
├── cochran_commander.h
├── cochran_commander_parser.c
├── common-private.h
├── common.c
├── context-private.h
├── context.c
├── cressi_edy.c
├── cressi_edy.h
├── cressi_edy_parser.c
├── cressi_goa.c
├── cressi_goa.h
├── cressi_goa_parser.c
├── cressi_leonardo.c
├── cressi_leonardo.h
├── cressi_leonardo_parser.c
├── custom.c
├── datetime.c
├── deepblu_cosmiq.c
├── deepblu_cosmiq.h
├── deepblu_cosmiq_parser.c
├── deepsix_excursion.c
├── deepsix_excursion.h
├── deepsix_excursion_parser.c
├── descriptor.c
├── device-private.h
├── device.c
├── diverite_nitekq.c
├── diverite_nitekq.h
├── diverite_nitekq_parser.c
├── divesoft_freedom.c
├── divesoft_freedom.h
├── divesoft_freedom_parser.c
├── divesystem_idive.c
├── divesystem_idive.h
├── divesystem_idive_parser.c
├── field-cache.c
├── field-cache.h
├── garmin.c
├── garmin.h
├── garmin_parser.c
├── halcyon_symbios.c
├── halcyon_symbios.h
├── halcyon_symbios_parser.c
├── hdlc.c
├── hdlc.h
├── hw_frog.c
├── hw_frog.h
├── hw_ostc.c
├── hw_ostc.h
├── hw_ostc3.c
├── hw_ostc3.h
├── hw_ostc_parser.c
├── ihex.c
├── ihex.h
├── iostream-private.h
├── iostream.c
├── irda.c
├── iterator-private.h
├── iterator.c
├── libdivecomputer.rc
├── libdivecomputer.symbols
├── liquivision_lynx.c
├── liquivision_lynx.h
├── liquivision_lynx_parser.c
├── mares_common.c
├── mares_common.h
├── mares_darwin.c
├── mares_darwin.h
├── mares_darwin_parser.c
├── mares_iconhd.c
├── mares_iconhd.h
├── mares_iconhd_parser.c
├── mares_nemo.c
├── mares_nemo.h
├── mares_nemo_parser.c
├── mares_puck.c
├── mares_puck.h
├── mclean_extreme.c
├── mclean_extreme.h
├── mclean_extreme_parser.c
├── oceanic_atom2.c
├── oceanic_atom2.h
├── oceanic_atom2_parser.c
├── oceanic_common.c
├── oceanic_common.h
├── oceanic_veo250.c
├── oceanic_veo250.h
├── oceanic_veo250_parser.c
├── oceanic_vtpro.c
├── oceanic_vtpro.h
├── oceanic_vtpro_parser.c
├── oceans_s1.c
├── oceans_s1.h
├── oceans_s1_common.c
├── oceans_s1_common.h
├── oceans_s1_parser.c
├── packet.c
├── packet.h
├── parser-private.h
├── parser.c
├── pelagic_i330r.c
├── pelagic_i330r.h
├── platform.c
├── platform.h
├── rbstream.c
├── rbstream.h
├── reefnet_sensus.c
├── reefnet_sensus.h
├── reefnet_sensus_parser.c
├── reefnet_sensuspro.c
├── reefnet_sensuspro.h
├── reefnet_sensuspro_parser.c
├── reefnet_sensusultra.c
├── reefnet_sensusultra.h
├── reefnet_sensusultra_parser.c
├── ringbuffer.c
├── ringbuffer.h
├── seac_screen.c
├── seac_screen.h
├── seac_screen_parser.c
├── serial_posix.c
├── serial_win32.c
├── shearwater_common.c
├── shearwater_common.h
├── shearwater_petrel.c
├── shearwater_petrel.h
├── shearwater_predator.c
├── shearwater_predator.h
├── shearwater_predator_parser.c
├── socket.c
├── socket.h
├── sporasub_sp2.c
├── sporasub_sp2.h
├── sporasub_sp2_parser.c
├── suunto_common.c
├── suunto_common.h
├── suunto_common2.c
├── suunto_common2.h
├── suunto_d9.c
├── suunto_d9.h
├── suunto_d9_parser.c
├── suunto_eon.c
├── suunto_eon.h
├── suunto_eon_parser.c
├── suunto_eonsteel.c
├── suunto_eonsteel.h
├── suunto_eonsteel_parser.c
├── suunto_solution.c
├── suunto_solution.h
├── suunto_solution_parser.c
├── suunto_vyper.c
├── suunto_vyper.h
├── suunto_vyper2.c
├── suunto_vyper2.h
├── suunto_vyper_parser.c
├── tecdiving_divecomputereu.c
├── tecdiving_divecomputereu.h
├── tecdiving_divecomputereu_parser.c
├── timer.c
├── timer.h
├── usb.c
├── usb_storage.c
├── usbhid.c
├── uwatec_aladin.c
├── uwatec_aladin.h
├── uwatec_memomouse.c
├── uwatec_memomouse.h
├── uwatec_memomouse_parser.c
├── uwatec_smart.c
├── uwatec_smart.h
├── uwatec_smart_parser.c
├── version.c
├── zeagle_n2ition3.c
└── zeagle_n2ition3.h
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | name: Release
2 |
3 | on:
4 | push:
5 | tags: 'v*'
6 |
7 | jobs:
8 | release:
9 | name: Release
10 | runs-on: ubuntu-latest
11 | steps:
12 | - uses: actions/checkout@v4
13 |
14 | - name: Version number
15 | id: version
16 | run: |
17 | VERSION="${GITHUB_REF/refs\/tags\/v/}"
18 | echo "version=${VERSION}" >> $GITHUB_OUTPUT
19 |
20 | - name: Build distribution tarball
21 | id: build
22 | run: |
23 | sudo apt-get install libbluetooth-dev libusb-1.0-0-dev
24 | autoreconf --install --force
25 | ./configure
26 | make
27 | make distcheck
28 |
29 | - name: Check tarball version number
30 | id: check
31 | run: |
32 | FILENAME="libdivecomputer-${{ steps.version.outputs.version }}.tar.gz"
33 | if [ ! -f "${FILENAME}" ]; then
34 | echo ::error ::Tarball \'${FILENAME}\' not found!
35 | exit 1
36 | fi
37 |
38 | - name: Create Github release
39 | id: release
40 | run: |
41 | VERSION="${{ steps.version.outputs.version }}"
42 | if [ "${VERSION}" != "${VERSION%%-*}" ]; then
43 | PRERELEASE="-p"
44 | fi
45 | gh release create ${PRERELEASE} "${{ github.ref }}" "libdivecomputer-${VERSION}.tar.gz"
46 | env:
47 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *~
2 | *.o
3 | *.lo
4 | *.patch
5 | *.orig
6 | *.rej
7 | *.exe
8 | .*.swp
9 | .deps/
10 | .libs/
11 | compile
12 | Makefile
13 | Makefile.in
14 |
15 | /aclocal.m4
16 | /ar-lib
17 | /autom4te.cache/
18 | /config.guess
19 | /config.h
20 | /config.h.in
21 | /config.log
22 | /config.status
23 | /config.sub
24 | /configure
25 | /depcomp
26 | /install-sh
27 | /libdivecomputer.pc
28 | /libtool
29 | /ltmain.sh
30 | /missing
31 | /revision
32 | /stamp-h1
33 | /tags
34 |
35 | /doc/doxygen
36 | /doc/doxygen.cfg
37 | /doc/html/
38 | /doc/latex/
39 |
40 | /examples/dctool
41 |
42 | /include/libdivecomputer/version.h
43 |
44 | /m4/libtool.m4
45 | /m4/lt~obsolete.m4
46 | /m4/ltoptions.m4
47 | /m4/ltsugar.m4
48 | /m4/ltversion.m4
49 |
50 | /msvc/x64/
51 | /msvc/x86/
52 | /msvc/*.ncb
53 | /msvc/*.suo
54 |
55 | /src/libdivecomputer.exp
56 | /src/libdivecomputer.la
57 | /src/libdivecomputer.rc
58 | /src/revision.h
59 |
60 | /build
61 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: c
2 |
3 | matrix:
4 | include:
5 | - os: linux
6 | compiler: gcc
7 |
8 | - os: linux
9 | compiler: clang
10 |
11 | - os: osx
12 | compiler: gcc
13 |
14 | - os: osx
15 | compiler: clang
16 |
17 | - os: linux
18 | compiler: i686-w64-mingw32-gcc
19 | addons:
20 | apt:
21 | packages:
22 | - gcc-mingw-w64
23 | - binutils-mingw-w64
24 | - mingw-w64-tools
25 |
26 | - os: linux
27 | compiler: x86_64-w64-mingw32-gcc
28 | addons:
29 | apt:
30 | packages:
31 | - gcc-mingw-w64
32 | - binutils-mingw-w64
33 | - mingw-w64-tools
34 |
35 | addons:
36 | apt:
37 | packages:
38 | - libbluetooth-dev
39 | - libusb-1.0-0-dev
40 | homebrew:
41 | packages:
42 | - hidapi
43 | - libusb
44 |
45 | script:
46 | - case $CC in
47 | *-gcc) TARGET="${CC%-gcc}" ;;
48 | esac
49 | - if [ -n "$TARGET" ]; then
50 | TARGETOPTS="--host=${TARGET}";
51 | unset CC;
52 | fi
53 | - autoreconf --install --force
54 | - ./configure $TARGETOPTS --disable-doc
55 | - make
56 |
--------------------------------------------------------------------------------
/Makefile.am:
--------------------------------------------------------------------------------
1 | SUBDIRS = include src
2 |
3 | if ENABLE_EXAMPLES
4 | SUBDIRS += examples
5 | endif
6 |
7 | if ENABLE_DOC
8 | SUBDIRS += doc
9 | endif
10 |
11 | AM_MAKEFLAGS = -s
12 | ACLOCAL_AMFLAGS = -I m4
13 |
14 | pkgconfigdir = $(libdir)/pkgconfig
15 | pkgconfig_DATA = libdivecomputer.pc
16 |
17 | EXTRA_DIST = \
18 | libdivecomputer.pc.in \
19 | contrib/README \
20 | contrib/android/Android.mk \
21 | contrib/msvc/libdivecomputer.vcxproj \
22 | contrib/msvc/libdivecomputer.vcxproj.filters \
23 | contrib/udev/libdivecomputer.rules
24 |
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | Overview
2 | ========
3 |
4 | Libdivecomputer is a cross-platform and open source library for
5 | communication with dive computers from various manufacturers.
6 |
7 | The official web site is:
8 |
9 | http://www.libdivecomputer.org/
10 |
11 | The sourceforge project page is:
12 |
13 | http://sourceforge.net/projects/libdivecomputer/
14 |
15 | Installation
16 | ============
17 |
18 | On UNIX-like systems (including Linux, Mac OS X, MinGW), use the
19 | autotools based build system. Run the following commands from the top
20 | directory (containing this file) to configure, build and install the
21 | library and utilities:
22 |
23 | $ ./configure
24 | $ make
25 | $ make install
26 |
27 | If you downloaded the libdivecomputer source code directly from the git
28 | source code repository, then you need to create the configure script as
29 | the first step:
30 |
31 | $ autoreconf --install
32 |
33 | To uninstall libdivecomputer again, run:
34 |
35 | $ make uninstall
36 |
37 | Support
38 | =======
39 |
40 | Please send bug reports, feedback or questions to the mailing list:
41 |
42 | http://libdivecomputer.org/cgi-bin/mailman/listinfo/devel
43 |
44 | or contact me directly:
45 |
46 | jef@libdivecomputer.org
47 |
48 | License
49 | =======
50 |
51 | Libdivecomputer is free software, released under the terms of the GNU
52 | Lesser General Public License (LGPL).
53 |
54 | You can find a copy of the license in the file COPYING.
55 |
--------------------------------------------------------------------------------
/contrib/README:
--------------------------------------------------------------------------------
1 | Alternative build systems
2 | =========================
3 |
4 | The autotools based build system is the official build system for the
5 | libdivecomputer project. But for convenience, a few alternative build systems
6 | are available as well. Unfortunately, these builds systems require a few extra
7 | steps to generate some header files.
8 |
9 | If you have access to a UNIX build system (for example a Linux virtual machine,
10 | MinGW, Cygwin or the Windows Subsystem for Linux), you can use the autotools
11 | build system to generate those files:
12 |
13 | $ autoreconf --install --force
14 | $ ./configure
15 | $ make -C src revision.h
16 |
17 | Alternative, you can generate those files manually. First, create the version.h
18 | file from the version.h.in template:
19 |
20 | $ cp include/libdivecomputer/version.h.in include/libdivecomputer/version.h
21 |
22 | and replace all the @DC_VERSION@ placeholders with the values defined in the
23 | configure.ac file.
24 |
25 | Next, generate the revision.h file:
26 |
27 | $ echo "#define DC_VERSION_REVISION \"$(git rev-parse --verify HEAD)\"" > src/revision.h
28 |
29 | The alternative build systems are ready to use now.
30 |
31 | Visual Studio
32 | -------------
33 |
34 | The Visual Studio project file can be opened in the IDE, or build directly from
35 | the command-line:
36 |
37 | msbuild -m -p:Platform=x86|x64 -p:Configuration=Debug|Release contrib/msvc/libdivecomputer.vcxproj
38 |
39 | Android NDK
40 | -----------
41 |
42 | $ANDROID_NDK/ndk-build -C contrib/android NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk
43 |
44 | Linux udev rules
45 | ================
46 |
47 | For dive computers using USB or USB HID communication, regular users typically
48 | don't have the necessary permissions to access the device nodes. This can be
49 | fixed with some udev rules.
50 |
51 | Install the udev rules, and reload them:
52 |
53 | $ sudo cp contrib/udev/libdivecomputer.rules /etc/udev/rules.d/
54 | $ sudo udevadm control --reload
55 |
56 | Note: the provided udev rules assume the user is in the plugdev group.
57 |
--------------------------------------------------------------------------------
/contrib/msvc/libdivecomputer.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/contrib/udev/libdivecomputer.rules:
--------------------------------------------------------------------------------
1 | # Atomic Aquatics Cobalt
2 | SUBSYSTEM=="usb", ATTR{idVendor}=="0471", ATTR{idProduct}=="0888", GROUP="plugdev"
3 | SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0471", ATTRS{idProduct}=="0888", GROUP="plugdev"
4 |
5 | # Suunto EON Steel
6 | SUBSYSTEM=="usb", ATTR{idVendor}=="1493", ATTR{idProduct}=="0030", GROUP="plugdev"
7 | SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1493", ATTRS{idProduct}=="0030", GROUP="plugdev"
8 |
9 | # Suunto EON Core
10 | SUBSYSTEM=="usb", ATTR{idVendor}=="1493", ATTR{idProduct}=="0033", GROUP="plugdev"
11 | SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1493", ATTRS{idProduct}=="0033", GROUP="plugdev"
12 |
13 | # Suunto D5
14 | SUBSYSTEM=="usb", ATTR{idVendor}=="1493", ATTR{idProduct}=="0035", GROUP="plugdev"
15 | SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1493", ATTRS{idProduct}=="0035", GROUP="plugdev"
16 |
17 | # Suunto EON Steel Black
18 | SUBSYSTEM=="usb", ATTR{idVendor}=="1493", ATTR{idProduct}=="0036", GROUP="plugdev"
19 | SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1493", ATTRS{idProduct}=="0036", GROUP="plugdev"
20 |
21 | # Scubapro G2
22 | SUBSYSTEM=="usb", ATTR{idVendor}=="2e6c", ATTR{idProduct}=="3201", GROUP="plugdev"
23 | SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2e6c", ATTRS{idProduct}=="3201", GROUP="plugdev"
24 |
25 | # Scubapro G2 Console
26 | SUBSYSTEM=="usb", ATTR{idVendor}=="2e6c", ATTR{idProduct}=="3211", GROUP="plugdev"
27 | SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2e6c", ATTRS{idProduct}=="3211", GROUP="plugdev"
28 |
29 | # Scubapro G2 HUD
30 | SUBSYSTEM=="usb", ATTR{idVendor}=="2e6c", ATTR{idProduct}=="4201", GROUP="plugdev"
31 | SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2e6c", ATTRS{idProduct}=="4201", GROUP="plugdev"
32 |
33 | # Scubapro Aladin Square
34 | SUBSYSTEM=="usb", ATTR{idVendor}=="c251", ATTR{idProduct}=="2006", GROUP="plugdev"
35 | SUBSYSTEM=="hidraw", ATTRS{idVendor}=="c251", ATTRS{idProduct}=="2006", GROUP="plugdev"
36 |
--------------------------------------------------------------------------------
/doc/Makefile.am:
--------------------------------------------------------------------------------
1 | SUBDIRS = man
2 |
3 | doxygen: doxygen.cfg
4 | if HAVE_DOXYGEN
5 | $(DOXYGEN) $(DOXYFLAGS) $<
6 | touch $@
7 | endif
8 |
9 | all-local: doxygen
10 |
11 | clean-local:
12 | -$(RM) -rf html latex
13 |
14 | CLEANFILES = doxygen
15 |
--------------------------------------------------------------------------------
/doc/man/Makefile.am:
--------------------------------------------------------------------------------
1 | MANPAGES = \
2 | dc_buffer_append.3 \
3 | dc_buffer_free.3 \
4 | dc_buffer_get_data.3 \
5 | dc_buffer_get_size.3 \
6 | dc_buffer_new.3 \
7 | dc_buffer_prepend.3 \
8 | dc_context_free.3 \
9 | dc_context_new.3 \
10 | dc_context_set_logfunc.3 \
11 | dc_context_set_loglevel.3 \
12 | dc_datetime_gmtime.3 \
13 | dc_datetime_localtime.3 \
14 | dc_datetime_mktime.3 \
15 | dc_datetime_now.3 \
16 | dc_descriptor_free.3 \
17 | dc_descriptor_get_model.3 \
18 | dc_descriptor_get_product.3 \
19 | dc_descriptor_get_vendor.3 \
20 | dc_descriptor_get_transports.3 \
21 | dc_descriptor_iterator_new.3 \
22 | dc_device_close.3 \
23 | dc_device_foreach.3 \
24 | dc_device_open.3 \
25 | dc_device_set_cancel.3 \
26 | dc_device_set_events.3 \
27 | dc_device_set_fingerprint.3 \
28 | dc_iterator_free.3 \
29 | dc_iterator_next.3 \
30 | dc_parser_destroy.3 \
31 | dc_parser_get_datetime.3 \
32 | dc_parser_get_field.3 \
33 | dc_parser_new.3 \
34 | dc_parser_samples_foreach.3 \
35 | dc_bluetooth_open.3 \
36 | dc_bluetooth_iterator_new.3 \
37 | dc_bluetooth_device_get_address.3 \
38 | dc_bluetooth_device_get_name.3 \
39 | dc_bluetooth_addr2str.3 \
40 | dc_bluetooth_str2addr.3 \
41 | dc_bluetooth_device_free.3 \
42 | dc_usbhid_open.3 \
43 | dc_usbhid_device_get_pid.3 \
44 | dc_usbhid_device_get_vid.3 \
45 | dc_usbhid_iterator_new.3 \
46 | dc_usbhid_device_free.3 \
47 | dc_serial_open.3 \
48 | dc_serial_device_get_name.3 \
49 | dc_serial_iterator_new.3 \
50 | dc_serial_device_free.3 \
51 | dc_irda_open.3 \
52 | dc_irda_device_get_name.3 \
53 | dc_irda_device_get_address.3 \
54 | dc_irda_iterator_new.3 \
55 | dc_irda_device_free.3 \
56 | dc_iostream_close.3 \
57 | libdivecomputer.3
58 |
59 | HTMLPAGES = $(MANPAGES:%=%.html)
60 |
61 | dist_man_MANS = $(MANPAGES)
62 |
63 | if HAVE_MANDOC
64 | doc_DATA = $(HTMLPAGES)
65 | endif
66 |
67 | SUFFIXES = .3 .3.html
68 |
69 | .3.3.html:
70 | $(AM_V_GEN) $(MANDOC) -Thtml -Ostyle=mandoc.css,man=%N.%S.html $< > $@
71 |
72 | CLEANFILES = $(HTMLPAGES)
73 |
--------------------------------------------------------------------------------
/doc/man/dc_bluetooth_addr2str.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2020 Vincent Hagen
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd June 5, 2020
22 | .Dt DC_BLUETOOTH_ADDR2STR 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_bluetooth_addr2str
26 | .Nd Convert a bluetooth address to a string.
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/bluetooth.h
31 | .Ft "const char*"
32 | .Fo dc_bluetooth_addr2str
33 | .Fa "dc_bluetooth_address_t address"
34 | .Fa "char *str"
35 | .Fa "size_t size"
36 | .Fc
37 | .Sh DESCRIPTION
38 | Convert a bluetooth address to a string.
39 | .Pp
40 | The bluetooth address is formatted as XX:XX:XX:XX:XX:XX, where each XX is a
41 | hexadecimal number specifying an octet of the 48-bit address.
42 | The minimum size for the buffer is
43 | .Dv DC_BLUETOOTH_SIZE
44 | bytes.
45 | .Pp
46 | The reverse can be done with
47 | .Xr dc_bluetooth_str2addr 3 .
48 | .Sh RETURN VALUES
49 | Returns the bluetooth address represented as a string.
50 | .Sh SEE ALSO
51 | .Xr dc_bluetooth_str2addr 3 .
52 | .Sh AUTHORS
53 | The
54 | .Lb libdivecomputer
55 | library was written by
56 | .An Jef Driesen ,
57 | .Mt jef@libdivecomputer.org .
58 | .br
59 | This manpage is written by
60 | .An Vincent Hagen ,
61 | .Mt vinnie@script4web.nl .
62 |
--------------------------------------------------------------------------------
/doc/man/dc_bluetooth_device_free.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2020 Vincent Hagen
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd June 5, 2020
22 | .Dt DC_BLUETOOTH_DEVICE_FREE 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_bluetooth_device_free
26 | .Nd Destroy the bluetooth device and free all resources.
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/bluetooth.h
31 | .Ft void
32 | .Fo dc_bluetooth_device_free
33 | .Fa "dc_bluetooth_device_t *device"
34 | .Fc
35 | .Sh DESCRIPTION
36 | Destroy the bluetooth device and free all resources.
37 | The bluetooth
38 | .Fa device
39 | usually found by searching through
40 | .Xr dc_bluetooth_iterator_new 3 .
41 | .Sh SEE ALSO
42 | .Xr dc_bluetooth_iterator_new 3 .
43 | .Sh AUTHORS
44 | The
45 | .Lb libdivecomputer
46 | library was written by
47 | .An Jef Driesen ,
48 | .Mt jef@libdivecomputer.org .
49 | .br
50 | This manpage is written by
51 | .An Vincent Hagen ,
52 | .Mt vinnie@script4web.nl .
53 |
--------------------------------------------------------------------------------
/doc/man/dc_bluetooth_device_get_address.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2020 Vincent Hagen
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd June 5, 2020
22 | .Dt DC_BLUETOOTH_DEVICE_GET_ADDRESS 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_bluetooth_device_get_address
26 | .Nd Get the address of a bluetooth device.
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/bluetooth.h
31 | .Ft "dc_bluetooth_address_t"
32 | .Fo dc_bluetooth_device_get_address
33 | .Fa "dc_bluetooth_device_t *device"
34 | .Fc
35 | .Sh DESCRIPTION
36 | Get the bluetooth device address of given bluetooth
37 | .Fa device .
38 | Required when opening transport communication with
39 | .Xr dc_bluetooth_open 3 .
40 | Requires a valid
41 | .Fa device
42 | of type
43 | .Ft dc_bluetooth_device_t
44 | which can be retrieved using
45 | .Xr dc_bluetooth_iterator_new 3 .
46 | .Sh RETURN VALUES
47 | Returns the bluetooth address of
48 | .Fa device
49 | as
50 | .Ft dc_bluetooth_address_t
51 | which is a 64bit integer holding the bluetooth address.
52 |
53 | The address can be formatted as a string by using
54 | .Xr dc_bluetooth_addr2str 3 .
55 | .Sh SEE ALSO
56 | .Xr dc_bluetooth_open 3 ,
57 | .Xr dc_bluetooth_iterator_new 3 ,
58 | .Xr dc_bluetooth_device_get_name 3 ,
59 | .Xr dc_bluetooth_addr2str 3 .
60 | .Sh AUTHORS
61 | The
62 | .Lb libdivecomputer
63 | library was written by
64 | .An Jef Driesen ,
65 | .Mt jef@libdivecomputer.org .
66 | .br
67 | This manpage is written by
68 | .An Vincent Hagen ,
69 | .Mt vinnie@script4web.nl .
70 |
--------------------------------------------------------------------------------
/doc/man/dc_bluetooth_device_get_name.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2020 Vincent Hagen
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd June 5, 2020
22 | .Dt DC_BLUETOOTH_DEVICE_GET_NAME 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_bluetooth_device_get_name
26 | .Nd Get the name of a bluetooth device.
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/bluetooth.h
31 | .Ft "const char *"
32 | .Fo dc_bluetooth_device_get_name
33 | .Fa "dc_bluetooth_device_t *device"
34 | .Fc
35 | .Sh DESCRIPTION
36 | Get the name of given bluetooth
37 | .Fa device .
38 | Used for displaying.
39 | Requires a valid
40 | .Fa bluetooth_device
41 | of type
42 | .Ft dc_bluetooth_device_t
43 | which can be retrieved using
44 | .Xr dc_bluetooth_iterator_new 3 .
45 | .Sh RETURN VALUES
46 | Returns the bluetooth device of
47 | .Fa device .
48 | .Sh SEE ALSO
49 | .Xr dc_bluetooth_open 3 ,
50 | .Xr dc_bluetooth_iterator_new 3 ,
51 | .Xr dc_bluetooth_device_get_address 3 .
52 | .Sh AUTHORS
53 | The
54 | .Lb libdivecomputer
55 | library was written by
56 | .An Jef Driesen ,
57 | .Mt jef@libdivecomputer.org .
58 | .br
59 | This manpage is written by
60 | .An Vincent Hagen ,
61 | .Mt vinnie@script4web.nl .
62 |
--------------------------------------------------------------------------------
/doc/man/dc_bluetooth_str2addr.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2020 Vincent Hagen
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd June 5, 2020
22 | .Dt DC_BLUETOOTH_STR2ADDR 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_bluetooth_str2addr
26 | .Nd Convert a string to a bluetooth address.
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/bluetooth.h
31 | .Ft "dc_bluetooth_address_t"
32 | .Fo dc_bluetooth_addr2str
33 | .Fa "const char *address"
34 | .Fc
35 | .Sh DESCRIPTION
36 | Convert a string to a bluetooth address.
37 | .Pp
38 | The string
39 | .Fa address
40 | is expected to be in the format XX:XX:XX:XX:XX:XX,
41 | where each XX is a hexadecimal number specifying an octet of the 48-bit address.
42 | .Pp
43 | The reverse can be done with
44 | .Xr dc_bluetooth_addr2str 3 .
45 | .Sh RETURN VALUES
46 | Returns the bluetooth address represented as a 48-bit number.
47 | .Sh SEE ALSO
48 | .Xr dc_bluetooth_addr2str 3 .
49 | .Sh AUTHORS
50 | The
51 | .Lb libdivecomputer
52 | library was written by
53 | .An Jef Driesen ,
54 | .Mt jef@libdivecomputer.org .
55 | .br
56 | This manpage is written by
57 | .An Vincent Hagen ,
58 | .Mt vinnie@script4web.nl .
59 |
--------------------------------------------------------------------------------
/doc/man/dc_buffer_append.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2017 Kristaps Dzonsons
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd January 5, 2017
22 | .Dt DC_BUFFER_APPEND 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_buffer_append
26 | .Nd append to a binary buffer
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/buffer.h
31 | .Ft int
32 | .Fo dc_buffer_append
33 | .Fa "dc_buffer_t *buffer"
34 | .Fa "const unsigned char data[]"
35 | .Fa "size_t size"
36 | .Fc
37 | .Sh DESCRIPTION
38 | Append
39 | .Fa size
40 | bytes of
41 | .Fa data
42 | into the
43 | .Fa buffer
44 | previously allocated with
45 | .Xr dc_buffer_new 3 .
46 | .Sh RETURN VALUES
47 | Returns non-zero on success or zero on memory exhaustion or if
48 | .Fa buffer
49 | is
50 | .Dv NULL .
51 | .Sh SEE ALSO
52 | .Xr dc_buffer_new 3
53 | .Sh AUTHORS
54 | The
55 | .Lb libdivecomputer
56 | library was written by
57 | .An Jef Driesen ,
58 | .Mt jef@libdivecomputer.org .
59 | The manpages were written by
60 | .An Kristaps Dzonsons ,
61 | .Mt kristaps@bsd.lv .
62 |
--------------------------------------------------------------------------------
/doc/man/dc_buffer_free.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2017 Kristaps Dzonsons
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd January 5, 2017
22 | .Dt DC_BUFFER_FREE 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_buffer_free
26 | .Nd free an resizable binary buffer
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/buffer.h
31 | .Ft void
32 | .Fo dc_buffer_free
33 | .Fa "dc_buffer_t *buffer"
34 | .Fc
35 | .Sh DESCRIPTION
36 | Frees a resizable binary buffer created with
37 | .Xr dc_buffer_new 3 .
38 | It's safe to pass
39 | .Dv NULL
40 | to this function.
41 | .Sh SEE ALSO
42 | .Xr dc_buffer_new 3
43 | .Sh AUTHORS
44 | The
45 | .Lb libdivecomputer
46 | library was written by
47 | .An Jef Driesen ,
48 | .Mt jef@libdivecomputer.org .
49 | The manpages were written by
50 | .An Kristaps Dzonsons ,
51 | .Mt kristaps@bsd.lv .
52 |
--------------------------------------------------------------------------------
/doc/man/dc_buffer_get_data.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2017 Kristaps Dzonsons
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd January 5, 2017
22 | .Dt DC_BUFFER_GET_DATA 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_buffer_get_data
26 | .Nd get the data of a buffer
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/buffer.h
31 | .Ft "unsigned char *"
32 | .Fo dc_buffer_get_data
33 | .Fa "dc_buffer_t *buffer"
34 | .Fc
35 | .Sh DESCRIPTION
36 | Get the data used by
37 | .Fa buffer ,
38 | previously allocated with
39 | .Xr dc_buffer_new 3 .
40 | For the buffer size, use
41 | .Xr dc_buffer_get_size 3 .
42 | .Pp
43 | The returned pointer is not valid after subsequent calls to change the
44 | buffer.
45 | .Sh RETURN VALUES
46 | Returns the data or
47 | .Dv NULL
48 | if
49 | .Fa buffer
50 | is
51 | .Dv NULL
52 | or no data has been allocated to the buffer.
53 | .Sh SEE ALSO
54 | .Xr dc_buffer_get_size 3 ,
55 | .Xr dc_buffer_new 3
56 | .Sh AUTHORS
57 | The
58 | .Lb libdivecomputer
59 | library was written by
60 | .An Jef Driesen ,
61 | .Mt jef@libdivecomputer.org .
62 | The manpages were written by
63 | .An Kristaps Dzonsons ,
64 | .Mt kristaps@bsd.lv .
65 |
--------------------------------------------------------------------------------
/doc/man/dc_buffer_get_size.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2017 Kristaps Dzonsons
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd January 5, 2017
22 | .Dt DC_BUFFER_GET_SIZE 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_buffer_get_size
26 | .Nd get the size used by a buffer
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/buffer.h
31 | .Ft size_t
32 | .Fo dc_buffer_get_size
33 | .Fa "dc_buffer_t *buffer"
34 | .Fc
35 | .Sh DESCRIPTION
36 | Get the number of bytes currently used by
37 | .Fa buffer ,
38 | previously allocated with
39 | .Xr dc_buffer_new 3 .
40 | This shouldn't be confused with the capacity, which may be larger.
41 | .Pp
42 | The returned value is not valid after subsequent calls to change the
43 | buffer.
44 | .Sh RETURN VALUES
45 | Returns the number of bytes used, which may be zero, or zero if
46 | .Fa buffer
47 | is
48 | .Dv NULL .
49 | .Sh SEE ALSO
50 | .Sh AUTHORS
51 | The
52 | .Lb libdivecomputer
53 | library was written by
54 | .An Jef Driesen ,
55 | .Mt jef@libdivecomputer.org .
56 | The manpages were written by
57 | .An Kristaps Dzonsons ,
58 | .Mt kristaps@bsd.lv .
59 | .Xr dc_buffer_new 3
60 |
--------------------------------------------------------------------------------
/doc/man/dc_buffer_new.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2017 Kristaps Dzonsons
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd January 5, 2017
22 | .Dt DC_BUFFER_NEW 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_buffer_new
26 | .Nd create an resizable binary buffer
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/buffer.h
31 | .Ft "dc_buffer_t *"
32 | .Fo dc_buffer_new
33 | .Fa "size_t capacity"
34 | .Fc
35 | .Sh DESCRIPTION
36 | Create a resizable binary buffer of initial size
37 | .Fa capacity ,
38 | which may be zero.
39 | The created buffer must be freed with
40 | .Xr dc_buffer_free 3 .
41 | .Sh RETURN VALUES
42 | Returns a pointer to a
43 | .Vt dc_buffer_t
44 | or
45 | .Dv NULL
46 | on memory exhaustion.
47 | .Sh SEE ALSO
48 | .Xr dc_buffer_free 3
49 | .Sh AUTHORS
50 | The
51 | .Lb libdivecomputer
52 | library was written by
53 | .An Jef Driesen ,
54 | .Mt jef@libdivecomputer.org .
55 | The manpages were written by
56 | .An Kristaps Dzonsons ,
57 | .Mt kristaps@bsd.lv .
58 |
--------------------------------------------------------------------------------
/doc/man/dc_buffer_prepend.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2017 Kristaps Dzonsons
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd January 5, 2017
22 | .Dt DC_BUFFER_PREPEND 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_buffer_prepend
26 | .Nd prepend to a binary buffer
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/buffer.h
31 | .Ft int
32 | .Fo dc_buffer_prepend
33 | .Fa "dc_buffer_t *buffer"
34 | .Fa "const unsigned char data[]"
35 | .Fa "size_t size"
36 | .Fc
37 | .Sh DESCRIPTION
38 | Prepend
39 | .Fa size
40 | bytes of
41 | .Fa data
42 | to the beginning of
43 | .Fa buffer
44 | previously allocated with
45 | .Xr dc_buffer_new 3 .
46 | .Sh RETURN VALUES
47 | Returns non-zero on success or zero on memory exhaustion or if
48 | .Fa buffer
49 | is
50 | .Dv NULL .
51 | .Sh SEE ALSO
52 | .Xr dc_buffer_new 3
53 | .Sh AUTHORS
54 | The
55 | .Lb libdivecomputer
56 | library was written by
57 | .An Jef Driesen ,
58 | .Mt jef@libdivecomputer.org .
59 | The manpages were written by
60 | .An Kristaps Dzonsons ,
61 | .Mt kristaps@bsd.lv .
62 |
--------------------------------------------------------------------------------
/doc/man/dc_context_free.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2017 Kristaps Dzonsons
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd January 5, 2017
22 | .Dt DC_CONTEXT_FREE 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_context_free
26 | .Nd free a device-handling context
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/context.h
31 | .Ft dc_status_t
32 | .Fo dc_context_free
33 | .Fa "dc_context_t *context"
34 | .Fc
35 | .Sh DESCRIPTION
36 | Free a context created by
37 | .Xr dc_context_new 3 .
38 | .Sh RETURN VALUES
39 | This returns
40 | .Dv DC_STATUS_OK
41 | on success or if the pointer is
42 | .Dv NULL .
43 | Otherwise, it returns an error code.
44 | .Sh SEE ALSO
45 | .Xr dc_context_new 3
46 | .Sh AUTHORS
47 | The
48 | .Lb libdivecomputer
49 | library was written by
50 | .An Jef Driesen ,
51 | .Mt jef@libdivecomputer.org .
52 | The manpages were written by
53 | .An Kristaps Dzonsons ,
54 | .Mt kristaps@bsd.lv .
55 |
--------------------------------------------------------------------------------
/doc/man/dc_datetime_mktime.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2017 Kristaps Dzonsons
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd January 11, 2017
22 | .Dt DC_DATETIME_MKTIME 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_datetime_mktime
26 | .Nd convert an local date and time to a timestamp
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/datetime.h
31 | .Ft dc_ticks_t
32 | .Fo dc_datetime_mktime
33 | .Fa "const dc_datetime_t *dt"
34 | .Fc
35 | .Sh DESCRIPTION
36 | Convert a broken-down local date and time created with
37 | .Xr dc_datetime_localtime 3
38 | into an integral timestamp.
39 | .Pp
40 | The
41 | .Nm
42 | function may internally invoke libc's
43 | .Xr mktime 3 .
44 | .Sh RETURN VALUES
45 | This returns the integral time-stamp or -1 if the given date and time
46 | may not sanely be converted.
47 | .Sh SEE ALSO
48 | .Xr dc_datetime_gmtime 3 ,
49 | .Xr dc_datetime_localtime 3 ,
50 | .Xr dc_datetime_now 3
51 | .Sh AUTHORS
52 | The
53 | .Lb libdivecomputer
54 | library was written by
55 | .An Jef Driesen ,
56 | .Mt jef@libdivecomputer.org .
57 | The manpages were written by
58 | .An Kristaps Dzonsons ,
59 | .Mt kristaps@bsd.lv .
60 |
--------------------------------------------------------------------------------
/doc/man/dc_datetime_now.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2017 Kristaps Dzonsons
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd January 11, 2017
22 | .Dt DC_DATETIME_NOW 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_datetime_now
26 | .Nd return the current integral timestamp
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/datetime.h
31 | .Ft dc_ticks_t
32 | .Fo dc_datetime_now
33 | .Fc
34 | .Sh DESCRIPTION
35 | Get the current system timestamp as an integral value.
36 | .Pp
37 | The
38 | .Nm
39 | function may invoke libc's
40 | .Xr time 3 .
41 | .Sh RETURN VALUES
42 | This always returns the system time.
43 | .Sh SEE ALSO
44 | .Xr dc_datetime_gmtime 3 ,
45 | .Xr dc_datetime_localtime 3 ,
46 | .Xr dc_datetime_mktime 3
47 | .Sh AUTHORS
48 | The
49 | .Lb libdivecomputer
50 | library was written by
51 | .An Jef Driesen ,
52 | .Mt jef@libdivecomputer.org .
53 | The manpages were written by
54 | .An Kristaps Dzonsons ,
55 | .Mt kristaps@bsd.lv .
56 |
--------------------------------------------------------------------------------
/doc/man/dc_descriptor_free.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2017 Kristaps Dzonsons
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd January 5, 2017
22 | .Dt DC_DESCRIPTOR_FREE 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_descriptor_free
26 | .Nd free a dive computer descriptor reference
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/descriptor.h
31 | .Ft void
32 | .Fo dc_descriptor_free
33 | .Fa "dc_descriptor_t *descriptor"
34 | .Fc
35 | .Sh DESCRIPTION
36 | Frees a descriptor usually returned with
37 | .Xr dc_iterator_next 3
38 | as created with
39 | .Xr dc_descriptor_iterator_new 3 .
40 | It's safe to pass
41 | .Dv NULL
42 | to this function.
43 | .Sh SEE ALSO
44 | .Xr dc_descriptor_iterator_new 3 ,
45 | .Xr dc_iterator_free 3
46 | .Sh AUTHORS
47 | The
48 | .Lb libdivecomputer
49 | library was written by
50 | .An Jef Driesen ,
51 | .Mt jef@libdivecomputer.org .
52 | The manpages were written by
53 | .An Kristaps Dzonsons ,
54 | .Mt kristaps@bsd.lv .
55 |
--------------------------------------------------------------------------------
/doc/man/dc_descriptor_get_model.3:
--------------------------------------------------------------------------------
1 |
2 | .\"
3 | .\" libdivecomputer
4 | .\"
5 | .\" Copyright (C) 2018 Kristaps Dzonsons
6 | .\"
7 | .\" This library is free software; you can redistribute it and/or
8 | .\" modify it under the terms of the GNU Lesser General Public
9 | .\" License as published by the Free Software Foundation; either
10 | .\" version 2.1 of the License, or (at your option) any later version.
11 | .\"
12 | .\" This library is distributed in the hope that it will be useful,
13 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | .\" Lesser General Public License for more details.
16 | .\"
17 | .\" You should have received a copy of the GNU Lesser General Public
18 | .\" License along with this library; if not, write to the Free Software
19 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20 | .\" MA 02110-1301 USA
21 | .\"
22 | .Dd August 19, 2018
23 | .Dt DC_DESCRIPTOR_GET_MODEL 3
24 | .Os
25 | .Sh NAME
26 | .Nm dc_descriptor_get_model
27 | .Nd get the model of a dive computer descriptor
28 | .Sh LIBRARY
29 | .Lb libdivecomputer
30 | .Sh SYNOPSIS
31 | .In libdivecomputer/descriptor.h
32 | .Ft "unsigned int"
33 | .Fo dc_descriptor_get_model
34 | .Fa "const dc_descriptor_t *descriptor"
35 | .Fc
36 | .Sh DESCRIPTION
37 | Gets the model number of a dive computer descriptor or 0 if none was
38 | defined for the computer.
39 | 0 is also a valid model number.
40 | .Sh RETURN VALUES
41 | This returns the model number or 0 if none exists.
42 | .Sh SEE ALSO
43 | .Xr dc_descriptor_iterator_new 3
44 | .Sh AUTHORS
45 | The
46 | .Lb libdivecomputer
47 | library was written by
48 | .An Jef Driesen ,
49 | .Mt jef@libdivecomputer.org .
50 | The manpages were written by
51 | .An Kristaps Dzonsons ,
52 | .Mt kristaps@bsd.lv .
53 |
--------------------------------------------------------------------------------
/doc/man/dc_descriptor_get_product.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2017 Kristaps Dzonsons
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd January 5, 2017
22 | .Dt DC_DESCRIPTOR_GET_PRODUCT 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_descriptor_get_product
26 | .Nd get the product of a dive computer descriptor
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/descriptor.h
31 | .Ft "const char *"
32 | .Fo dc_descriptor_get_product
33 | .Fa "const dc_descriptor_t *descriptor"
34 | .Fc
35 | .Sh DESCRIPTION
36 | Gets the product
37 | .Pq e.g., Do D6i Dc for my Suunto
38 | of a dive computer descriptor or
39 | .Dv NULL
40 | if none was declared.
41 | .Sh RETURN VALUES
42 | This returns the nil-terminated product string or
43 | .Dv NULL
44 | if none exists.
45 | .Pp
46 | The returned pointer is not valid after the
47 | .Fa descriptor
48 | has been freed.
49 | .Sh SEE ALSO
50 | .Xr dc_descriptor_get_vendor 3
51 | .Sh AUTHORS
52 | The
53 | .Lb libdivecomputer
54 | library was written by
55 | .An Jef Driesen ,
56 | .Mt jef@libdivecomputer.org .
57 | The manpages were written by
58 | .An Kristaps Dzonsons ,
59 | .Mt kristaps@bsd.lv .
60 |
--------------------------------------------------------------------------------
/doc/man/dc_descriptor_get_vendor.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2017 Kristaps Dzonsons
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd January 5, 2017
22 | .Dt DC_DESCRIPTOR_GET_VENDOR 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_descriptor_get_vendor
26 | .Nd get the vendor of a dive computer descriptor
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/descriptor.h
31 | .Ft "const char *"
32 | .Fo dc_descriptor_get_vendor
33 | .Fa "const dc_descriptor_t *descriptor"
34 | .Fc
35 | .Sh DESCRIPTION
36 | Gets the vendor
37 | .Pq e.g., Dq Suunto
38 | of a dive computer descriptor or
39 | .Dv NULL
40 | if none was declared.
41 | .Sh RETURN VALUES
42 | This returns the nil-terminated vendor string or
43 | .Dv NULL
44 | if none exists.
45 | .Pp
46 | The returned pointer is not valid after the
47 | .Fa descriptor
48 | has been freed.
49 | .Sh SEE ALSO
50 | .Xr dc_descriptor_get_product 3
51 | .Sh AUTHORS
52 | The
53 | .Lb libdivecomputer
54 | library was written by
55 | .An Jef Driesen ,
56 | .Mt jef@libdivecomputer.org .
57 | The manpages were written by
58 | .An Kristaps Dzonsons ,
59 | .Mt kristaps@bsd.lv .
60 |
--------------------------------------------------------------------------------
/doc/man/dc_device_close.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2017 Kristaps Dzonsons
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd January 5, 2017
22 | .Dt DC_DEVICE_CLOSE 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_device_close
26 | .Nd close a dive computer device
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/device.h
31 | .Ft dc_status_t
32 | .Fo dc_device_close
33 | .Fa "dc_device_t *device"
34 | .Fc
35 | .Sh DESCRIPTION
36 | Closes a dive computer device opened with
37 | .Xr dc_device_open 3 .
38 | If
39 | .Fa device
40 | is
41 | .Dv NULL ,
42 | this returns
43 | .Dv DC_STATUS_SUCCESS .
44 | .Sh RETURN VALUES
45 | Returns
46 | .Dv DC_STATUS_SUCCESS
47 | on success or one of several error values on error.
48 | .Sh SEE ALSO
49 | .Xr dc_device_open 3
50 | .Sh AUTHORS
51 | The
52 | .Lb libdivecomputer
53 | library was written by
54 | .An Jef Driesen ,
55 | .Mt jef@libdivecomputer.org .
56 | The manpages were written by
57 | .An Kristaps Dzonsons ,
58 | .Mt kristaps@bsd.lv .
59 |
--------------------------------------------------------------------------------
/doc/man/dc_iostream_close.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2020 Vincent Hagen
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd June 5, 2020
22 | .Dt DC_IOSTREAM_CLOSE 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_iostream_close
26 | .Nd Close the I/O stream and free all resources.
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/iostream.h
31 | .Ft dc_status_t
32 | .Fo dc_iostream_close
33 | .Fa "dc_iostream_t *iostream"
34 | .Fc
35 | .Sh DESCRIPTION
36 | Close the I/O stream and free all resources.
37 | Accepts the
38 | .Fa iostream
39 | to close and free.
40 | .Sh RETURN VALUES
41 | Returns
42 | .Dv DC_STATUS_SUCCESS
43 | on success, or another
44 | .Ft dc_status_t
45 | code on failure.
46 | .Sh SEE ALSO
47 | .Xr dc_usbhid_open 3 ,
48 | .Xr dc_serial_open 3 ,
49 | .Xr dc_irda_open 3 ,
50 | .Xr dc_bluetooth_open 3 .
51 | .Sh AUTHORS
52 | The
53 | .Lb libdivecomputer
54 | library was written by
55 | .An Jef Driesen ,
56 | .Mt jef@libdivecomputer.org .
57 | .br
58 | This manpage is written by
59 | .An Vincent Hagen ,
60 | .Mt vinnie@script4web.nl .
61 |
--------------------------------------------------------------------------------
/doc/man/dc_irda_device_free.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2020 Vincent Hagen
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd June 5, 2020
22 | .Dt DC_IRDA_DEVICE_FREE 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_irda_device_free
26 | .Nd Destroy the irda device and free all resources.
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/irda.h
31 | .Ft void
32 | .Fo dc_irda_device_free
33 | .Fa "dc_irda_device_t *device"
34 | .Fc
35 | .Sh DESCRIPTION
36 | Destroy the irda device and free all resources.
37 | The irda
38 | .Fa device
39 | usually found by searching through
40 | .Xr dc_irda_iterator_new 3 .
41 | .Sh SEE ALSO
42 | .Xr dc_irda_iterator_new 3 .
43 | .Sh AUTHORS
44 | The
45 | .Lb libdivecomputer
46 | library was written by
47 | .An Jef Driesen ,
48 | .Mt jef@libdivecomputer.org .
49 | .br
50 | This manpage is written by
51 | .An Vincent Hagen ,
52 | .Mt vinnie@script4web.nl .
53 |
--------------------------------------------------------------------------------
/doc/man/dc_irda_device_get_address.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2020 Vincent Hagen
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd June 5, 2020
22 | .Dt DC_IRDA_DEVICE_GET_ADDRESS 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_irda_device_get_address
26 | .Nd Get the address of the IrDA device.
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/irda.h
31 | .Ft "unsigned int"
32 | .Fo dc_irda_device_get_address
33 | .Fa "dc_irda_device_t *device"
34 | .Fc
35 | .Sh DESCRIPTION
36 | Get the address of the IrDA device. Return value used for opening a IrDA device using
37 | .Xr dc_irda_open 3 .
38 | Requires a valid irda
39 | .Fa device
40 | of type
41 | .Ft dc_irda_device_t
42 | which can be retrieved using
43 | .Xr dc_irda_iterator_new 3 .
44 | .Sh RETURN VALUES
45 | Returns the IrDA address of given IrDA
46 | .Fa device
47 | .Sh SEE ALSO
48 | .Xr dc_irda_open 3 ,
49 | .Xr dc_irda_device_get_name 3 .
50 | .Sh AUTHORS
51 | The
52 | .Lb libdivecomputer
53 | library was written by
54 | .An Jef Driesen ,
55 | .Mt jef@libdivecomputer.org .
56 | .br
57 | This manpage is written by
58 | .An Vincent Hagen ,
59 | .Mt vinnie@script4web.nl .
60 |
--------------------------------------------------------------------------------
/doc/man/dc_irda_device_get_name.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2020 Vincent Hagen
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd June 5, 2020
22 | .Dt DC_IRDA_DEVICE_GET_NAME 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_irda_device_get_name
26 | .Nd Get the address of the IrDA device.
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/irda.h
31 | .Ft "const char *"
32 | .Fo dc_irda_device_get_name
33 | .Fa "dc_irda_device_t *device"
34 | .Fc
35 | .Sh DESCRIPTION
36 | Get the name of the IrDA device. Used for displaying.
37 | Requires a valid irda
38 | .Fa device
39 | of type
40 | .Ft dc_irda_device_t
41 | which can be retrieved using
42 | .Xr dc_irda_iterator_new 3 .
43 | .Sh RETURN VALUES
44 | Returns the IrDA name of given
45 | .Fa irda_device
46 | .Sh SEE ALSO
47 | .Xr dc_irda_device_get_address 3 .
48 | .Xr dc_irda_iterator_new 3 .
49 | .Sh AUTHORS
50 | The
51 | .Lb libdivecomputer
52 | library was written by
53 | .An Jef Driesen ,
54 | .Mt jef@libdivecomputer.org .
55 | .br
56 | This manpage is written by
57 | .An Vincent Hagen ,
58 | .Mt vinnie@script4web.nl .
59 |
--------------------------------------------------------------------------------
/doc/man/dc_iterator_free.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2017 Kristaps Dzonsons
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd January 5, 2017
22 | .Dt DC_ITERATOR_FREE 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_iterator_free
26 | .Nd frees an iterator
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/iterator.h
31 | .Ft dc_status_t
32 | .Fo dc_iterator_free
33 | .Fa "dc_iterator_t *iterator"
34 | .Fc
35 | .Sh DESCRIPTION
36 | Frees the iterator
37 | .Fa iterator .
38 | It may be invoked on any iterator type, e.g., one created with
39 | .Xr dc_descriptor_iterator_new 3 .
40 | .Sh RETURN VALUES
41 | This returns
42 | .Dv DC_STATUS_SUCCESS
43 | on success (or if
44 | .Fa iterator
45 | is
46 | .Dv NULL )
47 | or other values on failure.
48 | .Sh AUTHORS
49 | The
50 | .Lb libdivecomputer
51 | library was written by
52 | .An Jef Driesen ,
53 | .Mt jef@libdivecomputer.org .
54 | The manpages were written by
55 | .An Kristaps Dzonsons ,
56 | .Mt kristaps@bsd.lv .
57 |
--------------------------------------------------------------------------------
/doc/man/dc_iterator_next.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2017 Kristaps Dzonsons
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd January 5, 2017
22 | .Dt DC_ITERATOR_NEXT 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_iterator_next
26 | .Nd next element in an iterator
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/iterator.h
31 | .Ft dc_status_t
32 | .Fo dc_iterator_next
33 | .Fa "dc_iterator_t *iterator"
34 | .Fa "void *item"
35 | .Fc
36 | .Sh DESCRIPTION
37 | Fills in
38 | .Fa item
39 | with the next element in the iterator
40 | .Fa iterator ,
41 | which may not be
42 | .Dv NULL .
43 | .Sh RETURN VALUES
44 | This returns
45 | .Dv DC_STATUS_SUCCESS
46 | on success.
47 | .Sh AUTHORS
48 | The
49 | .Lb libdivecomputer
50 | library was written by
51 | .An Jef Driesen ,
52 | .Mt jef@libdivecomputer.org .
53 | The manpages were written by
54 | .An Kristaps Dzonsons ,
55 | .Mt kristaps@bsd.lv .
56 |
--------------------------------------------------------------------------------
/doc/man/dc_parser_destroy.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2017 Kristaps Dzonsons
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd January 5, 2017
22 | .Dt DC_PARSER_DESTROY 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_parser_destroy
26 | .Nd destroys a single dive parser
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/parser.h
31 | .Ft dc_status_t
32 | .Fo dc_parser_destroy
33 | .Fa "dc_parser_t *parser"
34 | .Fc
35 | .Sh DESCRIPTION
36 | Destroys a parser allocated with
37 | .Xr dc_parser_new 3 .
38 | The
39 | .Fa parser
40 | parameter may be
41 | .Dv NULL ,
42 | in which case it will return with success.
43 | .Sh RETURN VALUES
44 | Returns
45 | .Dv DC_STATUS_OK
46 | on success and another code on failure.
47 | .Sh SEE ALSO
48 | .Xr dc_parser_new 3
49 | .Sh AUTHORS
50 | The
51 | .Lb libdivecomputer
52 | library was written by
53 | .An Jef Driesen ,
54 | .Mt jef@libdivecomputer.org .
55 | The manpages were written by
56 | .An Kristaps Dzonsons ,
57 | .Mt kristaps@bsd.lv .
58 |
--------------------------------------------------------------------------------
/doc/man/dc_parser_get_datetime.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2017 Kristaps Dzonsons
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd January 5, 2017
22 | .Dt DC_PARSER_GET_DATETIME 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_parser_get_datetime
26 | .Nd extract the date and time from a parsed dive
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/parser.h
31 | .Ft dc_status_t
32 | .Fo dc_parser_get_datetime
33 | .Fa "dc_parser_t *parser"
34 | .Fa "dc_datetime_t *datetime"
35 | .Fc
36 | .Sh DESCRIPTION
37 | Extract the date and time of a dive,
38 | .Fa parser ,
39 | previously initialised with
40 | .Xr dc_parser_new 3 .
41 | This returns the broken-down time-stamp of the dive in the local time of
42 | the dive.
43 | .Pp
44 | The
45 | .Nm
46 | function may internally invoke
47 | .Xr dc_datetime_gmtime 3
48 | or
49 | .Xr dc_datetime_localtime 3 .
50 | .Sh RETURN VALUES
51 | Returns
52 | .Dv DC_STATUS_SUCCESS
53 | if the date and time were retrieved,
54 | .Dv DC_STATUS_UNSUPPORTED
55 | if the date and time are not supported by the device, or other error
56 | messages on further failure.
57 | .Sh SEE ALSO
58 | .Xr dc_datetime_gmtime 3 ,
59 | .Xr dc_datetime_localtime 3 ,
60 | .Xr dc_parser_new 3
61 | .Sh AUTHORS
62 | The
63 | .Lb libdivecomputer
64 | library was written by
65 | .An Jef Driesen ,
66 | .Mt jef@libdivecomputer.org .
67 | The manpages were written by
68 | .An Kristaps Dzonsons ,
69 | .Mt kristaps@bsd.lv .
70 |
--------------------------------------------------------------------------------
/doc/man/dc_serial_device_free.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2020 Vincent Hagen
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd June 5, 2020
22 | .Dt DC_SERIAL_DEVICE_FREE 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_serial_device_free
26 | .Nd Destroy the serial device and free all resources.
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/serial.h
31 | .Ft void
32 | .Fo dc_serial_device_free
33 | .Fa "dc_serial_device_t *device"
34 | .Fc
35 | .Sh DESCRIPTION
36 | Destroy the serial device and free all resources.
37 | The serial
38 | .Fa device
39 | usually found by searching through
40 | .Xr dc_serial_iterator_new 3 .
41 | .Sh SEE ALSO
42 | .Xr dc_serial_iterator_new 3 .
43 | .Sh AUTHORS
44 | The
45 | .Lb libdivecomputer
46 | library was written by
47 | .An Jef Driesen ,
48 | .Mt jef@libdivecomputer.org .
49 | .br
50 | This manpage is written by
51 | .An Vincent Hagen ,
52 | .Mt vinnie@script4web.nl .
53 |
--------------------------------------------------------------------------------
/doc/man/dc_serial_device_get_name.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2020 Vincent Hagen
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd June 5, 2020
22 | .Dt DC_SERIAL_DEVICE_GET_NAME 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_serial_device_get_name
26 | .Nd Get the device name of the serial device.
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/serial.h
31 | .Ft "const char *"
32 | .Fo dc_serial_device_get_name
33 | .Fa "dc_serial_device_t *device"
34 | .Fc
35 | .Sh DESCRIPTION
36 | Get the device node of the serial device. Used when opening serial transport with
37 | .Xr dc_serial_open 3 .
38 | Requires a valid serial
39 | .Fa device
40 | of type
41 | .Ft dc_serial_device_t
42 | which can be retrieved using
43 | .Xr dc_serial_iterator_new 3 .
44 | .Sh RETURN VALUES
45 | Returns the device name of given serial
46 | .Fa device
47 | .Sh SEE ALSO
48 | .Xr dc_serial_open 3 ,
49 | .Xr dc_serial_iterator_new 3 .
50 | .Sh AUTHORS
51 | The
52 | .Lb libdivecomputer
53 | library was written by
54 | .An Jef Driesen ,
55 | .Mt jef@libdivecomputer.org .
56 | .br
57 | This manpage is written by
58 | .An Vincent Hagen ,
59 | .Mt vinnie@script4web.nl .
60 |
--------------------------------------------------------------------------------
/doc/man/dc_usbhid_device_free.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2020 Vincent Hagen
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd June 5, 2020
22 | .Dt DC_USBHID_DEVICE_FREE 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_usbhid_device_free
26 | .Nd Destroy the USB HID device and free all resources.
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/usbhid.h
31 | .Ft void
32 | .Fo dc_usbhid_device_free
33 | .Fa "dc_usbhid_device_t *device"
34 | .Fc
35 | .Sh DESCRIPTION
36 | Destroy the USB HID device and free all resources.
37 | The usbhid
38 | .Fa device
39 | usually found by searching through
40 | .Xr dc_usbhid_iterator_new 3 .
41 | .Sh SEE ALSO
42 | .Xr dc_usbhid_iterator_new 3 .
43 | .Sh AUTHORS
44 | The
45 | .Lb libdivecomputer
46 | library was written by
47 | .An Jef Driesen ,
48 | .Mt jef@libdivecomputer.org .
49 | .br
50 | This manpage is written by
51 | .An Vincent Hagen ,
52 | .Mt vinnie@script4web.nl .
53 |
--------------------------------------------------------------------------------
/doc/man/dc_usbhid_device_get_pid.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2020 Vincent Hagen
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd June 5, 2020
22 | .Dt DC_USBHID_DEVICE_GET_PID 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_usbhid_device_get_pid
26 | .Nd Get the product id (PID) of the USB HID device.
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/usbhid.h
31 | .Ft "unsigned int"
32 | .Fo dc_usbhid_device_get_pid
33 | .Fa "dc_usbhid_device_t *device"
34 | .Fc
35 | .Sh DESCRIPTION
36 | Get the product id (PID) of the USB HID device. Used for displaying.
37 | Requires a valid usbhid
38 | .Fa device
39 | of type
40 | .Ft dc_usbhid_device_t
41 | which can be retrieved using
42 | .Xr dc_usbhid_iterator_new 3 .
43 | .Sh RETURN VALUES
44 | Returns the product id (PID) of given
45 | .Fa usbhid_device
46 | .Sh SEE ALSO
47 | .Xr dc_usbhid_device_get_vid 3 ,
48 | .Xr dc_usbhid_iterator_new 3 .
49 | .Sh AUTHORS
50 | The
51 | .Lb libdivecomputer
52 | library was written by
53 | .An Jef Driesen ,
54 | .Mt jef@libdivecomputer.org .
55 | .br
56 | This manpage is written by
57 | .An Vincent Hagen ,
58 | .Mt vinnie@script4web.nl .
59 |
--------------------------------------------------------------------------------
/doc/man/dc_usbhid_device_get_vid.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2020 Vincent Hagen
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd June 5, 2020
22 | .Dt DC_USBHID_DEVICE_GET_VID 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_usbhid_device_get_vid
26 | .Nd Get the vendor id (VID) of the USB HID device.
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/usbhid.h
31 | .Ft "unsigned int"
32 | .Fo dc_usbhid_device_get_vid
33 | .Fa "dc_usbhid_device_t *device"
34 | .Fc
35 | .Sh DESCRIPTION
36 | Get the vendor id (VID) of the USB HID device. Used for displaying.
37 | Requires a valid usbhid
38 | .Fa device
39 | of type
40 | .Ft dc_usbhid_device_t
41 | which can be retrieved using
42 | .Xr dc_usbhid_iterator_new 3 .
43 | .Sh RETURN VALUES
44 | Returns the vendor id (VID) of given usbhid
45 | .Fa device
46 | .Sh SEE ALSO
47 | .Xr dc_usbhid_device_get_vid 3 ,
48 | .Xr dc_usbhid_iterator_new 3 .
49 | .Sh AUTHORS
50 | The
51 | .Lb libdivecomputer
52 | library was written by
53 | .An Jef Driesen ,
54 | .Mt jef@libdivecomputer.org .
55 | .br
56 | This manpage is written by
57 | .An Vincent Hagen ,
58 | .Mt vinnie@script4web.nl .
59 |
--------------------------------------------------------------------------------
/doc/man/dc_usbhid_open.3:
--------------------------------------------------------------------------------
1 | .\"
2 | .\" libdivecomputer
3 | .\"
4 | .\" Copyright (C) 2020 Vincent Hagen
5 | .\"
6 | .\" This library is free software; you can redistribute it and/or
7 | .\" modify it under the terms of the GNU Lesser General Public
8 | .\" License as published by the Free Software Foundation; either
9 | .\" version 2.1 of the License, or (at your option) any later version.
10 | .\"
11 | .\" This library is distributed in the hope that it will be useful,
12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | .\" Lesser General Public License for more details.
15 | .\"
16 | .\" You should have received a copy of the GNU Lesser General Public
17 | .\" License along with this library; if not, write to the Free Software
18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | .\" MA 02110-1301 USA
20 | .\"
21 | .Dd June 5, 2020
22 | .Dt DC_USBHID_OPEN 3
23 | .Os
24 | .Sh NAME
25 | .Nm dc_usbhid_open
26 | .Nd Opens an iostream for a USB HID device
27 | .Sh LIBRARY
28 | .Lb libdivecomputer
29 | .Sh SYNOPSIS
30 | .In libdivecomputer/usbhid.h
31 | .Ft dc_status_t
32 | .Fo dc_usbhid_open
33 | .Fa "dc_iostream_t **iostream"
34 | .Fa "dc_context_t *context"
35 | .Fa "dc_usbhid_device_t *device"
36 | .Fc
37 | .Sh DESCRIPTION
38 | Opens an iostream for a USB HID device.
39 | Accepts a
40 | .Fa context
41 | opened with
42 | .Xr dc_context_new 3
43 | and a
44 | .Fa device
45 | usually found by searching through
46 | .Xr dc_usbhid_iterator_new 3 .
47 | .Pp
48 | Upon returning
49 | .Dv DC_STATUS_SUCCESS ,
50 | the
51 | .Fa iostream
52 | pointer must be freed with
53 | .Xr dc_iostream_close 3 .
54 | .Sh RETURN VALUES
55 | Returns
56 | .Dv DC_STATUS_SUCCESS
57 | on success or one of several error values on error.
58 | On success, the
59 | .Fa iostream
60 | pointer is filled in with an open handle.
61 | .Sh SEE ALSO
62 | .Xr dc_context_new 3 ,
63 | .Xr dc_usbhid_iterator_new 3 ,
64 | .Xr dc_iostream_close 3 ,
65 | .Xr dc_serial_open 3 ,
66 | .Xr dc_irda_open 3 ,
67 | .Xr dc_bluetooth_open 3 .
68 | .Sh AUTHORS
69 | The
70 | .Lb libdivecomputer
71 | library was written by
72 | .An Jef Driesen ,
73 | .Mt jef@libdivecomputer.org .
74 | .br
75 | This manpage is written by
76 | .An Vincent Hagen ,
77 | .Mt vinnie@script4web.nl .
--------------------------------------------------------------------------------
/examples/Makefile.am:
--------------------------------------------------------------------------------
1 | AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include
2 | LDADD = $(top_builddir)/src/libdivecomputer.la
3 |
4 | bin_PROGRAMS = \
5 | dctool
6 |
7 | dctool_SOURCES = \
8 | common.h \
9 | common.c \
10 | dctool.h \
11 | dctool.c \
12 | dctool_help.c \
13 | dctool_version.c \
14 | dctool_list.c \
15 | dctool_scan.c \
16 | dctool_download.c \
17 | dctool_dump.c \
18 | dctool_parse.c \
19 | dctool_read.c \
20 | dctool_write.c \
21 | dctool_timesync.c \
22 | dctool_fwupdate.c \
23 | output.h \
24 | output-private.h \
25 | output.c \
26 | output_xml.c \
27 | output_raw.c \
28 | utils.h \
29 | utils.c
30 |
--------------------------------------------------------------------------------
/examples/dctool.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2015 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DCTOOL_H
23 | #define DCTOOL_H
24 |
25 | #include
26 | #include
27 |
28 | #ifdef __cplusplus
29 | extern "C" {
30 | #endif /* __cplusplus */
31 |
32 | typedef enum dctool_config_t {
33 | DCTOOL_CONFIG_NONE = 0,
34 | DCTOOL_CONFIG_DESCRIPTOR = 1,
35 | } dctool_config_t;
36 |
37 | typedef struct dctool_command_t {
38 | int (*run) (int argc, char *argv[], dc_context_t *context, dc_descriptor_t *descriptor);
39 | unsigned int config;
40 | const char *name;
41 | const char *description;
42 | const char *usage;
43 | } dctool_command_t;
44 |
45 | extern const dctool_command_t dctool_help;
46 | extern const dctool_command_t dctool_version;
47 | extern const dctool_command_t dctool_list;
48 | extern const dctool_command_t dctool_scan;
49 | extern const dctool_command_t dctool_download;
50 | extern const dctool_command_t dctool_dump;
51 | extern const dctool_command_t dctool_parse;
52 | extern const dctool_command_t dctool_read;
53 | extern const dctool_command_t dctool_write;
54 | extern const dctool_command_t dctool_timesync;
55 | extern const dctool_command_t dctool_fwupdate;
56 |
57 | const dctool_command_t *
58 | dctool_command_find (const char *name);
59 |
60 | void
61 | dctool_command_showhelp (const dctool_command_t *command);
62 |
63 | int
64 | dctool_cancel_cb (void *userdata);
65 |
66 | #ifdef __cplusplus
67 | }
68 | #endif /* __cplusplus */
69 |
70 | #endif /* DCTOOL_H */
71 |
--------------------------------------------------------------------------------
/examples/output-private.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2016 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DCTOOL_OUTPUT_PRIVATE_H
23 | #define DCTOOL_OUTPUT_PRIVATE_H
24 |
25 | #include
26 | #include
27 |
28 | #include "output.h"
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | typedef struct dctool_output_vtable_t dctool_output_vtable_t;
35 |
36 | struct dctool_output_t {
37 | const dctool_output_vtable_t *vtable;
38 | unsigned int number;
39 | };
40 |
41 | struct dctool_output_vtable_t {
42 | size_t size;
43 |
44 | dc_status_t (*write) (dctool_output_t *output, dc_parser_t *parser, const unsigned char data[], unsigned int size, const unsigned char fingerprint[], unsigned int fsize);
45 |
46 | dc_status_t (*free) (dctool_output_t *output);
47 | };
48 |
49 | dctool_output_t *
50 | dctool_output_allocate (const dctool_output_vtable_t *vtable);
51 |
52 | void
53 | dctool_output_deallocate (dctool_output_t *output);
54 |
55 | #ifdef __cplusplus
56 | }
57 | #endif /* __cplusplus */
58 | #endif /* DCTOOL_OUTPUT_PRIVATE_H */
59 |
--------------------------------------------------------------------------------
/examples/output.c:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2016 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #include
23 | #include
24 |
25 | #include "output-private.h"
26 |
27 | dctool_output_t *
28 | dctool_output_allocate (const dctool_output_vtable_t *vtable)
29 | {
30 | dctool_output_t *output = NULL;
31 |
32 | assert(vtable != NULL);
33 | assert(vtable->size >= sizeof(dctool_output_t));
34 |
35 | // Allocate memory.
36 | output = (dctool_output_t *) malloc (vtable->size);
37 | if (output == NULL) {
38 | return output;
39 | }
40 |
41 | output->vtable = vtable;
42 | output->number = 0;
43 |
44 | return output;
45 | }
46 |
47 | void
48 | dctool_output_deallocate (dctool_output_t *output)
49 | {
50 | free (output);
51 | }
52 |
53 | dc_status_t
54 | dctool_output_write (dctool_output_t *output, dc_parser_t *parser, const unsigned char data[], unsigned int size, const unsigned char fingerprint[], unsigned int fsize)
55 | {
56 | if (output == NULL || output->vtable->write == NULL)
57 | return DC_STATUS_SUCCESS;
58 |
59 | output->number++;
60 |
61 | return output->vtable->write (output, parser, data, size, fingerprint, fsize);
62 | }
63 |
64 | dc_status_t
65 | dctool_output_free (dctool_output_t *output)
66 | {
67 | dc_status_t status = DC_STATUS_SUCCESS;
68 |
69 | if (output == NULL)
70 | return DC_STATUS_SUCCESS;
71 |
72 | if (output->vtable->free) {
73 | status = output->vtable->free (output);
74 | }
75 |
76 | dctool_output_deallocate (output);
77 |
78 | return status;
79 | }
80 |
--------------------------------------------------------------------------------
/examples/output.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2016 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DCTOOL_OUTPUT_H
23 | #define DCTOOL_OUTPUT_H
24 |
25 | #include
26 | #include
27 |
28 | #ifdef __cplusplus
29 | extern "C" {
30 | #endif /* __cplusplus */
31 |
32 | typedef struct dctool_output_t dctool_output_t;
33 |
34 | typedef enum dctool_units_t {
35 | DCTOOL_UNITS_METRIC,
36 | DCTOOL_UNITS_IMPERIAL
37 | } dctool_units_t;
38 |
39 | dctool_output_t *
40 | dctool_xml_output_new (const char *filename, dctool_units_t units);
41 |
42 | dctool_output_t *
43 | dctool_raw_output_new (const char *template);
44 |
45 | dc_status_t
46 | dctool_output_write (dctool_output_t *output, dc_parser_t *parser, const unsigned char data[], unsigned int size, const unsigned char fingerprint[], unsigned int fsize);
47 |
48 | dc_status_t
49 | dctool_output_free (dctool_output_t *output);
50 |
51 | #ifdef __cplusplus
52 | }
53 | #endif /* __cplusplus */
54 | #endif /* DCTOOL_OUTPUT_H */
55 |
--------------------------------------------------------------------------------
/examples/utils.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef EXAMPLES_UTILS_H
23 | #define EXAMPLES_UTILS_H
24 |
25 | #ifdef __cplusplus
26 | extern "C" {
27 | #endif /* __cplusplus */
28 |
29 | #ifdef _MSC_VER
30 | #define snprintf _snprintf
31 | #define strcasecmp _stricmp
32 | #define strncasecmp _strnicmp
33 | #endif
34 |
35 | #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
36 | #define FUNCTION __func__
37 | #else
38 | #define FUNCTION __FUNCTION__
39 | #endif
40 |
41 | #if defined(__GNUC__)
42 | #define ATTR_FORMAT_PRINTF(a,b) __attribute__((format(printf, a, b)))
43 | #else
44 | #define ATTR_FORMAT_PRINTF(a,b)
45 | #endif
46 |
47 | #define WARNING(expr) message("WARNING: %s [in %s:%d (%s)]\n", expr, __FILE__, __LINE__, FUNCTION)
48 | #define ERROR(expr) message("ERROR: %s [in %s:%d (%s)]\n", expr, __FILE__, __LINE__, FUNCTION)
49 |
50 | int message (const char* fmt, ...) ATTR_FORMAT_PRINTF(1, 2);
51 |
52 | void message_set_logfile (const char* filename);
53 |
54 | #ifdef __cplusplus
55 | }
56 | #endif /* __cplusplus */
57 |
58 | #endif /* EXAMPLES_UTILS_H */
59 |
--------------------------------------------------------------------------------
/include/Makefile.am:
--------------------------------------------------------------------------------
1 | SUBDIRS = libdivecomputer
2 |
--------------------------------------------------------------------------------
/include/libdivecomputer/Makefile.am:
--------------------------------------------------------------------------------
1 | libdivecomputerdir = $(includedir)/libdivecomputer
2 | libdivecomputer_HEADERS = \
3 | version.h \
4 | common.h \
5 | context.h \
6 | buffer.h \
7 | descriptor.h \
8 | iterator.h \
9 | iostream.h \
10 | ioctl.h \
11 | serial.h \
12 | bluetooth.h \
13 | ble.h \
14 | irda.h \
15 | usb.h \
16 | usbhid.h \
17 | custom.h \
18 | device.h \
19 | parser.h \
20 | datetime.h \
21 | units.h \
22 | suunto_eon.h \
23 | suunto_vyper2.h \
24 | suunto_d9.h \
25 | reefnet_sensus.h \
26 | reefnet_sensuspro.h \
27 | reefnet_sensusultra.h \
28 | oceanic_atom2.h \
29 | oceanic_veo250.h \
30 | oceanic_vtpro.h \
31 | hw_ostc.h \
32 | hw_frog.h \
33 | hw_ostc3.h \
34 | atomics_cobalt.h \
35 | divesystem_idive.h
36 |
--------------------------------------------------------------------------------
/include/libdivecomputer/atomics_cobalt.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2011 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DC_ATOMICS_COBALT_H
23 | #define DC_ATOMICS_COBALT_H
24 |
25 | #include "common.h"
26 | #include "device.h"
27 | #include "parser.h"
28 |
29 | #ifdef __cplusplus
30 | extern "C" {
31 | #endif /* __cplusplus */
32 |
33 | dc_status_t
34 | atomics_cobalt_device_version (dc_device_t *device, unsigned char data[], unsigned int size);
35 |
36 | dc_status_t
37 | atomics_cobalt_device_set_simulation (dc_device_t *device, unsigned int simulation);
38 |
39 | #ifdef __cplusplus
40 | }
41 | #endif /* __cplusplus */
42 | #endif /* DC_ATOMICS_COBALT_H */
43 |
--------------------------------------------------------------------------------
/include/libdivecomputer/buffer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2009 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DC_BUFFER_H
23 | #define DC_BUFFER_H
24 |
25 | #include
26 |
27 | #ifdef __cplusplus
28 | extern "C" {
29 | #endif /* __cplusplus */
30 |
31 | typedef struct dc_buffer_t dc_buffer_t;
32 |
33 | dc_buffer_t *
34 | dc_buffer_new (size_t capacity);
35 |
36 | void
37 | dc_buffer_free (dc_buffer_t *buffer);
38 |
39 | int
40 | dc_buffer_clear (dc_buffer_t *buffer);
41 |
42 | int
43 | dc_buffer_reserve (dc_buffer_t *buffer, size_t capacity);
44 |
45 | int
46 | dc_buffer_resize (dc_buffer_t *buffer, size_t size);
47 |
48 | int
49 | dc_buffer_append (dc_buffer_t *buffer, const unsigned char data[], size_t size);
50 |
51 | int
52 | dc_buffer_prepend (dc_buffer_t *buffer, const unsigned char data[], size_t size);
53 |
54 | int
55 | dc_buffer_insert (dc_buffer_t *buffer, size_t offset, const unsigned char data[], size_t size);
56 |
57 | int
58 | dc_buffer_slice (dc_buffer_t *buffer, size_t offset, size_t size);
59 |
60 | size_t
61 | dc_buffer_get_size (dc_buffer_t *buffer);
62 |
63 | unsigned char *
64 | dc_buffer_get_data (dc_buffer_t *buffer);
65 |
66 | #ifdef __cplusplus
67 | }
68 | #endif /* __cplusplus */
69 | #endif /* DC_BUFFER_H */
70 |
--------------------------------------------------------------------------------
/include/libdivecomputer/context.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2012 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DC_CONTEXT_H
23 | #define DC_CONTEXT_H
24 |
25 | #include "common.h"
26 |
27 | #ifdef __cplusplus
28 | extern "C" {
29 | #endif /* __cplusplus */
30 |
31 | typedef struct dc_context_t dc_context_t;
32 |
33 | typedef enum dc_loglevel_t {
34 | DC_LOGLEVEL_NONE,
35 | DC_LOGLEVEL_ERROR,
36 | DC_LOGLEVEL_WARNING,
37 | DC_LOGLEVEL_INFO,
38 | DC_LOGLEVEL_DEBUG,
39 | DC_LOGLEVEL_ALL
40 | } dc_loglevel_t;
41 |
42 | typedef void (*dc_logfunc_t) (dc_context_t *context, dc_loglevel_t loglevel, const char *file, unsigned int line, const char *function, const char *message, void *userdata);
43 |
44 | dc_status_t
45 | dc_context_new (dc_context_t **context);
46 |
47 | dc_status_t
48 | dc_context_free (dc_context_t *context);
49 |
50 | dc_status_t
51 | dc_context_set_loglevel (dc_context_t *context, dc_loglevel_t loglevel);
52 |
53 | dc_status_t
54 | dc_context_set_logfunc (dc_context_t *context, dc_logfunc_t logfunc, void *userdata);
55 |
56 | unsigned int
57 | dc_context_get_transports (dc_context_t *context);
58 |
59 | #ifdef __cplusplus
60 | }
61 | #endif /* __cplusplus */
62 | #endif /* DC_CONTEXT_H */
63 |
--------------------------------------------------------------------------------
/include/libdivecomputer/datetime.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2010 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DC_DATETIME_H
23 | #define DC_DATETIME_H
24 |
25 | #include
26 |
27 | #ifdef __cplusplus
28 | extern "C" {
29 | #endif /* __cplusplus */
30 |
31 | #define DC_TIMEZONE_NONE INT_MIN
32 |
33 | #if defined (_WIN32) && !defined (__GNUC__)
34 | typedef __int64 dc_ticks_t;
35 | #else
36 | typedef long long int dc_ticks_t;
37 | #endif
38 |
39 | typedef struct dc_datetime_t {
40 | int year;
41 | int month;
42 | int day;
43 | int hour;
44 | int minute;
45 | int second;
46 | int timezone;
47 | } dc_datetime_t;
48 |
49 | dc_ticks_t
50 | dc_datetime_now (void);
51 |
52 | dc_datetime_t *
53 | dc_datetime_localtime (dc_datetime_t *result,
54 | dc_ticks_t ticks);
55 |
56 | dc_datetime_t *
57 | dc_datetime_gmtime (dc_datetime_t *result,
58 | dc_ticks_t ticks);
59 |
60 | dc_ticks_t
61 | dc_datetime_mktime (const dc_datetime_t *dt);
62 |
63 | #ifdef __cplusplus
64 | }
65 | #endif /* __cplusplus */
66 | #endif /* DC_DATETIME_H */
67 |
--------------------------------------------------------------------------------
/include/libdivecomputer/divesystem_idive.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2019 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DC_DIVESYSTEM_IDIVE_H
23 | #define DC_DIVESYSTEM_IDIVE_H
24 |
25 | #include "common.h"
26 | #include "device.h"
27 |
28 | #ifdef __cplusplus
29 | extern "C" {
30 | #endif /* __cplusplus */
31 |
32 | dc_status_t
33 | divesystem_idive_device_fwupdate (dc_device_t *abstract, const char *filename);
34 |
35 | #ifdef __cplusplus
36 | }
37 | #endif /* __cplusplus */
38 | #endif /* DC_DIVESYSTEM_IDIVE_H */
39 |
--------------------------------------------------------------------------------
/include/libdivecomputer/hw_frog.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2012 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DC_HW_FROG_H
23 | #define DC_HW_FROG_H
24 |
25 | #include "common.h"
26 | #include "device.h"
27 | #include "datetime.h"
28 |
29 | #ifdef __cplusplus
30 | extern "C" {
31 | #endif /* __cplusplus */
32 |
33 | #define HW_FROG_DISPLAY_SIZE 15
34 | #define HW_FROG_CUSTOMTEXT_SIZE 13
35 |
36 | dc_status_t
37 | hw_frog_device_version (dc_device_t *device, unsigned char data[], unsigned int size);
38 |
39 | dc_status_t
40 | hw_frog_device_display (dc_device_t *device, const char *text);
41 |
42 | dc_status_t
43 | hw_frog_device_customtext (dc_device_t *device, const char *text);
44 |
45 | #ifdef __cplusplus
46 | }
47 | #endif /* __cplusplus */
48 | #endif /* DC_HW_FROG_H */
49 |
--------------------------------------------------------------------------------
/include/libdivecomputer/hw_ostc.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2009 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DC_HW_OSTC_H
23 | #define DC_HW_OSTC_H
24 |
25 | #include "common.h"
26 | #include "device.h"
27 | #include "datetime.h"
28 | #include "buffer.h"
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | #define HW_OSTC_MD2HASH_SIZE 18
35 | #define HW_OSTC_EEPROM_SIZE 256
36 |
37 | typedef enum hw_ostc_format_t {
38 | HW_OSTC_FORMAT_RAW,
39 | HW_OSTC_FORMAT_RGB16,
40 | HW_OSTC_FORMAT_RGB24
41 | } hw_ostc_format_t;
42 |
43 | dc_status_t
44 | hw_ostc_device_md2hash (dc_device_t *device, unsigned char data[], unsigned int size);
45 |
46 | dc_status_t
47 | hw_ostc_device_eeprom_read (dc_device_t *device, unsigned int bank, unsigned char data[], unsigned int size);
48 |
49 | dc_status_t
50 | hw_ostc_device_eeprom_write (dc_device_t *device, unsigned int bank, const unsigned char data[], unsigned int size);
51 |
52 | dc_status_t
53 | hw_ostc_device_reset (dc_device_t *device);
54 |
55 | dc_status_t
56 | hw_ostc_device_screenshot (dc_device_t *device, dc_buffer_t *buffer, hw_ostc_format_t format);
57 |
58 | dc_status_t
59 | hw_ostc_device_fwupdate (dc_device_t *abstract, const char *filename);
60 |
61 | #ifdef __cplusplus
62 | }
63 | #endif /* __cplusplus */
64 | #endif /* DC_HW_OSTC_H */
65 |
--------------------------------------------------------------------------------
/include/libdivecomputer/hw_ostc3.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2013 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DC_HW_OSTC3_H
23 | #define DC_HW_OSTC3_H
24 |
25 | #include
26 |
27 | #include "common.h"
28 | #include "device.h"
29 | #include "datetime.h"
30 |
31 | #ifdef __cplusplus
32 | extern "C" {
33 | #endif /* __cplusplus */
34 |
35 | #define HW_OSTC3_DISPLAY_SIZE 16
36 | #define HW_OSTC3_CUSTOMTEXT_SIZE 60
37 |
38 | dc_status_t
39 | hw_ostc3_device_version (dc_device_t *device, unsigned char data[], unsigned int size);
40 |
41 | dc_status_t
42 | hw_ostc3_device_hardware (dc_device_t *device, unsigned char data[], unsigned int size);
43 |
44 | dc_status_t
45 | hw_ostc3_device_display (dc_device_t *device, const char *text);
46 |
47 | dc_status_t
48 | hw_ostc3_device_customtext (dc_device_t *device, const char *text);
49 |
50 | dc_status_t
51 | hw_ostc3_device_config_read (dc_device_t *abstract, unsigned int config, unsigned char data[], unsigned int size);
52 |
53 | dc_status_t
54 | hw_ostc3_device_config_write (dc_device_t *abstract, unsigned int config, const unsigned char data[], unsigned int size);
55 |
56 | dc_status_t
57 | hw_ostc3_device_config_reset (dc_device_t *abstract);
58 |
59 | dc_status_t
60 | hw_ostc3_device_fwupdate (dc_device_t *abstract, const char *filename, bool forceUpdate);
61 |
62 | #ifdef __cplusplus
63 | }
64 | #endif /* __cplusplus */
65 | #endif /* DC_HW_OSTC3_H */
66 |
--------------------------------------------------------------------------------
/include/libdivecomputer/iterator.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2012 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DC_ITERATOR_H
23 | #define DC_ITERATOR_H
24 |
25 | #include "common.h"
26 |
27 | #ifdef __cplusplus
28 | extern "C" {
29 | #endif /* __cplusplus */
30 |
31 | typedef struct dc_iterator_t dc_iterator_t;
32 |
33 | dc_status_t
34 | dc_iterator_next (dc_iterator_t *iterator, void *item);
35 |
36 | dc_status_t
37 | dc_iterator_free (dc_iterator_t *iterator);
38 |
39 | #ifdef __cplusplus
40 | }
41 | #endif /* __cplusplus */
42 | #endif /* DC_ITERATOR_H */
43 |
--------------------------------------------------------------------------------
/include/libdivecomputer/oceanic_atom2.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DC_OCEANIC_ATOM2_H
23 | #define DC_OCEANIC_ATOM2_H
24 |
25 | #include "common.h"
26 | #include "device.h"
27 |
28 | #ifdef __cplusplus
29 | extern "C" {
30 | #endif /* __cplusplus */
31 |
32 | dc_status_t
33 | oceanic_atom2_device_version (dc_device_t *device, unsigned char data[], unsigned int size);
34 |
35 | dc_status_t
36 | oceanic_atom2_device_keepalive (dc_device_t *device);
37 |
38 | #ifdef __cplusplus
39 | }
40 | #endif /* __cplusplus */
41 | #endif /* DC_OCEANIC_ATOM2_H */
42 |
--------------------------------------------------------------------------------
/include/libdivecomputer/oceanic_veo250.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DC_OCEANIC_VEO250_H
23 | #define DC_OCEANIC_VEO250_H
24 |
25 | #include "common.h"
26 | #include "device.h"
27 |
28 | #ifdef __cplusplus
29 | extern "C" {
30 | #endif /* __cplusplus */
31 |
32 | dc_status_t
33 | oceanic_veo250_device_version (dc_device_t *device, unsigned char data[], unsigned int size);
34 |
35 | dc_status_t
36 | oceanic_veo250_device_keepalive (dc_device_t *device);
37 |
38 | #ifdef __cplusplus
39 | }
40 | #endif /* __cplusplus */
41 | #endif /* DC_OCEANIC_VEO250_H */
42 |
--------------------------------------------------------------------------------
/include/libdivecomputer/oceanic_vtpro.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DC_OCEANIC_VTPRO_H
23 | #define DC_OCEANIC_VTPRO_H
24 |
25 | #include "common.h"
26 | #include "device.h"
27 |
28 | #ifdef __cplusplus
29 | extern "C" {
30 | #endif /* __cplusplus */
31 |
32 | dc_status_t
33 | oceanic_vtpro_device_version (dc_device_t *device, unsigned char data[], unsigned int size);
34 |
35 | dc_status_t
36 | oceanic_vtpro_device_keepalive (dc_device_t *device);
37 |
38 | #ifdef __cplusplus
39 | }
40 | #endif /* __cplusplus */
41 | #endif /* DC_OCEANIC_VTPRO_H */
42 |
--------------------------------------------------------------------------------
/include/libdivecomputer/reefnet_sensus.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DC_REEFNET_SENSUS_H
23 | #define DC_REEFNET_SENSUS_H
24 |
25 | #include "common.h"
26 | #include "device.h"
27 | #include "parser.h"
28 |
29 | #ifdef __cplusplus
30 | extern "C" {
31 | #endif /* __cplusplus */
32 |
33 | #define REEFNET_SENSUS_HANDSHAKE_SIZE 10
34 |
35 | dc_status_t
36 | reefnet_sensus_device_get_handshake (dc_device_t *device, unsigned char data[], unsigned int size);
37 |
38 | #ifdef __cplusplus
39 | }
40 | #endif /* __cplusplus */
41 | #endif /* DC_REEFNET_SENSUS_H */
42 |
--------------------------------------------------------------------------------
/include/libdivecomputer/reefnet_sensuspro.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DC_REEFNET_SENSUSPRO_H
23 | #define DC_REEFNET_SENSUSPRO_H
24 |
25 | #include "common.h"
26 | #include "device.h"
27 | #include "parser.h"
28 |
29 | #ifdef __cplusplus
30 | extern "C" {
31 | #endif /* __cplusplus */
32 |
33 | #define REEFNET_SENSUSPRO_HANDSHAKE_SIZE 10
34 |
35 | dc_status_t
36 | reefnet_sensuspro_device_get_handshake (dc_device_t *device, unsigned char data[], unsigned int size);
37 |
38 | dc_status_t
39 | reefnet_sensuspro_device_write_interval (dc_device_t *device, unsigned char interval);
40 |
41 | #ifdef __cplusplus
42 | }
43 | #endif /* __cplusplus */
44 | #endif /* DC_REEFNET_SENSUSPRO_H */
45 |
--------------------------------------------------------------------------------
/include/libdivecomputer/suunto_d9.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DC_SUUNTO_D9_H
23 | #define DC_SUUNTO_D9_H
24 |
25 | #include "common.h"
26 | #include "device.h"
27 |
28 | #ifdef __cplusplus
29 | extern "C" {
30 | #endif /* __cplusplus */
31 |
32 | #define SUUNTO_D9_VERSION_SIZE 0x04
33 |
34 | dc_status_t
35 | suunto_d9_device_version (dc_device_t *device, unsigned char data[], unsigned int size);
36 |
37 | dc_status_t
38 | suunto_d9_device_reset_maxdepth (dc_device_t *device);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* DC_SUUNTO_D9_H */
44 |
--------------------------------------------------------------------------------
/include/libdivecomputer/suunto_eon.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DC_SUUNTO_EON_H
23 | #define DC_SUUNTO_EON_H
24 |
25 | #include "common.h"
26 | #include "device.h"
27 |
28 | #ifdef __cplusplus
29 | extern "C" {
30 | #endif /* __cplusplus */
31 |
32 | #define SUUNTO_EON_NAME_SIZE 20
33 |
34 | dc_status_t
35 | suunto_eon_device_write_name (dc_device_t *device, unsigned char data[], unsigned int size);
36 |
37 | dc_status_t
38 | suunto_eon_device_write_interval (dc_device_t *device, unsigned char interval);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* DC_SUUNTO_EON_H */
44 |
--------------------------------------------------------------------------------
/include/libdivecomputer/suunto_vyper2.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DC_SUUNTO_VYPER2_H
23 | #define DC_SUUNTO_VYPER2_H
24 |
25 | #ifdef __cplusplus
26 | extern "C" {
27 | #endif /* __cplusplus */
28 |
29 | #include "common.h"
30 | #include "device.h"
31 |
32 | #define SUUNTO_VYPER2_VERSION_SIZE 0x04
33 |
34 | dc_status_t
35 | suunto_vyper2_device_version (dc_device_t *device, unsigned char data[], unsigned int size);
36 |
37 | dc_status_t
38 | suunto_vyper2_device_reset_maxdepth (dc_device_t *device);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* DC_SUUNTO_VYPER2_H */
44 |
--------------------------------------------------------------------------------
/include/libdivecomputer/units.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef UNITS_H
23 | #define UNITS_H
24 |
25 |
26 | #define POUND 0.45359237
27 | #define FEET 0.3048
28 | #define INCH 0.0254
29 | #define GRAVITY 9.80665
30 | #define ATM 101325.0
31 | #define BAR 100000.0
32 | #define FSW (ATM / 33.0)
33 | #define MSW (BAR / 10.0)
34 | #define PSI ((POUND * GRAVITY) / (INCH * INCH))
35 | #define CUFT (FEET * FEET * FEET)
36 |
37 |
38 | #endif /* UNITS_H */
39 |
--------------------------------------------------------------------------------
/include/libdivecomputer/version.h.in:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2010 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DC_VERSION_H
23 | #define DC_VERSION_H
24 |
25 | #ifdef __cplusplus
26 | extern "C" {
27 | #endif /* __cplusplus */
28 |
29 | #define DC_VERSION "@DC_VERSION@"
30 | #define DC_VERSION_MAJOR @DC_VERSION_MAJOR@
31 | #define DC_VERSION_MINOR @DC_VERSION_MINOR@
32 | #define DC_VERSION_MICRO @DC_VERSION_MICRO@
33 |
34 | #define DC_VERSION_CHECK(major,minor,micro) \
35 | (DC_VERSION_MAJOR > (major) || \
36 | (DC_VERSION_MAJOR == (major) && DC_VERSION_MINOR > (minor)) || \
37 | (DC_VERSION_MAJOR == (major) && DC_VERSION_MINOR == (minor) && \
38 | DC_VERSION_MICRO >= (micro)))
39 |
40 | typedef struct dc_version_t {
41 | unsigned int major;
42 | unsigned int minor;
43 | unsigned int micro;
44 | } dc_version_t;
45 |
46 | const char *
47 | dc_version (dc_version_t *version);
48 |
49 | int
50 | dc_version_check (unsigned int major, unsigned int minor, unsigned int micro);
51 |
52 | #ifdef __cplusplus
53 | }
54 | #endif /* __cplusplus */
55 |
56 | #endif /* DC_VERSION_H */
57 |
--------------------------------------------------------------------------------
/libdivecomputer.pc.in:
--------------------------------------------------------------------------------
1 | prefix=@prefix@
2 | exec_prefix=@exec_prefix@
3 | libdir=@libdir@
4 | includedir=@includedir@
5 |
6 | Name: libdivecomputer
7 | Description: A library for communication with various dive computers.
8 | Version: @VERSION@
9 | Requires.private: @DEPENDENCIES@
10 | Libs: -L${libdir} -ldivecomputer
11 | Libs.private: -lm
12 | Cflags: -I${includedir}
13 |
--------------------------------------------------------------------------------
/m4/ax_require_defined.m4:
--------------------------------------------------------------------------------
1 | # ===========================================================================
2 | # https://www.gnu.org/software/autoconf-archive/ax_require_defined.html
3 | # ===========================================================================
4 | #
5 | # SYNOPSIS
6 | #
7 | # AX_REQUIRE_DEFINED(MACRO)
8 | #
9 | # DESCRIPTION
10 | #
11 | # AX_REQUIRE_DEFINED is a simple helper for making sure other macros have
12 | # been defined and thus are available for use. This avoids random issues
13 | # where a macro isn't expanded. Instead the configure script emits a
14 | # non-fatal:
15 | #
16 | # ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found
17 | #
18 | # It's like AC_REQUIRE except it doesn't expand the required macro.
19 | #
20 | # Here's an example:
21 | #
22 | # AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
23 | #
24 | # LICENSE
25 | #
26 | # Copyright (c) 2014 Mike Frysinger
27 | #
28 | # Copying and distribution of this file, with or without modification, are
29 | # permitted in any medium without royalty provided the copyright notice
30 | # and this notice are preserved. This file is offered as-is, without any
31 | # warranty.
32 |
33 | #serial 2
34 |
35 | AC_DEFUN([AX_REQUIRE_DEFINED], [dnl
36 | m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])])
37 | ])dnl AX_REQUIRE_DEFINED
38 |
--------------------------------------------------------------------------------
/src/atomics_cobalt.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2011 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef ATOMICS_COBALT_H
23 | #define ATOMICS_COBALT_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 |
31 | #ifdef __cplusplus
32 | extern "C" {
33 | #endif /* __cplusplus */
34 |
35 | dc_status_t
36 | atomics_cobalt_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
37 |
38 | dc_status_t
39 | atomics_cobalt_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size);
40 |
41 | #ifdef __cplusplus
42 | }
43 | #endif /* __cplusplus */
44 | #endif /* ATOMICS_COBALT_H */
45 |
--------------------------------------------------------------------------------
/src/citizen_aqualand.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2014 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef CITIZEN_AQUALAND_H
23 | #define CITIZEN_AQUALAND_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | citizen_aqualand_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
36 |
37 | dc_status_t
38 | citizen_aqualand_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* CITIZEN_AQUALAND_H */
44 |
--------------------------------------------------------------------------------
/src/cochran_commander.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2014 John Van Ostrand
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef COCHRAN_COMMANDER_H
23 | #define COCHRAN_COMMANDER_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | cochran_commander_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
36 |
37 | dc_status_t
38 | cochran_commander_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size, unsigned int model);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 |
44 | #endif /* COCHRAN_COMMANDER_H */
45 |
--------------------------------------------------------------------------------
/src/common-private.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2015 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef COMMON_PRIVATE_H
23 | #define COMMON_PRIVATE_H
24 |
25 | #include
26 |
27 | #ifdef __cplusplus
28 | extern "C" {
29 | #endif /* __cplusplus */
30 |
31 | void
32 | dc_status_set_error (dc_status_t *status, dc_status_t error);
33 |
34 | #ifdef __cplusplus
35 | }
36 | #endif /* __cplusplus */
37 | #endif /* COMMON_PRIVATE_H */
38 |
--------------------------------------------------------------------------------
/src/common.c:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2015 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #include
23 | #include
24 |
25 | #include "common-private.h"
26 |
27 | void
28 | dc_status_set_error (dc_status_t *status, dc_status_t error)
29 | {
30 | assert (status != NULL);
31 |
32 | if (*status == DC_STATUS_SUCCESS)
33 | *status = error;
34 | }
35 |
--------------------------------------------------------------------------------
/src/cressi_edy.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2009 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef CRESSI_EDY_H
23 | #define CRESSI_EDY_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | cressi_edy_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
36 |
37 | dc_status_t
38 | cressi_edy_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size, unsigned int model);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* CRESSI_EDY_H */
44 |
--------------------------------------------------------------------------------
/src/cressi_goa.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2018 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef CRESSI_GOA_H
23 | #define CRESSI_GOA_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | cressi_goa_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
36 |
37 | dc_status_t
38 | cressi_goa_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* CRESSI_GOA_H */
44 |
--------------------------------------------------------------------------------
/src/cressi_leonardo.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2013 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef CRESSI_LEONARDO_H
23 | #define CRESSI_LEONARDO_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | cressi_leonardo_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
36 |
37 | dc_status_t
38 | cressi_leonardo_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size, unsigned int model);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* CRESSI_LEONARDO_H */
44 |
--------------------------------------------------------------------------------
/src/deepblu_cosmiq.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2018 Linus Torvalds
5 | * Copyright (C) 2022 Jef Driesen
6 | *
7 | * This library is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * This library is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with this library; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20 | * MA 02110-1301 USA
21 | */
22 |
23 | #ifndef DEEPBLU_COSMIQ_H
24 | #define DEEPBLU_COSMIQ_H
25 |
26 | #include
27 | #include
28 | #include
29 | #include
30 |
31 | #ifdef __cplusplus
32 | extern "C" {
33 | #endif /* __cplusplus */
34 |
35 | dc_status_t
36 | deepblu_cosmiq_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
37 |
38 | dc_status_t
39 | deepblu_cosmiq_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size);
40 |
41 | #ifdef __cplusplus
42 | }
43 | #endif /* __cplusplus */
44 | #endif /* DEEPBLU_COSMIQ_H */
45 |
--------------------------------------------------------------------------------
/src/deepsix_excursion.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2021 Ryan Gardner, Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | *
21 | */
22 | #ifndef DEEPSIX_EXCURSION_H
23 | #define DEEPSIX_EXCURSION_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | deepsix_excursion_device_open (dc_device_t **out, dc_context_t *context, dc_iostream_t *iostream);
36 |
37 | dc_status_t
38 | deepsix_excursion_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* DEEPSIX_EXCURSION_H */
44 |
--------------------------------------------------------------------------------
/src/diverite_nitekq.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2013 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DIVERITE_NITEKQ_H
23 | #define DIVERITE_NITEKQ_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | diverite_nitekq_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
36 |
37 | dc_status_t
38 | diverite_nitekq_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* DIVERITE_NITEKQ_H */
44 |
--------------------------------------------------------------------------------
/src/divesoft_freedom.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2023 Jan Matoušek, Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DIVESOFT_FREEDOM_H
23 | #define DIVESOFT_FREEDOM_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | divesoft_freedom_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
36 |
37 | dc_status_t
38 | divesoft_freedom_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* DIVESOFT_FREEDOM_H */
44 |
--------------------------------------------------------------------------------
/src/divesystem_idive.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2014 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DIVESYSTEM_IDIVE_H
23 | #define DIVESYSTEM_IDIVE_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 |
31 | #ifdef __cplusplus
32 | extern "C" {
33 | #endif /* __cplusplus */
34 |
35 | dc_status_t
36 | divesystem_idive_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream, unsigned int model);
37 |
38 | dc_status_t
39 | divesystem_idive_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size, unsigned int model);
40 |
41 | #ifdef __cplusplus
42 | }
43 | #endif /* __cplusplus */
44 | #endif /* DIVESYSTEM_IDIVE_H */
45 |
--------------------------------------------------------------------------------
/src/field-cache.h:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #define MAXGASES 16
4 | #define MAXSTRINGS 32
5 |
6 | // dc_get_field() data
7 | typedef struct dc_field_cache {
8 | unsigned int initialized;
9 |
10 | // DC_GET_FIELD_xyz
11 | unsigned int DIVETIME;
12 | double MAXDEPTH;
13 | double AVGDEPTH;
14 | double ATMOSPHERIC;
15 | dc_divemode_t DIVEMODE;
16 | unsigned int GASMIX_COUNT;
17 | unsigned int TANK_COUNT;
18 | dc_salinity_t SALINITY;
19 | dc_gasmix_t GASMIX[MAXGASES];
20 |
21 | // misc - clean me up!
22 | double lowsetpoint;
23 | double highsetpoint;
24 | double customsetpoint;
25 |
26 | // This (along with GASMIX) should be something like
27 | // dc_tank_t TANK[MAXGASES]
28 | // but that's for later
29 | dc_tankinfo_t tankinfo[MAXGASES];
30 | dc_tank_usage_t tankusage[MAXGASES];
31 | double tanksize[MAXGASES];
32 | double tankworkingpressure[MAXGASES];
33 |
34 | // DC_GET_FIELD_STRING
35 | dc_field_string_t strings[MAXSTRINGS];
36 | } dc_field_cache_t;
37 |
38 | dc_status_t dc_field_add_string(dc_field_cache_t *, const char *desc, const char *data);
39 | dc_status_t dc_field_add_string_fmt(dc_field_cache_t *, const char *desc, const char *fmt, ...);
40 | dc_status_t dc_field_get_string(dc_field_cache_t *, unsigned idx, dc_field_string_t *value);
41 | dc_status_t dc_field_get(dc_field_cache_t *, dc_field_type_t, unsigned int, void *);
42 |
43 | /*
44 | * Macro to make it easy to set DC_FIELD_xyz values.
45 | *
46 | * This explains why dc_field_cache member names are
47 | * those odd all-capitalized names: they match the
48 | * names of the DC_FIELD_xyz enums.
49 | */
50 | #define DC_ASSIGN_FIELD(cache, name, value) do { \
51 | (cache).initialized |= 1u << DC_FIELD_##name; \
52 | (cache).name = (value); \
53 | } while (0)
54 |
55 | #define DC_ASSIGN_IDX(cache, name, idx, value) do { \
56 | (cache).initialized |= 1u << DC_FIELD_##name; \
57 | (cache).name[idx] = (value); \
58 | } while (0)
59 |
60 | // Ugly define thing makes the code much easier to read
61 | // I'd love to use __typeof__, but that's a gcc'ism
62 | #define DC_FIELD_VALUE(cache, p, NAME) \
63 | (memcpy((p), &(cache).NAME, sizeof((cache).NAME)), DC_STATUS_SUCCESS)
64 |
65 | #define DC_FIELD_INDEX(cache, p, NAME, idx) \
66 | (memcpy((p), (cache).NAME+idx, sizeof((cache).NAME[0])), DC_STATUS_SUCCESS)
67 |
--------------------------------------------------------------------------------
/src/garmin.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Garmin Descent Mk1
3 | *
4 | * Copyright (C) 2018 Linus Torvalds
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef GARMIN_H
23 | #define GARMIN_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | garmin_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream, unsigned int model);
36 |
37 | dc_status_t
38 | garmin_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size);
39 |
40 | // we need to be able to call into the parser to check if the
41 | // files that we find are actual dives
42 | int
43 | garmin_parser_is_dive (dc_parser_t *abstract, dc_event_devinfo_t *devinfo_p);
44 |
45 | // The dive names are of the form "2018-08-20-10-23-30.fit"
46 | // With the terminating zero, that's 24 bytes.
47 | //
48 | // We use this as the fingerprint, but it ends up being a
49 | // special fixed header in the parser data too.
50 | #define FIT_NAME_SIZE 24
51 |
52 | #ifdef __cplusplus
53 | }
54 | #endif /* __cplusplus */
55 | #endif /* GARMIN_H */
56 |
--------------------------------------------------------------------------------
/src/halcyon_symbios.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2023 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef HALCYON_SYMBIOS_H
23 | #define HALCYON_SYMBIOS_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | halcyon_symbios_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
36 |
37 | dc_status_t
38 | halcyon_symbios_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* HALCYON_SYMBIOS_H */
44 |
--------------------------------------------------------------------------------
/src/hdlc.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2023 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DC_HDLC_H
23 | #define DC_HDLC_H
24 |
25 | #include
26 | #include
27 | #include
28 |
29 | #ifdef __cplusplus
30 | extern "C" {
31 | #endif /* __cplusplus */
32 |
33 | /**
34 | * Create a HDLC I/O stream layered on top of another base I/O stream.
35 | *
36 | * @param[out] iostream A location to store the HDLC I/O stream.
37 | * @param[in] context A valid context.
38 | * @param[in] base A valid I/O stream.
39 | * @param[in] isize The input packet size in bytes.
40 | * @param[in] osize The output packet size in bytes.
41 | * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code
42 | * on failure.
43 | */
44 | dc_status_t
45 | dc_hdlc_open (dc_iostream_t **iostream, dc_context_t *context, dc_iostream_t *base, size_t isize, size_t osize);
46 |
47 | #ifdef __cplusplus
48 | }
49 | #endif /* __cplusplus */
50 | #endif /* DC_HDLC_H */
51 |
--------------------------------------------------------------------------------
/src/hw_frog.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2012 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef HW_FROG_H
23 | #define HW_FROG_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 |
31 | #ifdef __cplusplus
32 | extern "C" {
33 | #endif /* __cplusplus */
34 |
35 | dc_status_t
36 | hw_frog_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
37 |
38 | #ifdef __cplusplus
39 | }
40 | #endif /* __cplusplus */
41 | #endif /* HW_FROG_H */
42 |
--------------------------------------------------------------------------------
/src/hw_ostc.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2009 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef HW_OSTC_H
23 | #define HW_OSTC_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 |
31 | #ifdef __cplusplus
32 | extern "C" {
33 | #endif /* __cplusplus */
34 |
35 | dc_status_t
36 | hw_ostc_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
37 |
38 | dc_status_t
39 | hw_ostc_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size, unsigned int serial);
40 |
41 | #ifdef __cplusplus
42 | }
43 | #endif /* __cplusplus */
44 | #endif /* HW_OSTC_H */
45 |
--------------------------------------------------------------------------------
/src/hw_ostc3.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2013 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef HW_OSTC3_H
23 | #define HW_OSTC3_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 |
31 | #ifdef __cplusplus
32 | extern "C" {
33 | #endif /* __cplusplus */
34 |
35 | dc_status_t
36 | hw_ostc3_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
37 |
38 | dc_status_t
39 | hw_ostc3_parser_create (dc_parser_t **out, dc_context_t *context, const unsigned char data[], size_t size, unsigned int model, unsigned int serial);
40 |
41 | #ifdef __cplusplus
42 | }
43 | #endif /* __cplusplus */
44 | #endif /* HW_OSTC3_H */
45 |
--------------------------------------------------------------------------------
/src/ihex.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2013 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DC_IHEX_H
23 | #define DC_IHEX_H
24 |
25 | #include
26 | #include
27 |
28 | #ifdef __cplusplus
29 | extern "C" {
30 | #endif /* __cplusplus */
31 |
32 | typedef struct dc_ihex_file_t dc_ihex_file_t;
33 |
34 | typedef struct dc_ihex_entry_t {
35 | unsigned int type;
36 | unsigned int address;
37 | unsigned int length;
38 | unsigned char data[255];
39 | } dc_ihex_entry_t;
40 |
41 | dc_status_t
42 | dc_ihex_file_open (dc_ihex_file_t **file, dc_context_t *context, const char *filename);
43 |
44 | dc_status_t
45 | dc_ihex_file_read (dc_ihex_file_t *file, dc_ihex_entry_t *entry);
46 |
47 | dc_status_t
48 | dc_ihex_file_reset (dc_ihex_file_t *file);
49 |
50 | dc_status_t
51 | dc_ihex_file_close (dc_ihex_file_t *file);
52 |
53 | #ifdef __cplusplus
54 | }
55 | #endif /* __cplusplus */
56 | #endif /* DC_IHEX_H */
57 |
--------------------------------------------------------------------------------
/src/iterator-private.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2012 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DC_ITERATOR_PRIVATE_H
23 | #define DC_ITERATOR_PRIVATE_H
24 |
25 | #include
26 | #include
27 |
28 | #ifdef __cplusplus
29 | extern "C" {
30 | #endif /* __cplusplus */
31 |
32 | typedef struct dc_iterator_vtable_t dc_iterator_vtable_t;
33 |
34 | struct dc_iterator_t {
35 | const dc_iterator_vtable_t *vtable;
36 | dc_context_t *context;
37 | };
38 |
39 | struct dc_iterator_vtable_t {
40 | size_t size;
41 | dc_status_t (*next) (dc_iterator_t *iterator, void *item);
42 | dc_status_t (*free) (dc_iterator_t *iterator);
43 | };
44 |
45 | dc_iterator_t *
46 | dc_iterator_allocate (dc_context_t *context, const dc_iterator_vtable_t *vtable);
47 |
48 | void
49 | dc_iterator_deallocate (dc_iterator_t *iterator);
50 |
51 | int
52 | dc_iterator_isinstance (dc_iterator_t *iterator, const dc_iterator_vtable_t *vtable);
53 |
54 | #ifdef __cplusplus
55 | }
56 | #endif /* __cplusplus */
57 | #endif /* DC_ITERATOR_PRIVATE_H */
58 |
--------------------------------------------------------------------------------
/src/libdivecomputer.rc:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2010 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifdef HAVE_CONFIG_H
23 | #include "config.h"
24 | #endif
25 |
26 | #include
27 |
28 | #include
29 |
30 | #ifdef HAVE_VERSION_SUFFIX
31 | #include "revision.h"
32 | #endif
33 |
34 | VS_VERSION_INFO VERSIONINFO
35 | FILEVERSION DC_VERSION_MAJOR,DC_VERSION_MINOR,DC_VERSION_MICRO,0
36 | PRODUCTVERSION DC_VERSION_MAJOR,DC_VERSION_MINOR,DC_VERSION_MICRO,0
37 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
38 | #ifdef HAVE_VERSION_SUFFIX
39 | FILEFLAGS VS_FF_PRERELEASE
40 | #else
41 | FILEFLAGS 0
42 | #endif
43 | FILEOS VOS__WINDOWS32
44 | FILETYPE VFT_DLL
45 | FILESUBTYPE 0
46 | BEGIN
47 | BLOCK "StringFileInfo"
48 | BEGIN
49 | BLOCK "040904B0"
50 | BEGIN
51 | VALUE "CompanyName", "The libdivecomputer developers"
52 | VALUE "FileDescription", "A library for communication with various dive computers."
53 | VALUE "FileVersion", DC_VERSION
54 | VALUE "InternalName", "libdivecomputer"
55 | VALUE "LegalCopyright", "Copyright © 2010 Jef Driesen"
56 | VALUE "OriginalFilename", "libdivecomputer.dll"
57 | VALUE "ProductName", "libdivecomputer"
58 | VALUE "ProductVersion", DC_VERSION
59 | #ifdef HAVE_VERSION_SUFFIX
60 | VALUE "Comments", DC_VERSION_REVISION
61 | #endif
62 | END
63 | END
64 | BLOCK "VarFileInfo"
65 | BEGIN
66 | VALUE "Translation", 1033, 1200
67 | END
68 | END
69 |
--------------------------------------------------------------------------------
/src/liquivision_lynx.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2020 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef LIQUIVISION_LYNX_H
23 | #define LIQUIVISION_LYNX_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | liquivision_lynx_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
36 |
37 | dc_status_t
38 | liquivision_lynx_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size, unsigned int model);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* LIQUIVISION_LYNX_H */
44 |
--------------------------------------------------------------------------------
/src/mares_common.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2009 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef MARES_COMMON_H
23 | #define MARES_COMMON_H
24 |
25 | #include
26 |
27 | #include "device-private.h"
28 |
29 | #ifdef __cplusplus
30 | extern "C" {
31 | #endif /* __cplusplus */
32 |
33 | #define PACKETSIZE 0x20
34 |
35 | typedef struct mares_common_layout_t {
36 | unsigned int memsize;
37 | unsigned int rb_profile_begin;
38 | unsigned int rb_profile_end;
39 | unsigned int rb_freedives_begin;
40 | unsigned int rb_freedives_end;
41 | } mares_common_layout_t;
42 |
43 | typedef struct mares_common_device_t {
44 | dc_device_t base;
45 | dc_iostream_t *iostream;
46 | unsigned int echo;
47 | unsigned int delay;
48 | } mares_common_device_t;
49 |
50 | void
51 | mares_common_device_init (mares_common_device_t *device, dc_iostream_t *iostream);
52 |
53 | dc_status_t
54 | mares_common_device_read (dc_device_t *abstract, unsigned int address, unsigned char data[], unsigned int size);
55 |
56 | dc_status_t
57 | mares_common_extract_dives (dc_context_t *context, const mares_common_layout_t *layout, const unsigned char fingerprint[], const unsigned char data[], dc_dive_callback_t callback, void *userdata);
58 |
59 | #ifdef __cplusplus
60 | }
61 | #endif /* __cplusplus */
62 | #endif /* MARES_COMMON_H */
63 |
--------------------------------------------------------------------------------
/src/mares_darwin.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2011 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef MARES_DARWIN_H
23 | #define MARES_DARWIN_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | mares_darwin_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream, unsigned int model);
36 |
37 | dc_status_t
38 | mares_darwin_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size, unsigned int model);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* MARES_DARWIN_H */
44 |
--------------------------------------------------------------------------------
/src/mares_iconhd.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2010 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef MARES_ICONHD_H
23 | #define MARES_ICONHD_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | mares_iconhd_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream, unsigned int model);
36 |
37 | dc_status_t
38 | mares_iconhd_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size, unsigned int model, unsigned int serial);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* MARES_ICONHD_H */
44 |
--------------------------------------------------------------------------------
/src/mares_nemo.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef MARES_NEMO_H
23 | #define MARES_NEMO_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | mares_nemo_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
36 |
37 | dc_status_t
38 | mares_nemo_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size, unsigned int model);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* MARES_NEMO_H */
44 |
--------------------------------------------------------------------------------
/src/mares_puck.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2009 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef MARES_PUCK_H
23 | #define MARES_PUCK_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | mares_puck_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
36 |
37 | #ifdef __cplusplus
38 | }
39 | #endif /* __cplusplus */
40 | #endif /* MARES_PUCK_H */
41 |
--------------------------------------------------------------------------------
/src/mclean_extreme.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2020 Jef Driesen, David Carron
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef MCLEAN_EXTREME_H
23 | #define MCLEAN_EXTREME_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | mclean_extreme_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
36 |
37 | dc_status_t
38 | mclean_extreme_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* mclean_extreme_H */
44 |
--------------------------------------------------------------------------------
/src/oceanic_atom2.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef OCEANIC_ATOM2_H
23 | #define OCEANIC_ATOM2_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #include
31 |
32 | #ifdef __cplusplus
33 | extern "C" {
34 | #endif /* __cplusplus */
35 |
36 | dc_status_t
37 | oceanic_atom2_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream, unsigned int model);
38 |
39 | dc_status_t
40 | oceanic_atom2_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size, unsigned int model, unsigned int serial);
41 |
42 | #ifdef __cplusplus
43 | }
44 | #endif /* __cplusplus */
45 | #endif /* OCEANIC_ATOM2_H */
46 |
--------------------------------------------------------------------------------
/src/oceanic_veo250.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef OCEANIC_VEO250_H
23 | #define OCEANIC_VEO250_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #include
31 |
32 | #ifdef __cplusplus
33 | extern "C" {
34 | #endif /* __cplusplus */
35 |
36 | dc_status_t
37 | oceanic_veo250_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
38 |
39 | dc_status_t
40 | oceanic_veo250_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size, unsigned int model);
41 |
42 | #ifdef __cplusplus
43 | }
44 | #endif /* __cplusplus */
45 | #endif /* OCEANIC_VEO250_H */
46 |
--------------------------------------------------------------------------------
/src/oceanic_vtpro.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef OCEANIC_VTPRO_H
23 | #define OCEANIC_VTPRO_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #include
31 |
32 | #ifdef __cplusplus
33 | extern "C" {
34 | #endif /* __cplusplus */
35 |
36 | dc_status_t
37 | oceanic_vtpro_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream, unsigned int model);
38 |
39 | dc_status_t
40 | oceanic_vtpro_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size, unsigned int model);
41 |
42 | #ifdef __cplusplus
43 | }
44 | #endif /* __cplusplus */
45 | #endif /* OCEANIC_VTPRO_H */
46 |
--------------------------------------------------------------------------------
/src/oceans_s1.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2020 Linus Torvalds
5 | * Copyright (C) 2022 Jef Driesen
6 | *
7 | * This library is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * This library is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with this library; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20 | * MA 02110-1301 USA
21 | */
22 |
23 | #ifndef OCEANS_S1_H
24 | #define OCEANS_S1_H
25 |
26 | #include
27 | #include
28 | #include
29 | #include
30 |
31 | #ifdef __cplusplus
32 | extern "C" {
33 | #endif /* __cplusplus */
34 |
35 | dc_status_t
36 | oceans_s1_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
37 |
38 | dc_status_t
39 | oceans_s1_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size);
40 |
41 | #ifdef __cplusplus
42 | }
43 | #endif /* __cplusplus */
44 | #endif /* OCEANS_S1_H */
45 |
--------------------------------------------------------------------------------
/src/oceans_s1_common.c:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2022 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #include // memcmp, memcpy
23 | #include // malloc, free
24 | #include
25 |
26 | #include "oceans_s1_common.h"
27 |
28 | int
29 | oceans_s1_getline (char **line, size_t *linelen, const unsigned char **data, size_t *size)
30 | {
31 | if (line == NULL || linelen == NULL || data == NULL || size == NULL)
32 | return -1;
33 |
34 | if (*size == 0)
35 | return -1;
36 |
37 | // Find the end of the line.
38 | unsigned int strip = 0;
39 | const unsigned char *p = *data, *end = p + *size;
40 | while (p != end) {
41 | unsigned char c = *p++;
42 | if (c == '\r' || c == '\n') {
43 | strip = 1;
44 | break;
45 | }
46 | }
47 |
48 | // Get the length of the line.
49 | size_t len = p - *data;
50 |
51 | // Resize the buffer (if necessary).
52 | if (*line == NULL || len + 1 > *linelen) {
53 | char *buf = (char *) malloc (len + 1);
54 | if (buf == NULL)
55 | return -1;
56 | free (*line);
57 | *line = buf;
58 | *linelen = len + 1;
59 | }
60 |
61 | // Copy the data.
62 | memcpy (*line, *data, len - strip);
63 | (*line)[len - strip] = 0;
64 | *data += len;
65 | *size -= len;
66 |
67 | return len - strip;
68 | }
69 |
--------------------------------------------------------------------------------
/src/oceans_s1_common.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2022 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef OCEANS_S1_COMMON_H
23 | #define OCEANS_S1_COMMON_H
24 |
25 | #ifdef __cplusplus
26 | extern "C" {
27 | #endif /* __cplusplus */
28 |
29 | int
30 | oceans_s1_getline (char **line, size_t *linelen, const unsigned char **data, size_t *size);
31 |
32 | #ifdef __cplusplus
33 | }
34 | #endif /* __cplusplus */
35 | #endif /* OCEANS_S1_COMMON_H */
36 |
--------------------------------------------------------------------------------
/src/packet.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2023 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DC_PACKET_H
23 | #define DC_PACKET_H
24 |
25 | #include
26 | #include
27 | #include
28 |
29 | #ifdef __cplusplus
30 | extern "C" {
31 | #endif /* __cplusplus */
32 |
33 | /**
34 | * Create a packet I/O stream layered on top of another base I/O stream.
35 | *
36 | * This layered I/O allows reading and writing a byte stream from the
37 | * underlying packet oriented transport. It changes the packet oriented
38 | * base transport into a stream oriented transport.
39 | *
40 | * @param[out] iostream A location to store the packet I/O stream.
41 | * @param[in] context A valid context.
42 | * @param[in] base A valid I/O stream.
43 | * @param[in] isize The input packet size in bytes.
44 | * @param[in] osize The output packet size in bytes.
45 | * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code
46 | * on failure.
47 | */
48 | dc_status_t
49 | dc_packet_open (dc_iostream_t **iostream, dc_context_t *context, dc_iostream_t *base, size_t isize, size_t osize);
50 |
51 | #ifdef __cplusplus
52 | }
53 | #endif /* __cplusplus */
54 | #endif /* DC_PACKET_H */
55 |
--------------------------------------------------------------------------------
/src/pelagic_i330r.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2023 Janice McLaughlin
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef PELAGIC_I330R_H
23 | #define PELAGIC_I330R_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | pelagic_i330r_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream, unsigned int model);
36 |
37 | #ifdef __cplusplus
38 | }
39 | #endif /* __cplusplus */
40 | #endif /* PELAGIC_I330R_H */
41 |
--------------------------------------------------------------------------------
/src/reefnet_sensus.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef REEFNET_SENSUS_H
23 | #define REEFNET_SENSUS_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 |
31 | #ifdef __cplusplus
32 | extern "C" {
33 | #endif /* __cplusplus */
34 |
35 | dc_status_t
36 | reefnet_sensus_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
37 |
38 | dc_status_t
39 | reefnet_sensus_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size);
40 |
41 | #ifdef __cplusplus
42 | }
43 | #endif /* __cplusplus */
44 | #endif /* REEFNET_SENSUS_H */
45 |
--------------------------------------------------------------------------------
/src/reefnet_sensuspro.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef REEFNET_SENSUSPRO_H
23 | #define REEFNET_SENSUSPRO_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 |
31 | #ifdef __cplusplus
32 | extern "C" {
33 | #endif /* __cplusplus */
34 |
35 | dc_status_t
36 | reefnet_sensuspro_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
37 |
38 | dc_status_t
39 | reefnet_sensuspro_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size);
40 |
41 | #ifdef __cplusplus
42 | }
43 | #endif /* __cplusplus */
44 | #endif /* REEFNET_SENSUSPRO_H */
45 |
--------------------------------------------------------------------------------
/src/reefnet_sensusultra.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef REEFNET_SENSUSULTRA_H
23 | #define REEFNET_SENSUSULTRA_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 |
31 | #ifdef __cplusplus
32 | extern "C" {
33 | #endif /* __cplusplus */
34 |
35 | dc_status_t
36 | reefnet_sensusultra_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
37 |
38 | dc_status_t
39 | reefnet_sensusultra_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size);
40 |
41 | #ifdef __cplusplus
42 | }
43 | #endif /* __cplusplus */
44 | #endif /* REEFNET_SENSUSULTRA_H */
45 |
--------------------------------------------------------------------------------
/src/ringbuffer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef RINGBUFFER_H
23 | #define RINGBUFFER_H
24 |
25 | #ifdef __cplusplus
26 | extern "C" {
27 | #endif /* __cplusplus */
28 |
29 | #define DC_RINGBUFFER_EMPTY 0
30 | #define DC_RINGBUFFER_FULL 1
31 |
32 | unsigned int
33 | ringbuffer_normalize (unsigned int a, unsigned int begin, unsigned int end);
34 |
35 | unsigned int
36 | ringbuffer_distance (unsigned int a, unsigned int b, int mode, unsigned int begin, unsigned int end);
37 |
38 | unsigned int
39 | ringbuffer_increment (unsigned int a, unsigned int delta, unsigned int begin, unsigned int end);
40 |
41 | unsigned int
42 | ringbuffer_decrement (unsigned int a, unsigned int delta, unsigned int begin, unsigned int end);
43 |
44 | #ifdef __cplusplus
45 | }
46 | #endif /* __cplusplus */
47 | #endif /* RINGBUFFER_H */
48 |
--------------------------------------------------------------------------------
/src/seac_screen.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2022 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef SEAC_SCREEN_H
23 | #define SEAC_SCREEN_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | seac_screen_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
36 |
37 | dc_status_t
38 | seac_screen_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size, unsigned int model);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* SEAC_SCREEN_H */
44 |
--------------------------------------------------------------------------------
/src/shearwater_petrel.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2013 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef SHEARWATER_PETREL_H
23 | #define SHEARWATER_PETREL_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | shearwater_petrel_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
36 |
37 | dc_status_t
38 | shearwater_petrel_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size, unsigned int model, unsigned int serial);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* SHEARWATER_PETREL_H */
44 |
--------------------------------------------------------------------------------
/src/shearwater_predator.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2012 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef SHEARWATER_PREDATOR_H
23 | #define SHEARWATER_PREDATOR_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | shearwater_predator_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
36 |
37 | dc_status_t
38 | shearwater_predator_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size, unsigned int model, unsigned int serial);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* SHEARWATER_PREDATOR_H */
44 |
--------------------------------------------------------------------------------
/src/sporasub_sp2.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2021 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef SPORASUB_SP2_H
23 | #define SPORASUB_SP2_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | sporasub_sp2_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
36 |
37 | dc_status_t
38 | sporasub_sp2_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* SPORASUB_SP2_H */
44 |
--------------------------------------------------------------------------------
/src/suunto_common.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef SUUNTO_COMMON_H
23 | #define SUUNTO_COMMON_H
24 |
25 | #include "device-private.h"
26 |
27 | #ifdef __cplusplus
28 | extern "C" {
29 | #endif /* __cplusplus */
30 |
31 | typedef struct suunto_common_device_t {
32 | dc_device_t base;
33 | unsigned char fingerprint[5];
34 | } suunto_common_device_t;
35 |
36 | typedef struct suunto_common_layout_t {
37 | // End-of-profile marker
38 | unsigned int eop;
39 | // Profile ringbuffer
40 | unsigned int rb_profile_begin;
41 | unsigned int rb_profile_end;
42 | // Fingerprint
43 | unsigned int fp_offset;
44 | // Peek
45 | unsigned int peek;
46 | } suunto_common_layout_t;
47 |
48 | void
49 | suunto_common_device_init (suunto_common_device_t *device);
50 |
51 | dc_status_t
52 | suunto_common_device_set_fingerprint (dc_device_t *device, const unsigned char data[], unsigned int size);
53 |
54 | dc_status_t
55 | suunto_common_extract_dives (suunto_common_device_t *device, const suunto_common_layout_t *layout, const unsigned char data[], dc_dive_callback_t callback, void *userdata);
56 |
57 | #ifdef __cplusplus
58 | }
59 | #endif /* __cplusplus */
60 | #endif /* SUUNTO_COMMON_H */
61 |
--------------------------------------------------------------------------------
/src/suunto_d9.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef SUUNTO_D9_H
23 | #define SUUNTO_D9_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 |
31 | #ifdef __cplusplus
32 | extern "C" {
33 | #endif /* __cplusplus */
34 |
35 | dc_status_t
36 | suunto_d9_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream, unsigned int model);
37 |
38 | dc_status_t
39 | suunto_d9_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size, unsigned int model, unsigned int serial);
40 |
41 | #ifdef __cplusplus
42 | }
43 | #endif /* __cplusplus */
44 | #endif /* SUUNTO_D9_H */
45 |
--------------------------------------------------------------------------------
/src/suunto_eon.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef SUUNTO_EON_H
23 | #define SUUNTO_EON_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 |
31 | #ifdef __cplusplus
32 | extern "C" {
33 | #endif /* __cplusplus */
34 |
35 | dc_status_t
36 | suunto_eon_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
37 |
38 | dc_status_t
39 | suunto_eon_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size, int spyder);
40 |
41 | #ifdef __cplusplus
42 | }
43 | #endif /* __cplusplus */
44 | #endif /* SUUNTO_EON_H */
45 |
--------------------------------------------------------------------------------
/src/suunto_eonsteel.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2014 Linus Torvalds
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef SUUNTO_EONSTEEL_H
23 | #define SUUNTO_EONSTEEL_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | suunto_eonsteel_device_open(dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream, unsigned int model);
36 |
37 | dc_status_t
38 | suunto_eonsteel_parser_create(dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size, unsigned int model);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* SUUNTO_EONSTEEL_H */
44 |
--------------------------------------------------------------------------------
/src/suunto_solution.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef SUUNTO_SOLUTION_H
23 | #define SUUNTO_SOLUTION_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | suunto_solution_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
36 |
37 | dc_status_t
38 | suunto_solution_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* SUUNTO_SOLUTION_H */
44 |
--------------------------------------------------------------------------------
/src/suunto_vyper.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef SUUNTO_VYPER_H
23 | #define SUUNTO_VYPER_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | suunto_vyper_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
36 |
37 | dc_status_t
38 | suunto_vyper_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size, unsigned int serial);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* SUUNTO_VYPER_H */
44 |
--------------------------------------------------------------------------------
/src/suunto_vyper2.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef SUUNTO_VYPER2_H
23 | #define SUUNTO_VYPER2_H
24 |
25 | #ifdef __cplusplus
26 | extern "C" {
27 | #endif /* __cplusplus */
28 |
29 | #include
30 | #include
31 | #include
32 | #include
33 |
34 | dc_status_t
35 | suunto_vyper2_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
36 |
37 | #ifdef __cplusplus
38 | }
39 | #endif /* __cplusplus */
40 | #endif /* SUUNTO_VYPER2_H */
41 |
--------------------------------------------------------------------------------
/src/tecdiving_divecomputereu.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2018 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef TECDIVING_DIVECOMPUTEREU_H
23 | #define TECDIVING_DIVECOMPUTEREU_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | tecdiving_divecomputereu_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
36 |
37 | dc_status_t
38 | tecdiving_divecomputereu_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* TECDIVING_DIVECOMPUTEREU_H */
44 |
--------------------------------------------------------------------------------
/src/timer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2018 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef DC_TIMER_H
23 | #define DC_TIMER_H
24 |
25 | #include
26 |
27 | #ifdef __cplusplus
28 | extern "C" {
29 | #endif /* __cplusplus */
30 |
31 | #if defined (_WIN32) && !defined (__GNUC__)
32 | typedef unsigned __int64 dc_usecs_t;
33 | #else
34 | typedef unsigned long long dc_usecs_t;
35 | #endif
36 |
37 | typedef struct dc_timer_t dc_timer_t;
38 |
39 | dc_status_t
40 | dc_timer_new (dc_timer_t **timer);
41 |
42 | dc_status_t
43 | dc_timer_now (dc_timer_t *timer, dc_usecs_t *usecs);
44 |
45 | dc_status_t
46 | dc_timer_free (dc_timer_t *timer);
47 |
48 | #ifdef __cplusplus
49 | }
50 | #endif /* __cplusplus */
51 | #endif /* DC_TIMER_H */
52 |
--------------------------------------------------------------------------------
/src/uwatec_aladin.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef UWATEC_ALADIN_H
23 | #define UWATEC_ALADIN_H
24 |
25 | #ifdef __cplusplus
26 | extern "C" {
27 | #endif /* __cplusplus */
28 |
29 | #include
30 | #include
31 | #include
32 |
33 | dc_status_t
34 | uwatec_aladin_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
35 |
36 | #ifdef __cplusplus
37 | }
38 | #endif /* __cplusplus */
39 | #endif /* UWATEC_ALADIN_H */
40 |
--------------------------------------------------------------------------------
/src/uwatec_memomouse.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef UWATEC_MEMOMOUSE_H
23 | #define UWATEC_MEMOMOUSE_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | uwatec_memomouse_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
36 |
37 | dc_status_t
38 | uwatec_memomouse_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* UWATEC_MEMOMOUSE_H */
44 |
--------------------------------------------------------------------------------
/src/uwatec_smart.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2008 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifndef UWATEC_SMART_H
23 | #define UWATEC_SMART_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif /* __cplusplus */
33 |
34 | dc_status_t
35 | uwatec_smart_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
36 |
37 | dc_status_t
38 | uwatec_smart_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size, unsigned int model);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif /* __cplusplus */
43 | #endif /* UWATEC_SMART_H */
44 |
--------------------------------------------------------------------------------
/src/version.c:
--------------------------------------------------------------------------------
1 | /*
2 | * libdivecomputer
3 | *
4 | * Copyright (C) 2010 Jef Driesen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 | * MA 02110-1301 USA
20 | */
21 |
22 | #ifdef HAVE_CONFIG_H
23 | #include "config.h"
24 | #endif
25 |
26 | #include