DC_DEVICE_SET_FINGERPRINT(3)
π DC_DEVICE_SET_FINGERPRIN(3) π
okay so real talk β this is dc_device_set_fingerprint from the Library Functions Manual, and it lives in the library libdivecomputer. bestie, it's giving "tiny function, huge glow-up." let's get into it π«Ά
β¨ NAME β¨
dc_device_set_fingerprint β sets the last-seen dive fingerprint, no cap π
π LIBRARY π
library βlibdivecomputerβ β that's the one, that's the icon π
π¦ SYNOPSIS π¦
#include <libdivecomputer/device.h>
dc_status_t
dc_device_set_fingerprint(dc_device_t *device,
const unsigned char data[], unsigned int size);
literally copy it exactly, don't @ me πΈ
π DESCRIPTION π
so what this does is it sets the last-seen dive fingerprint on a device that you opened with dc_device_open(3). and the whole vibe of this mechanism? it's so you only download dives that are βnewerβ β and yes, βnewerβ as reported by the dive computer itself, not necessarily on the calendar π like, don't assume the dates line up, the computer decides.
in normal day-to-day usage, here's the routine, and it ate:
- the fingerprint gets acquired (and saved) from the first dive downloaded from a dive computer by
dc_device_foreach(3). - then, on subsequent openings of the device, you set the fingerprint with
dc_device_set_fingerprint, and when a dive reports a fingerprint that matches, the download exits before reporting that dive. - (and the first fingerprint is saved again for subsequent invocations, so the loop just keeps rolling β¨)
in this way, only the newest dives are reported. main character energy: the old ones simply don't get an invite to the group chat π
π₯ RETURN VALUES π₯
it returns DC_STATUS_SUCCESS if the fingerprint was set, or one of several error values on error. that's it, that's the return value story π
π SEE ALSO π
go read it, iykyk π
π§ AUTHORS π§
the library βlibdivecomputerβ was written by Jef Driesen, jef@libdivecomputer.org. and the manpages? written by Kristaps Dzonsons, kristaps@bsd.lv. absolute legends, both of them π
and that's the page!! sign-off time: this lil number came from Debian, dated January 5, 2017, and it answers to the name DC_DEVICE_SET_FINGERPRINT(3) ππ
β¨ (yes the top of the page is spelled DC_DEVICE_SET_FINGERPRIN(3), she's just built like that, don't ask π)
π¦ where this page comes from
- nixos 26.05: libdivecomputer 0.9.0
- nixpkgs unstable: libdivecomputer 0.9.0
- Copyright (C) 2017 Kristaps Dzonsons <kristaps@bsd.lv>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms