Thread: serial programming, threads and dynamic buffer

  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    20

    serial programming, threads and dynamic buffer

    Hi,

    I have a problem with reading from serial port. I have to read the com port continuously en put the data into files and database. The incoming data is very different from each other. some messages are 3000 characters long.

    I read char per char, because i have to check each char, this is for seperating date, hour, header and message. There is some data lost, because of the great value of data and the writing into the database.

    I want to solve this with threads, in this thread the port is being read and the data is put into a great buffer, in my main program i want to read from the great buffer to split the data. There is continuously data coming into and read from the buffer,but how can i do this???

    i'm writing in c under linux

    thanks in advance

  2. #2
    Registered User
    Join Date
    Apr 2003
    Posts
    20
    thank you very much

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. POSIX Threads and dynamic memory allocation
    By PING in forum Linux Programming
    Replies: 1
    Last Post: 04-02-2009, 10:28 AM
  2. global variable at dynamic library
    By Mortissus in forum C++ Programming
    Replies: 2
    Last Post: 07-31-2007, 02:44 PM
  3. Dynamic 2d array
    By Mithoric in forum C++ Programming
    Replies: 8
    Last Post: 12-29-2003, 09:19 AM