Timeout..

A

Andre

It's a very long time ago last I wrote in C.
I am now retired and just for fun, programing some microcontrolres ( picxx )
One of the project is a serial commmunication between such a
microcontroler and my PC ( runing Fedora 14 ).
I have an idea how to handel timeout on the microcontroler, but how to
handel timeout on the pc side.
ex:

opening /dev/ttyS1
write something
read back but no answer, I want an exit with 'Timeout'
Or something like that
Many thanks in advances
André
 
I

Ian Collins

It's a very long time ago last I wrote in C.
I am now retired and just for fun, programing some microcontrolres ( picxx )
One of the project is a serial commmunication between such a
microcontroler and my PC ( runing Fedora 14 ).
I have an idea how to handel timeout on the microcontroler, but how to
handel timeout on the pc side.
ex:

opening /dev/ttyS1
write something
read back but no answer, I want an exit with 'Timeout'
Or something like that

You would be better off asking on a platform specific group. Posix
systems have select and poll (and winsock also has select) which will do
what you want.
 
N

Noob

Andre said:
One of the project is a serial communication between such a
micro-controller and my PC ( running Fedora 14 ).

Hello,

You can ask Linux and POSIX-related questions in comp.unix.programmer

Regards.
 
N

Nils M Holm

Andre said:
read back but no answer, I want an exit with 'Timeout'

You might want to look up the man pages for select(2), poll(2),
or even setitimer(2) or ualarm(3).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top