通讯技术 [英] Communications
本文介绍了通讯技术的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
虽然使用函数ReadFile(??)从串行端口获取数据,但如何指定所需的数据应仅为二进制形式(纯数据),而不应为十六进制或无符号字符?
在此先感谢
Whilest using the function ReadFile(??), for getting data from a serial port, how do you specify that the data you want should be only in binary form, (pure data), and not hex or unsigned char?
Thanks in advance
推荐答案
您无需指定任何内容:ReadFile
确实会读取原始二进制数据.
如果您收到十六进制"(即数据的十六进制表示形式),则表示对方正在向您发送该信息.
:)
You don''t need to specify anything:ReadFile
does read raw binary data.
If you get ''hex'' (i.e. the hexadecimal -textual- representation of the data) it just means the other side is sending you that.
:)
谢谢,很好的回答.我使用的是无符号字符作为缓冲区,所以我想可以改用LPVOID缓冲区[?],看看情况是否有所变化,但我相信您是正确的!
Thanks, great answer too. I was using an unsigned char as its buffer so I think I can use an LPVOID buffer [?] instead and see if things change but I believe you are correct!
这篇关于通讯技术的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文