By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,330 Members | 1,443 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,330 IT Pros & Developers. It's quick & easy.

LibSerial and signal_handler

P: n/a
Hi all

I'm using LibSerial
(http://libserial.sourceforge.net/med...erial_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

Jun 16 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
roxlu wrote:
Hi all

I'm using LibSerial
(http://libserial.sourceforge.net/med...erial_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)).

Jun 16 '06 #2

P: n/a

red floyd wrote:
roxlu wrote:
Hi all

I'm using LibSerial
(http://libserial.sourceforge.net/med...erial_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)).


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

Jun 16 '06 #3

P: n/a
roxlu wrote:
red floyd wrote:
roxlu wrote:
[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-lit...t.html#faq-5.9
Jun 17 '06 #4

P: n/a

"roxlu" <di********@gmail.com> schreef in bericht
news:11**********************@h76g2000cwa.googlegr oups.com...
Hi all

I'm using LibSerial
(http://libserial.sourceforge.net/med...erial_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
Jun 17 '06 #5

P: n/a
On Fri, 16 Jun 2006 22:59:53 GMT, red floyd <no*****@here.dude> wrote:
roxlu wrote:
I'm using LibSerial
(http://libserial.sourceforge.net/med...erial_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.


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
Jun 17 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.