COMEDI_GET_BUFFER_RE(3)
π COMEDI_GET_BUFFER_RE(3) π
okay bestie, welcome to the Comedi reference page for comedi_get_buffer_read_offset β yes that's the whole manual name situation, it's giving "the function name is longer than my attention span" but we're gonna get through it together π«Ά
β¨ NAME β¨
comedi_get_buffer_read_offset β streaming buffer read offset. that's it, that's the vibe. π
πΈ SYNOPSIS πΈ
#include <comedilib.h>
int comedi_get_buffer_read_offset(comedi_t * device,
unsigned int subdevice);
π¦ DESCRIPTION π¦
so here's the tea β β comedi_get_buffer_read_offset is the function you call on a subdevice that has a Comedi command in progress, and it hands you the current read position in the streaming buffer, expressed as an offset in bytes from the start of the buffer. slay.
and like, heads up: that position will wrap around to 0 once it hits the buffer size π so don't be out here doing math assuming it's always gonna grow. plot twist, but a predictable one.
also, this offset is only useful for memory mapped buffers. just so you know. no cap.
oh and one more thing β this function replaces comedi_get_buffer_offset and has the exact same functionality. so if you're still calling the old one, bestieβ¦ it's time. evolution era. π§
β RETURN VALUE β
- on success π
β
comedi_get_buffer_read_offsetreturns the current read position, as an offset in bytes from the start of the buffer. - on failure π β
-1is returned.
that's the whole thing. iconic and simple.
π AUTHORS π
look at this roster, we stan every single one of them:
- 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.
π COPYRIGHT π
the legal corner, but make it cute (the words are exactly the same tho, do not play with legal bestie):
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
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.
β οΈ okay this part is the serious one: 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. fr fr, don't skip this.
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! this one came from Comedi, dated 03/20/2026, and it lives in the manual as COMEDI_GET_BUFFER_RE(3) β go forth and read your buffer offsets responsibly πβ¨
π¦ where this page comes from
- ubuntu resolute: libcomedi-dev 0.11.0+5-1.3build6 Β· LGPL-2.1-only
- ubuntu stonking: libcomedi-dev 0.11.0+5-1.3build6 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms