DC_IRDA_OPEN(3)

πŸ“¦ version 0.9.0, in nixos 26.05, nixpkgs unstable

okay so bestie, welcome to dc_irda_open(3) from the libdivecomputer Library Functions Manual β€” this is the page that explains how to open an iostream for an IrDA device, and we’re gonna get into it. πŸ¦‹βœ¨

πŸ’… NAME πŸ’…

dc_irda_open β€” opens an iostream for an IrDA device. no cap, that’s the whole name section. πŸ’–

πŸŽ€ LIBRARY πŸŽ€

the library is libdivecomputer, periodt. ✨

🌸 SYNOPSIS 🌸

#include <libdivecomputer/irda.h>

dc_status_t
dc_irda_open(dc_iostream_t **iostream, dc_context_t *context,
    unsigned int address, unsigned int lsap);

🧚 DESCRIPTION 🧚

okay so here’s the vibe: dc_irda_open() opens an iostream for an IrDA (Infra Red) device. 🫢 it accepts a context opened with dc_context_new(3), an address given through dc_irda_iterator_new(3) together with dc_irda_device_get_address(3), and the last argument, lsap, is a port number used during the communication. πŸ’¬

currently only Uwatec computers use IrDA communication, and for those the lsap can be hardcoded to 1. 🐬

okay so important: upon returning DC_STATUS_SUCCESS, the iostream pointer must be freed with dc_iostream_close(3). do not ghost that pointer, bestie. πŸ˜­πŸ’…

πŸ”₯ RETURN VALUES πŸ”₯

it returns DC_STATUS_SUCCESS on success, or one of several error values on error. on success, the iostream pointer is filled in with an open handle. slay. πŸ‘‘

🌈 SEE ALSO 🌈

πŸ’œ AUTHORS πŸ’œ

the library libdivecomputer was written by Jef Driesen, jef@libdivecomputer.org. 🫢

this manpage is written by Vincent Hagen, vinnie@script4web.nl. ✨


bye bestie! this page is from Debian, dated June 5, 2020 β€” DC_IRDA_OPEN(3) signing off! πŸ’–πŸŽ€βœ¨

πŸ“¦ where this page comes from