串行通信响应检查 [英] Serial Communication Response Check

查看:72
本文介绍了串行通信响应检查的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我正在尝试对我的程序执行响应检查。本质上,程序需要将十六进制命令发送到COM端口上的各个地址,以查看哪些响应。然后取出响应地址的名称(1,2,3等)并将其放入程序的下拉框中。



唯一的方法是我可以考虑这样做是让程序检查缓冲区的值,然后将地址添加到整数数组,然后作为下拉框的源。有没有更好的方法可以做到这一点,还是关于最好的选择呢?



感谢您的帮助。

解决方案

在我看来,这是一个很好的方法。可能你需要一个动态数组(或一个足够大的静态数组)。

你也可以在运行中的下拉框中添加项目(即不需要数组)。

Hello all,

I am trying to implement a response check into my program. Essentially, the program needs to send Hexadecimal commands to various addresses on a com port to see which ones respond. Then take the names (1,2,3, etc.) of the addresses that respond and put it into a dropdown box in the program.

The only way that I can think about doing that is having the program check the buffer for values and then add the address to an integer array to then be the source for the dropdown box. Any better ways to do this or is that about the best option?

Thank you for any and all assistance.

解决方案

In my opinion, it is a good approach. Probably you need a dynamic array (or a static array sufficiently large).
You might also add items to the dropdown box 'on the fly' (that is the array is not really needed).


这篇关于串行通信响应检查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆