mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oliver Neukum <oliver@neukum.org>
To: stefan_kopp@agilent.com
Cc: korgull@home.nl, greg@kroah.com, stern@rowland.harvard.edu,
	linux-usb@vger.kernel.org, me@felipebalbi.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] USB: add USB test and measurement class driver - round 2
Date: Fri, 29 Aug 2008 10:34:08 +0200	[thread overview]
Message-ID: <200808291034.09307.oliver@neukum.org> (raw)
In-Reply-To: <7D8F552F9FFBAC438A816966BEC4516BFBA389@cos-us-mb07.cos.agilent.com>

Am Freitag 29 August 2008 10:14:46 schrieb stefan_kopp@agilent.com:
> USBTMC has a different concept, the "termination character". If this is enabled and set to the appropriate character (usually /n), the read operation will be terminated by the device automatically. The last character in the response will be the termination character. Note, however, this capability is optional (not every vendor supports it) and even if it is supported, is might be deactivated (for good reason, e.g. for transfer of binary data).
> 
> If you are not using the termination character, the device will typically send its full output buffer contents. Usually, this works just fine because communication with the device is transactional, one query followed by a response, then another query, followed by another response, and so on.
> 
> The driver does return the number of characters received in both cases (with or without use of the term character feature).

But how do you learn in user space how many characters the device actually
did send? Using read() you'll only learn that the answer was shorter than
you asked for. If you get the amount you expected the answer may have
been as long as you expected or longer. How do you find out whether the answer
was longer?

	Regards
		Oliver

  reply	other threads:[~2008-08-29  8:33 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-27 17:20 Greg KH
2008-08-27 18:28 ` Alan Stern
2008-08-27 18:36   ` Greg KH
2008-08-27 18:58     ` Alan Stern
2008-08-27 19:05       ` Oliver Neukum
2008-08-27 19:16         ` Alan Stern
2008-08-27 23:48           ` Greg KH
2008-08-27 23:47       ` Greg KH
2008-08-28 10:10         ` Oliver Neukum
2008-08-28 16:17           ` Greg KH
2008-08-28 21:29             ` Oliver Neukum
2008-08-28 16:58         ` Marcel Janssen
2008-08-28 20:38           ` Greg KH
2008-08-29  6:57           ` stefan_kopp
2008-08-29  7:46             ` Oliver Neukum
2008-08-29  8:14               ` stefan_kopp
2008-08-29  8:34                 ` Oliver Neukum [this message]
2008-08-29  9:13                   ` stefan_kopp
2008-08-29 11:33                     ` Oliver Neukum
2008-08-29 14:39             ` Greg KH
2008-08-29 16:41               ` Marcel Janssen
2008-08-29 20:01                 ` Greg KH
2008-08-27 18:37   ` Oliver Neukum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200808291034.09307.oliver@neukum.org \
    --to=oliver@neukum.org \
    --cc=greg@kroah.com \
    --cc=korgull@home.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=me@felipebalbi.com \
    --cc=stefan_kopp@agilent.com \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®