LibSerial and signal_handler

R

roxlu

Hi all

I'm using LibSerial
(http://libserial.sourceforge.net/mediawiki/index.php/LibSerial_Tutorial)
for communication with my serial port. I can read and write data. But,
as I've implemented it as a part of a tcp/ip server, I need to use the
signal_handler functionality. Actually I want a function to be called
whenever data arrives at the serial port. But I'm still learning c++
and I really can't figure out how to do this.

Here is a class list:
http://libserial.sourceforge.net/doxygen/annotated.html with a
PosixSignalDispatcher, which I think is needed in my case, but how can
I 'use' this with a SerialStream object?

Thanks in advance,
Greetngs roxlu
 
R

red floyd

roxlu said:
Hi all

I'm using LibSerial
(http://libserial.sourceforge.net/mediawiki/index.php/LibSerial_Tutorial)
for communication with my serial port. I can read and write data. But,
as I've implemented it as a part of a tcp/ip server, I need to use the
signal_handler functionality. Actually I want a function to be called
whenever data arrives at the serial port. But I'm still learning c++
and I really can't figure out how to do this.

Here is a class list:
http://libserial.sourceforge.net/doxygen/annotated.html with a
PosixSignalDispatcher, which I think is needed in my case, but how can
I 'use' this with a SerialStream object?

I'm sorry, but your question is totally off-topic here. I suggest you
use the SourceForge forum for your project, as people who know that
library hang out there.

Here, we are discussing the language C++ as defined by the standard
(either ISO/IEC 14882:2003 or ISO/IEC 14882:1998(E)).
 
R

roxlu

red said:
I'm sorry, but your question is totally off-topic here. I suggest you
use the SourceForge forum for your project, as people who know that
library hang out there.

Here, we are discussing the language C++ as defined by the standard
(either ISO/IEC 14882:2003 or ISO/IEC 14882:1998(E)).

Oke thanx, but the SF forums for this library aren't used, so I hoped
someone here could help me...
 
R

red floyd

roxlu said:
red said:
roxlu said:
[OT redacted]
I'm sorry, but your question is totally off-topic here. I suggest you
use the SourceForge forum for your project, as people who know that
library hang out there.

Here, we are discussing the language C++ as defined by the standard
(either ISO/IEC 14882:2003 or ISO/IEC 14882:1998(E)).

Oke thanx, but the SF forums for this library aren't used, so I hoped
someone here could help me...

Sorry, it's OT here. See FAQ 5.9
http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9
 
B

Bruintje Beer

roxlu said:
Hi all

I'm using LibSerial
(http://libserial.sourceforge.net/mediawiki/index.php/LibSerial_Tutorial)
for communication with my serial port. I can read and write data. But,
as I've implemented it as a part of a tcp/ip server, I need to use the
signal_handler functionality. Actually I want a function to be called
whenever data arrives at the serial port. But I'm still learning c++
and I really can't figure out how to do this.

Here is a class list:
http://libserial.sourceforge.net/doxygen/annotated.html with a
PosixSignalDispatcher, which I think is needed in my case, but how can
I 'use' this with a SerialStream object?

Thanks in advance,
Greetngs roxlu
Hi,

Use the "select" call. See the manual pages (man select).

Johan
 
R

Roland Pibinger

I'm sorry, but your question is totally off-topic here. I suggest you
use the SourceForge forum for your project, as people who know that
library hang out there.

Here, we are discussing the language C++ as defined by the standard
(either ISO/IEC 14882:2003 or ISO/IEC 14882:1998(E)).

Signals and signal handling are part of the C and C++ Standards. The
following article may be helpful:
http://www.cs.wustl.edu/~schmidt/signal-patterns.html

Best wishes,
Roland Pibinger
 

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

Staff online

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top