mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Richard B. Johnson" <root@chaos.analogic.com>
To: "Laurent Hugé" <laurent.huge@wanadoo.fr>
Cc: herbert@13thfloor.at, Stuart MacDonald <stuartm@connecttech.com>,
	"'Russell King'" <rmk@arm.linux.org.uk>,
	linux-kernel@vger.kernel.org
Subject: Re: Reading accurate size of recepts from serial port
Date: Wed, 27 Aug 2003 13:17:15 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.53.0308271312060.2174@chaos> (raw)
In-Reply-To: <200308271853.18821.laurent.huge@wanadoo.fr>

On Wed, 27 Aug 2003, Laurent [iso-8859-1] Hugé wrote:

> Le Mercredi 27 Août 2003 16:50, Herbert Pötzl a écrit :
> > hmm, why not do simple framing ...
> > [length]<data>[length]<data> ....
> That's impossible. CCSDS is the committee for space date systems and it
> provides standards that I can't overrule (even if I can't really understand
> why they've done it like that !).
> --
> Laurent Hugé.
>

The transfer frame in your reference specified, contains all
the information necessary for the protocol, even if it's stupid
to use that protocol on a RS-232C link. Nevertheless, there is
a minimim size for the header (5 octets in length). There is
also the 3 octets used for sync, which I'm pretty sure will
not be put onto the RS-232C links. Anyway, you need to read
40 bytes (always), from that, you will learn the length
of the rest of the data. So you use poll()/read() until you
get that header information. Then you will know what the
total read-length should be.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.22 on an i686 machine (794.73 BogoMips).
            Note 96.31% of all statistics are fiction.



      reply	other threads:[~2003-08-27 17:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-26  8:32 Laurent Hugé
2003-08-26  8:47 ` Russell King
2003-08-26 13:39   ` Laurent Hugé
2003-08-26 14:22     ` Stuart MacDonald
2003-08-26 15:23       ` Laurent Hugé
2003-08-27 14:50         ` Herbert Pötzl
2003-08-27 16:53           ` Laurent Hugé
2003-08-27 17:17             ` Richard B. Johnson [this message]

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=Pine.LNX.4.53.0308271312060.2174@chaos \
    --to=root@chaos.analogic.com \
    --cc=herbert@13thfloor.at \
    --cc=laurent.huge@wanadoo.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=stuartm@connecttech.com \
    /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®