[lkml]   [2003]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Reading accurate size of recepts from serial port
    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.

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

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:48    [W:0.019 / U:31.192 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site