接收数据的COM端口通知 [英] COM Port notification for Receiving Data
问题描述
我需要知道COM端口是否有任何通知可用来指示数据到达. ]
现在我处于一个SMS项目中,我需要在收到SMS时阅读该消息.
我正在使用AT命令"AT + CNMI",因此我的调制解调器将读取新收到的SMS,并将信息发送到COM端口.
我正在使用线程读取COM端口数据.我需要启动线程,但是我不知道如何通知我的线程COM端口中的数据可用.
如果您知道,请告诉我我快到期限了
在此先感谢
ganesh_IT
Hi guys i need to know is there any notification is available in COM port to indicate the data arrival. ]
Now i am in a SMS project, i need to read the SMS at the time it received.
I am using AT Command "AT+CNMI" so my modem will read the new received SMS and send the information to COM port.
I am using a thread to read the COM port data.I need to start my thread but i don''t know how to notify my thread that the data is available in COM port.
If you know tell me i am in deadline
Thanks in advance
ganesh_IT
推荐答案
我希望您会喜欢这篇文章:
C ++的串行库 [
I hope you will like this article:
Serial library for C++[^]
Regards
Espen Harlinn
作为一种简单的方法,您的读取线程可能只是在ReadFile
操作上被阻塞而等待.
:)
As simple approach, your reading thread may simply wait, blocked on aReadFile
operation.
:)
这篇关于接收数据的COM端口通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!