如何使数据库从PC的串行端口获取输入? [英] How to make database that will get input from serial port on PC?

查看:62
本文介绍了如何使数据库从PC的串行端口获取输入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在该项目上使用xbee系列1,幸运的是,我已经完成了tx-rx部分.现在,我想为PC上的显示部件制作GUI.我可以在xctu终端和超级终端上看到我收到的数据,但是我想将此数据放在数据库中,以便可以在任何GUI程序上进行接口.我如何使这个数据库"可以从PC上的串行端口获取输入?我在软件方面有点慢,所以请大家多多包涵.任何帮助将不胜感激. ^ _ ^ tnx

I''m using xbee series 1 on this project and fortunately I''m done with tx-rx part. Now, I want to to make GUI for the display part on PC. I can see my received data on xctu terminal as well as on hyperterminal but I want to put this data on a database so I can interface it on any GUI program. How can I make this "database" that will get input from serial port on my PC? Im kinda slow in software part so please bear with me guys. Any help will be very much appreciated. ^_^ tnx

推荐答案

您不能直接将串行端口与数据库接口-变量太多,数据库设计人员(可以理解)从不想到了这一点.因此,您必须创建一个连接到串行端口的应用程序(或服务或其他任何东西),提取您感兴趣的数据,然后将其插入数据库中.

随后的程序可以处理数据库数据,只是不了解其源代码!

抱歉,如果听起来含糊不清,但您的问题所提供的实际信息很少,因此无法给出具体的解决方案! :laugh:
You can''t directly interface a serial port with a database - there are just too many variables, and the database designers (understandably) never thought of that. So you have to create an application (or a service, or whatever) that connects to the serial port, extracts the data you are interested in, and inserts it to the database.

A subsequent program can then process the database data, blithely ignorant of it''s source!

Sorry if that sound vague, but your question has so little actual information, that it is impossible to give a specific solution! :laugh:


当然,您不需要数据库即可表示串行端口的输入(通常一个内存缓冲区就足够了.).
但是,您可能想要为此目的使用数据库.然后,如已经建议的那样,您的应用程序必须位于串行端口和数据库之间的中间位置,并提供:
  • 串行端口输入获取.
  • 将获取的输入插入数据库.
  • 从数据库中提取数据,以便在GUI上表示出来.
Of course you don''t need a database in order to represent the input of the serial port (a memory buffer is usually enough).
However, you may want to use a database for the purpose. Then, as already suggested your application must sit in the middle, between the serial port and the database, providing:
  • serial port input acquisition.
  • insertion into the database of the acquired input.
  • extraction from the database of the data in order to represent it on the GUI.


这篇关于如何使数据库从PC的串行端口获取输入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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