基于Java异步串行通信技术的研究
发布时间:2018-08-18 20:33
【摘要】:Java Communication API是Java平台下用于串口通信程序开发的唯一官方解决方案,Java串口通信程序均可以由官方提供的开发包中的示例程序括展;但以示例程序为基础开发的Java串口通信程序一般都存在着在异步通信模式下无法完整接收长串数据的缺陷;为解决这一问题,根据通信前收发信双方可以约定通信的数据长度这一特点,提出一种对接收到的字节进行计数的方法,以接收的数据长度为指标判断通信是否结束;通过实际编程验证,该方法克服了上述缺陷,具有很好的可行性与实用性,可以广泛应用于各种使用Java Communication API进行开发的场合。
[Abstract]:Java Communication API is the only official solution for serial communication program development under Java platform. However, the Java serial port communication program based on the sample program generally has the defect that the long string data can not be received completely in the asynchronous communication mode. In order to solve this problem, According to the characteristics that the two parties can agree on the length of the data before the communication, a method of counting the received bytes is put forward, and the length of the received data is taken as the index to judge whether the communication is over or not. This method overcomes the above defects and has good feasibility and practicability. It can be widely used in various development situations using Java Communication API.
【作者单位】: 四川大学电气信息学院;
【基金】:航空科学基金项目(20100119004) 国家级大学生创新创业训练计划项目(201310610109)
【分类号】:TN919
[Abstract]:Java Communication API is the only official solution for serial communication program development under Java platform. However, the Java serial port communication program based on the sample program generally has the defect that the long string data can not be received completely in the asynchronous communication mode. In order to solve this problem, According to the characteristics that the two parties can agree on the length of the data before the communication, a method of counting the received bytes is put forward, and the length of the received data is taken as the index to judge whether the communication is over or not. This method overcomes the above defects and has good feasibility and practicability. It can be widely used in various development situations using Java Communication API.
【作者单位】: 四川大学电气信息学院;
【基金】:航空科学基金项目(20100119004) 国家级大学生创新创业训练计划项目(201310610109)
【分类号】:TN919
【参考文献】
相关期刊论文 前4条
1 李良;朱善安;;基于Java的串口通信[J];电子器件;2007年02期
2 陆颖瑜;张永林;;利用Java实现对云台和镜头的远程控制[J];工程设计学报;2007年04期
3 吴兴军;胡汉春;;Java实现计算机与OMRON PLC串口通信[J];工业仪表与自动化装置;2010年01期
4 丁振凡;王小明;吴小元;邓建明;周斌;;客车电气绝缘智能检测系统工控机端设计[J];计算机测量与控制;2012年11期
【共引文献】
相关期刊论文 前10条
1 曾显光;陆颖瑜;张永林;;移动视频监控系统的设计[J];安防科技;2009年10期
2 邱占芝;申向春;;网络化轨道衡称重管理系统关键技术研究与实现[J];大连交通大学学报;2011年02期
3 邱占芝;于晓龙;;基于JAVA的汽车衡称重管理系统关键技术[J];大连交通大学学报;2011年04期
4 李秉荣;刘夫云;程雄;王乔义;蓝毓胜;马永辉;;自动称重系统的设计与实现[J];电子器件;2010年02期
5 唐未香;;Java程序与ZigBee串口通讯的实现[J];福建电脑;2010年05期
6 彭碧涛;罗海蛟;姜灵敏;;Java课程群的规划与建设[J];福建电脑;2014年02期
7 薛李滨;潘瑜;;Android系统安全机能的剖析与增强[J];电脑与信息技术;2014年01期
8 张明乐;吕斌斌;左武志;徐晓伟;陈e,
本文编号:2190601
本文链接:https://www.wllwen.com/kejilunwen/wltx/2190601.html