使用线程进行串行端口编程 [英] Serial Port Programing using Threads
问题描述
大家好,
我正在尝试开发一个程序,用于通过串行端口发送文件并回读相同内容.在这里,我正在做的是1st通过串口发送完整的文件,然后将其读回.但是如果发送大文件,则会产生问题.我想不断地触发文件并连续读回相同的文件,这可以通过使用线程来实现,但是我以前从未使用过.有人可以帮我吗?
如果某人无法理解要问的问题,请让我知道>
Hello Everyone,
I am trying to develop a program for sending a file through Serial port and read the same back. Here what i am doing is 1st sending the complete file through Serial Port and after that m reading it back. but if m sending large file then it creates a problem. I want to continuously fire the file and read the same back continuously and this is possible by using threads but i have never used it before. Can anyone pls help me with the Same?
If someone is not able to understand what m trying to do ask then do let me know>
推荐答案
,请参阅我对问题的评论.然后从这里开始,例如:
http://msdn.microsoft.com/en-us/library/975t8ks0%28v = vs.110%29.aspx [ ^ ].
如果没有多线程,甚至不要玩串行(或任何其他)通信应用程序的想法.同样的事情是您需要做SCADA,数据采集,控制系统,联网等等.看来现在是时候开始您了!
祝您好运,
—SA
Please see my comments to the question. And start, for example, here:
http://msdn.microsoft.com/en-us/library/975t8ks0%28v=vs.110%29.aspx[^].
And don''t even play with the idea of serial (or any other) communication applications without multithreading. Same thing is you need to do SCADA, data acquisition, control systems, networking, and a lot more. It looks like the time to start for you is now!
The best of luck for you,
—SA
这篇关于使用线程进行串行端口编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!