COMEDI_GET_CMD_TIMIN(3)

πŸ“¦ version 0.12.0, in nixpkgs unstable

πŸ’… COMEDI_GET_CMD_TIMIN β€” comedi_get_cmd_timing_constraints

okay so real talk, this is a page from the Comedi reference manual (section 3, in case the (3) was giving you a vibe check) β€” it's all about comedi_get_cmd_timing_constraints, which lowkey does exactly what the name says: it fetches the hardware timing constraints for a streaming subdevice. no cap ✨


🌸 NAME

comedi_get_cmd_timing_constraints β€” get the hardware timing constraints for a streaming subdevice. that's it, that's the whole job πŸŽ€


✨ SYNOPSIS

#include <comedilib.h>

int comedi_get_cmd_timing_constraints(comedi_t * device,
                                      unsigned int subdevice,
                                      unsigned int scan_begin_src,
                                      unsigned int * scan_begin_min,
                                      unsigned int convert_src,
                                      unsigned int * convert_min,
                                      unsigned int * chanlist,
                                      unsigned int chanlist_len);

like, eight arguments bestie. eight. she's thorough πŸ’…


πŸ¦‹ STATUS

alpha β€” yes, alpha alpha. she's still in her experimental era, so treat her gently πŸ™ˆ


πŸ’œ DESCRIPTION

so this function queries the hardware timing constraints of a streaming subdevice. iconic behavior, honestly.

the values it hands back may indicate the range of valid inputs for comedi_cmd->scan_begin_arg and comedi_cmd->convert_arg β€” for instance when comedi_cmd->scan_begin_src==TRIG_TIMER or comedi_cmd->convert_src==TRIG_TIMER. those are your timer-girlie situations where the numbers actually matter πŸ”₯

for TRIG_EXT (or other modes?), these returned values are mostly informational and may be used in conjunction with other triggering hardware. saying "mostly informational" is such a mood ngl πŸ’€

if it's possible for the hardware constraints to depend on whether []_src==TRIG_TIMER or []_src==TRIG_EXT, then the values returned by this function will depend on these inputs. alternatively, you can specify something like [*]_src==TRIG_TIMER|TRIG_EXT and retrieve the value that is the smallest that satisfies both trigger sources. oh she's flexible, we love an overachiever 🫢

scan_begin_min may be given as NULL, such that nothing will be returned for minimum scan speed. so if u don't care, just pass NULL β€” she's not gonna be weird about it πŸ’–

convert_min may be given as NULL, such that nothing will be returned for minimum scan speed.

ok bestie i have to point this out: the page literally says "minimum scan speed" for convert_min too. yes, for convert. that's copy-paste energy at its finest 😭 i'm not fixing it, i'm just reporting it. the facts stay the facts πŸ“

⭐ RETURN VALUE

  • 0 on success πŸŽ‰
  • -1 on error 😭

short, sweet, slay.


πŸ‘‘ AUTHORS

these are the legends who wrote this thing. put some respect on every single name:

  • 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.

seven authors. main character energy across the whole squad 🌈


okay legal era, pay attention:

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. (yes, the XML source specifically β€” quoted, no paraphrasing, periodt πŸŽ€)

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. like fr fr, no warranty, read the license, i'm not your lawyer πŸ’€

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.


and that's the whole page bestie, go forth and get those timing constraints πŸ’–βœ¨πŸ¦‹

this has been the Comedi reference manual, COMEDI_GET_CMD_TIMIN(3), dated 01/01/1980 β€” yes, the copyright says 1998-2018 and the date says 1980, she contains multitudes πŸ˜­πŸ’œ love that for her. mwah 🫢

πŸ“¦ where this page comes from