473,396 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

LibSerial and signal_handler

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
5 4133
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

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
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

"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Siemel Naran | last post by:
Hi. I posted this question to comp.lang.c++, but am rephrasing it a bit from what I learned and posting to comp.lang.c++.moderated for more insight. So how do I solve my problem? I want it so...
0
by: okinrus | last post by:
Can someone take a look at this code and figure out why Serializable_base::add_serializer throws std::bad_alloc. The problem seems to be the compiler because msvc++ 7.1 says...
2
by: lovecreatesbeauty | last post by:
Hello, I'm confused by some complex function prototypes. Would you please explain those to me in detail with C language syntax itself with your rich knowledge & experiences. Thank you. 1....
4
by: foodic | last post by:
Hi all, I am new to C programming. I have seen in many Source files a declaration as follows, typedef void iamafresher(int x, int y); why they use typedef with function. Please help,
3
by: Matthias Kaeppler | last post by:
Hi, it might be a stupid question, but i'll take the chance and ask: void connect() { std::string str; // ...
4
by: News | last post by:
Hi Everyone, The attached code creates client connections to websphere queue managers and then processes an inquiry against them. The program functions when it gets options from the command...
0
by: sven.suursoho | last post by:
Does messing with signal handlers and longjmp affect Python interpreter? I'm trying to find solution for problem, described in...
2
by: Jun | last post by:
I'm running on 2.2 Kernel on a PPC platform and getting an intermttent seg fault on one of my threads. I have a spin loop after it detected the seg fault and after I loaded GDB and did a trace, I...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.