COMEDI_TEST_ROUTE(3)

πŸ“¦ version 0.12.0, in nixpkgs unstable

✨ comedi_test_route ✨ (that's section 3 of the Comedi reference, bestie πŸ’…)

okay so real talk β€” this is a comedilib page, section 3, part of the Comedi reference. It's giving "niche but iconic" and honestly? we're obsessed.


🌸 SYNOPSIS 🌸

#include <comedilib.h>

int comedi_test_route(comedi_t * device, unsigned int source,
                      unsigned int destination);

πŸ¦‹ STATUS πŸ¦‹

alpha β€” yeah she's still in her alpha era, be gentle with her 🫢

πŸ’– DESCRIPTION πŸ’–

So what does this little function actually do? Two things, bestie:

  • it validates a globally-named route, checking that it's connectible
  • and it tests whether that route is actually connected

Now here's the part you gotta hear me out on. comedi_connect_route and comedi_disconnect_route literally do the same operations as comedi_set_routing / comedi_get_routing and comedi_dio_config β€” like, effectively the same thing, no cap. So this operation will only report a route as connected if both of those operations have been performed, either directly or effectively via comedi_connect_route. iykyk.

And plot twist 🫒 β€” there are several routes that are not globally connectible via comedi_connect_route, like (NI_PFI(i) --> NI_AO_SampleClock), because they have to be connected through a trigger argument instead, like comedi_cmd->start_arg for NI_AO_StartTrigger. But you can still use this function on those routes to check whether they're valid. slay, she's versatile.

Okay so the parameters:

The source parameter specifies the source of the signal route, and the destination parameter specifies the destination. What values are actually possible for source and destination? driver dependent, babes β€” but generally they need to be values that are recognizable globally for a particular device, independent of sub-device. ✨

πŸŽ€ RETURN VALUE πŸŽ€

  • -1 β€” not connectible πŸ™ˆ
  • 0 β€” connectible but not connected 😐
  • 1 β€” connectible and connected πŸ‘‘πŸ”₯

⭐ AUTHORS ⭐

  • David Schleef <ds@schleef.org> β€” Author.
  • Frank Mori Hess <fmhess@users.sourceforge.net> β€” Author.
  • Herman Bruyninckx <Herman.Bruyninckx@mech.kuleuven.ac.be> β€” Author.
  • Bernd Porr <tech@linux-usb-daq.co.uk> β€” Author.
  • Ian Abbott <abbotti@mev.co.uk> β€” Author.
  • Γ‰ric Piel <piel@delmic.com> β€” Author.
  • Spencer Olson <olsonse@umich.edu> β€” Author.

like, the whole group chat contributed. main character energy from every single one 🫢

Copyright Β© 1998-2003 David Schleef Copyright Β© 2001-2003, 2005, 2008 Frank Mori Hess Copyright Β© 2002-2003 Herman Bruyninckx Copyright Β© 2012 Bernd Porr Copyright Β© 2012 Ian Abbott Copyright Β© 2012, 2015 Γ‰ric Piel Copyright Β© 2016-2018 Spencer Olson

This document is part of Comedilib. In the context of this document, the term "source code" as defined by the license is interpreted as the XML source.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 2.1 of the License.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.

ok bestie, the no-warranty bit is fr fr serious β€” it's not a vibe, it's literally the license. don't come for me if your signal route ghosts you πŸ’€

and that's the page!! 🌈 one last cute sign-off: this icon was brought to you by the Comedi manual, dated 01/01/1980 (yes, that date, don't ask 😭), filed under COMEDI_TEST_ROUTE(3). mwah πŸ’‹ πŸŽ€βœ¨

πŸ“¦ where this page comes from