APP下载

基于Qt和Flash的嵌入式Linux软件架构设计

2017-02-16王晓燕刘军霞杨先文

现代电子技术 2017年1期

王晓燕+刘军霞+杨先文

摘 要: 基于嵌入式Qt和Flash开发技术,提出一种适合嵌入式Linux的软件架构。该架构主要由UI界面及交互脚本、运行适配接口和应用主程序三部分组成,分别采用ActionScript,JavaScript和C/C++三种语言实现。遵循软件架构设计思路,实现了一款嵌入式串口通信软件,并且与友善之臂Mini2440内置串口助手进行对比测试。结果表明,该架构运行流畅,在UI展现、用户体验等方面有明显优势,对于嵌入式应用产品的开发具有实用价值。

关键词: 嵌入式Linux; Qt; Flash; 软件架构; 串口通信

中图分类号: TN919?34; TP368.1 文献标识码: A 文章编号: 1004?373X(2017)01?0013?04

Abstract: A software architecture suitable for the embedded Linux is proposed based on Qt and Flash development techno?logies. The architecture is composed of the UI interface and its interactive script, running adapter interface and application main program, and they are implemented with ActionScript, JavaScript and C/C++ respectively. According to the design thought of the software architecture, an embedded serial port communication software was implemented, and performed for comparison test with the serial assistant built in FriendlyARM Mini2440. The results show that the architecture works well, and has obvious advantages in the aspects of UI display and user experience, and a certain practical value for the embedded application product development.

Keywords: embedded Linux; Qt; Flash; software architecture; serial port communication

0 引 言

嵌入式Linux操作系统内核开放、功能强大,且又易于裁剪和移植,已經成为嵌入式开发的首选。针对嵌入式Linux的窗口应用开发,已有的成熟技术主要有Micro?Windows/NanoX,OpenGUI,MiniGUI,Qt/Embedded等[1]。无论哪种开发技术,都面临控件功能有限、界面效果呆板、UI与底层代码强耦合等问题,造成其在UI展现、用户体验等方面欠佳。因此,结合当前流行的交互式多媒体技术,研究嵌入式软件架构具有很强的应用背景。

Flash是一个非常优秀的矢量多媒体制作工具,已成为一种交互式矢量图和多媒体的标准[2]。采用Flash设计UI的优点有:Flash程序运行于Flash player虚拟机中,具有良好的跨平台和兼容性;Flash程序是基于各个帧之间的跳转,而不是应用程序类的构造/析构,运行速度流畅;Flash程序脚本可以管理界面运行,有助于实现UI界面和应用主程序的开发分离。目前,以Flash打造UI界面,配合底层程序的软件架构在Windows平台上业已成熟[3],但是该架构基于Windows独有的COM组件方式实现,在Linux中缺少相应的替代方案。……

登录APP查看全文