《毕业论文外文翻译-基于Linux的嵌入式图形用户界面的研究与实现.doc》由会员分享,可在线阅读,更多相关《毕业论文外文翻译-基于Linux的嵌入式图形用户界面的研究与实现.doc(19页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、 密 级分类号编 号成 绩本科生毕业设计 (论文)外 文 翻 译原 文 标 题Research and Implementation of EmbeddedGraphic User Interface Based on Linux译 文 标 题嵌入式图形界面系统的设计与实现作者所在系别计算机科学与工程作者所在专业计算机科学与技术作者所在班级*作 者 姓 名*作 者 学 号*指导教师姓名*指导教师职称*完 成 时 间2012 年 2 月北华航天工业学院教务处制译文标题嵌入式图形界面系统的设计与实现原文标题Research and Implementation of Embedded Graphi
2、c User InterfaceBased on Linux 作 者Liu Yijun,Chen Wenbin, He Xiaoman译 名刘毅军,陈文斌,何小曼国 籍中国原文出处会议记录Research and Implementation of Embedded Graphic User Interface Based o基于Linux的嵌入式图形用户界面的研究与实现 Liu Yijtm , Chen Wenbin, He Xiaoman 刘毅军,陈文斌,何小曼 Computer Science College , Southwest Petroleum University 西南石油大学
3、计算机科学学院 hexiaoman_2008163 com hexiaoman_2008 Abstract-though the In-depth research on Linux system and embedded system graphical user interface(GUI), this paper designs an embedded GUI based on Linux and implements it The test analysis shows that the research results and the described design ideas a
4、nd methods are reasonable, feasible, have certain reference value for similar software development. 摘要:虽然在深入的研究Linux系统和嵌入式系统的图形用户界面(GUI),本文设计了一种基于Linux的嵌入式GUI,并将之实现。 测试分析表明,研究成果和描述的设计思路和方法是合理,可行的,对于类似软件的开发有一定的参考价值。 Keywords-Linux; embedded system; GUI关键词:Linux的嵌入式系统,图形用户界面 . .INTRODUCTION 引言With the
5、 development of computer technology, embedded system has become an important part of the computer field The so-called embedded system, that is a 随着计算机技术的发展,嵌入式系统已成为计算机领域的一个重要组成部分。所谓的嵌入式系统,是special computer system with application as center, computer technology as the basis , software and hardware ca
6、n be tailored to meet the application System strict以应用为中心,以计算机技术为基础,软件和硬件可定制的,以满足应用系统的严格的专用计算机系统对功能,可靠性,成本,体积,功耗的要求。嵌入式计算机中的应用数量远远超过了各种通用计算机,制造工业,过程控制,通讯,设备,仪器仪表,汽车,船舶,航空,航空航天,军事装备,消费类产品都是嵌入式计算机的应用领域。requirements for functionality, reliability , cost, size , and power consumption Embedded computer f
7、ar exceeds a variety of general-purpose computers in the number of the applications , manufacturing industry, process control, communications , equipment, instruments , automobiles , ships , aviation, aerospace , military equipment, and consumer products are all the application field of the embedded
8、 computer USER INTERFACE BASED ON EMBEDDED LINUX 基于嵌入式Linux的用户界面A. Embedded operation systA.嵌入式作业系统 Embedded system has user-oriented, product-oriented, application-oriented features Different from general purpose computers , embedded system is a special嵌入式系统以用户为导向,以产品为导向,以应用为导向,功能不同于一般通用计算机,嵌入式系统是一
9、个特殊的针对特定应用系统,一般其对成本敏感,对其硬件和软件必须有效地设计,量身定制,去除冗余。一个很好的嵌入式系统是最小的系统来完成的预定目标。在嵌入式系统开发过程中,嵌入式软件是实现多种系统功能的关键,也是计算机技术最活跃的研究方向之一。system for specific applications , generally is cost-sensitive , and its hardware and software must be efficiently designed, tailored to remove redundancy A good embedded system is
10、 the minimum system to complete the target functions 在一般情况下,嵌入式系统由硬件和软件两个主要部分组成,硬件部分包括处理器/微处理器,存储器,外围设备的I/O端口,图形控制器等嵌入式系统。与一般的计算机处理系统不同,它不具有大容量硬盘作为存储介质,而用最普遍使用的EPROM,EEPROM,或闪存作为存储介质。软件部分包括操作系统软件,该软件需要实时和多任务操作,并可对应用程序编程。操作系统控制着应用程序与硬件交互,以及应用程序控制系统的操作和行为。B GUI overviB.图形用户界面概述 The operating system co
11、ntrols the application programming and hardware interaction, and the application controls the system operation and behaviors The broad popularity is one of the major achievements of current computer technology , which greatly facilitates the use of non-professional users , and people no longer needs
12、 to cram a lot of commands but can easily operate through t广泛普及是目前的计算机技术极大地方便了非专业用户使用的主要成就之一,人们不再需要死记硬背大量的命令,但可以很容易地通过操作窗口和菜单对计算机进行操作。window and menu GUI系统通常由三个基本层次是显示模式,窗口模式和用户模式,用户模型,包含显示器的主要特点和互动,从而长期的GUI有时仅是指用户模型。图1是GUI系统的层次结构。 Desktop management system 桌面管理系统User model 用户模型Window model 窗口模型Oper
13、ating system 操作系统Hardware 硬件Figure 1. 图1. GUI system hierarchy structure GUI系统的层次结构The bottom is the computer hardware platform, the above of which is the computer operating system The above of the operating system is the GUI display model which 底部是上述操作系统的计算机硬件平台,上面的是计算机操作系统,是GUI显示模式,用以确定屏幕上的图形显示模式。
14、不同的图形用户界面系统使用不同的显示模式。以上显示模式is the window model of the GUI system which is to determine how to display the window on the screen how to change the size , how to move and the level relationship是窗口GUI系统模型。这是决定如何显示在屏幕上的窗口,如何改变大小,如何移动和水平的关系between the windows It usually consists of two parts : first is th
15、e programming tool , and the second is the how to move output and read the description of the screen information Because X window not only requires how to display 之间的窗口,它通常由两部分组成:首先是编程工具,第二个是如何输出和阅读对屏幕上的信息的描述,因为X窗口不仅要求如何显示基本图形对象,也提供了如何显示窗口,所以它不仅可以是一个图形用户界面显示模式,而且还可以是窗口模式 。 The top of the window mode
16、l is the user model which is also known as graphical user interface sense It includes two parts : one is the user interface tool ; the other is the description of how to organize the various graphical objects窗口模型的顶部是用户模式,这也被称为图形用户界面,它包括两部分:一种是用户界面的工具,另一个是对如何在屏幕上组织各种图形对象和和on the screen,and how to car
17、ry out interaction between these objects 如何开展这些对象之间的互动的描述。 EMBEDDED GUI SYSTEM DESIGN . 嵌入式GUI系统的设计A. System architecture A.系统架构 Embedded GUI system uses hierarchical design, the architecture as shown in figure 2 嵌入式GUI系统采用分层设计,其体系结构如图2所示。应用程序编程接口Core 核心I/O interface I / O接口Figure 2. 图2. Embedded GU
18、I hierarchical structure 嵌入式GUI的层次结构API is to provide the application programming interface functions for various GUI objects(such as windows, menus, etc ) API是应用程序编程接口,提供各种GUI对象(如窗口,菜单等)。 Core is to provide centric graphical operation functions , such as message mechanism , graphics device interfac
19、e , fonts , window and desktop management capabilities The particular partition of the centric graphical operation layer,核心是提供中心的图形操作功能,如消息机制,图形设备接口,字体,窗口和桌面管理功能,中心的图形操作层的核心模块的特定分区如图3所示。Core module is shown as in figure 3 控制库图形资源核心机制模块LALGAL初始化桌面子模块驱动模块定时器图 3中心的图形操作层结构LAL and GAL is separately the h
20、ardware device input abstraction layer and the graphics output abstraction layer , which are connected with the underlying input-output device to facilitate the GUI to connect different input and outpLAL和GAL是单独的硬件设备输入抽象层和图形输出抽象层,这是基本输入输出设备,以方便GUI连接到不同的输入和输出devices , to achieve good portability and v
21、ersatility of the GUI system 设备,以达到良好的可移植性和GUI系统的多功能性。B. Core mechanism design and implementatB.核心机制的设计和实施 The core mechanism module is the most important component of the embedded GUI system, including message and event-driven mechanism , desktop operations pre-defined stack, initialization, and ti
22、mer operation several sub-modules , the follows will briefly introduce the functions of several sub-module核心机制模块是嵌入式GUI系统的最重要组成部分,包括消息和事件驱动机制,桌面操作预先定义的堆栈,初始化,定时器操作等几个子模块,以下将简要介绍这几个子功能模块。 C Message and event-driven mechanism sub-moduC消息和事件驱动机制的子模块 This sub-module is mainly responsible far message rec
23、eiving, distribution and routing operations 该子模块主要负责消息接收,分配和路由操作。1) Message queue initialization: considering the defects of the multi-message queue GUI system in system overhead and resource consumption, and there are usually very little interaction between the graphical user interface and real-tim
24、e control tasks in a embedded system, so the GUI in this paper is a single message queue architecture The GUI system will initialize the message queue when beginning running to make it in a normal work state 1)消息队列初始化:考虑到多消息队列GUI系统开销和资源消耗的系统缺陷,通常有很少的互动关系的图形用户界面和实时控制任务,因此GUI本是一个单一的消息队列架构。当运行在正常工作状态时,
25、GUI系统将初始化消息队列 。 2) Message cycle: when the windows, controls the application created have been completely displayed on the screen, to enter the message loop waiting for input events, and the message cycle flow as shown in figure 2)消息循环:当控制应用程序窗口和控件创建已经完全显示在屏幕上,进入消息循环,等待输入事件,消息循环流如图4所示。 获取信息信息类型识别消息数
26、据分析消息数据分布是否输出消息结束是否图 4 消息循环流程图3) Message distribution: after the messages removed from the message queue, they will be distributed to the corresponding window or control, to be responded by their 3)消息分布:从消息队列中删除消息后,他们将被分配到相应的窗口或控件,被他们消息处理函数响应。message processing function D. Desketop sub-moduD. Deskto
27、p子模块 Desktop is a very important part of the GUT system, which is equivalent to a bottom window , all the main windows are covered On it, also it preserves many global桌面是非常重要的图形用户界面系统的一部分,这相当于一个底部窗口,它涵盖了所有主要的窗口,也保留了许多全球业务在GUI中,如输入消息的分布;增加影响的主要窗口的处理。此外,显示,删除,移动和其他对环境的业务,并完成相应的映射操作,通过分布的PAINT的相关消息,调用窗
28、口模块或GUI模块的功能 。l) Window addition: when the user creating a main window in the calling system API, in addition to setting its own character attribute value, also the related system information will be changed, for example, there is overlapping relationship between the new main window and the existing
29、 main window, which will be related to the operation of the Z order list: and the new added main window will lead to the change of the existing main window cut information 1)窗口添加:除了设定自己的属性值,当用户在调用系统API创建一个主窗口时,相关系统的信息也将被改变,例如:新的主窗口和现有的主窗口之间有重叠的关系,这将关系到Z序列表的操作:新增加的主窗口将导致现有的主要窗口削减信息的变化。operations in t
30、he GUI such as the distribution of input messages ; processing the impact of the main window addition, display , deletion, movement and other operations on the environment, and the completion of the corresponding mapping operations through the distribution of the PAINT related news, calling the wind
31、ow module or GDI module functions 2) Window deletion: in the GUI, it is often needed to delete a main window, for example, the dialog is occurred in the form of main window, so when it will be closed it should be deleted and users may have to independently remove a main window The window module prov
32、ides the function to delete the window through system calling, and ultimately sends MEG_REMOVEMAINWIN message to the desktop 2)窗口删除:在GUI中它往往需要删除一个主窗口,例如,对话框在主窗口的形式出现,所以它将被关闭,它应该被删除,用户可能有独立删除一个主窗口。窗口模块提供的功能来删除通过系统调用的窗口,到桌面最终发送MEG_REMOVEMAINWIN的消息。 To move a main window to the top laver it needs to di
33、splay the part originally covered by other windows, and then update the impact of the movement on other window 若要移动主要窗口到顶端。需要显示其他窗口被遮住的部分,然后更新目标窗口的移动对其他窗口的影响以及系统变量 。 and system variables 3) Window display: window module provides system call a GUI window show function, when setting its command parame
34、ter is SW_SHOW, a window orig3)窗口显示:窗口模块提供系统调用GUI窗口显示功能,其命令参数设置初始值是SW_SHOW时,窗口显示为无法看到。For the main window, it actually is to send a MSG_SHOWMAINWIN message to the desktop 对于主窗口,它实际上是发送MSG_SHOWMAINWIN消息到桌面。 4) Window movement: one of the basic requirements of the GUI system is that the window can be
35、dragged so the window module provides a system call a GUI window sh4)窗口移动:GUI系统的基本要求之一是可以拖动窗口,为窗口模块提供了一个系统调用GUI窗口显示函数来完成这个功能,和发送MSG_SHOWMAINWIN消息could not see can be displayed.到桌面。function to complete this function, and send MSG_SHOWMAINWIN message to the desktoE. Initialization on sub-modulE.子模块的初始
36、化 It is a basic GUI system module , and the beginning of each GUI operation will carry out set and initialization operations for the entire GUI environment parameters through the API function of this module 这是一个基本的GUI系统模块,每个GUI操作的开始均是通过这个模块的API函数开展整个GUI环境参数的设置和初始化操作。 Initialization module only provi
37、des an overall GUI initialization function and a clearance function when terminating the GUI, thus the GUI entrance function 当要终止GUI时,初始化模块只提供了一个整体的GUI初始化函数和清除功能,initialize the various pans of the GUI through calling a GUI initialization function to make the GUI work normally The clearance function
38、of GUI termination is responsible for the completion of all relevant clearance work in the termination因此界面的入口函数可以通过调用GUI初始化函数初始化GUI的各种操作,使GUI正常工作。清除功能的GUI终止是负责在终止所有相关的清理工作完成of the GUI.GUI功能的。 F. Timer sub-modulF.定时器子模块 Timer is a very important component of the GUI When users need to timely process
39、a certain operation it will be used, and also used in the system Users must first set the timer before using it, and it in TJMER module i5 expressed by the data structure TIMER, Timer limit value refers to that when the recording value of the timer greater than it it will send a MSGTIMER message to
40、the window the tim定时器是一个GUI的非常重要的组成部分,当用户需要及时处理时将使用它,并在系统中使用一定的操作。用户在使用它之前必须先设置定时器,它由在TJMER模块表示数据结构定时器,定时器限值涉及到记录定时器时比它更大值,它将发送一个MSGTIMER消息给所属窗口的计时器。G. System performance testinG.系统性能测试 This paper only tests the event driven response speed, the results as shown in table 1 and table 2 本文仅测试事件-驱动响应速度,
41、结果如表1和表2所示。1 ABLE 1 WINDOWS EVENT RESPONSE SPEED 表. Windows事件响应速度测试事件创建频率(/s)销毁频率(/s)滚动频率(/s)翻新频率(/s)单色2.93.02.83.1彩色4.53.54.64.3tABLE CONTROL EVENT RESPONSE SPEED 表. 控制事件响应速度T 哦竹曩吐 CIick Textset Refurbishmemt 测试事件点击频率(/s)文本集频率(/s)翻新频率(/s)单色3.02.92.8彩色4.64.64.3From the above it can be seen, compared
42、 with other embedded GUI systems , this system has better portability , preparation and customization, and the system resource consumption is fewer 从上面可以看出,与其他嵌入式GUI系统相比,该系统具有更好的可移植性,准备和可裁剪性,系统资源消耗少。 IV CONCLUSION. 结论At present, the study of the embedded Linux system is booming , and has occupied a
43、lot of market share , but the GUI system based on embedded Linux system is in the目前,嵌入式Linux系统的研究正在蓬勃发展,已经占据了很大的市场份额,但在基于嵌入式Linux系统的GUI系统的发展阶段,有许多重要问题有待解决。This paper designed an embedded Linux-based graphical user interface design, and implemented it The test results and analysis show that compared
44、with other embedded GUI systems this system has better portability , preparation mad customization, and the system resource consumption is fewer, has a certain reference value for the development of similar software 本文设计了一个嵌入式的基于Linux的图形用户界面,并实现了它。它的测试结果和分析表明,与其他嵌入式GUI系统相比,该系统具有更好的可移植性,准备和定制,系统资源消耗少
45、,对于相关软件的发展有一定的参考价值。 REFERENCES 参考 1 Keith Haviland, Dina Gray , Ben Salama Unix System Programmin1.基思.哈维兰,迪娜灰色,本萨拉马Unix系统编程。 (2nd Edition)Addison Wesley , 2004 : 321-323 (第二版)艾迪 韦斯利,2004:321-323。2 Michail A Browsing and searching source code of applications written using a GUI framework, Software En
46、gineering , 2002 , ICSE2002 , Proceedings of the 24th International Conference , 2002 , 327-337 2.米哈伊尔,使用一个GUI框架浏览和搜索编写的应用程序的源代码,软件工程,2002年, ICSE2002,第24届国际大会,2002年,327-337。3 Pusty Russell , Daniel Quinlan Cipher Yeoh Filesystem Hierarchy Standard v2 3 Filesystem Hierarchy Standard Group , 2004 55-5
47、6 3.罗素,丹尼尔昆兰密码博士。文件系统层次标准V2.3,文件系统层次标准集团,2004年 55-56。4 Kjell,B , The rise of embedded processing and the opportunity for open standards J , IEEE Technology and Society Magazine , summer 2004.23(2) : 4-5 4.谢尔,乙,嵌入式处理的崛起和开放标准的机会J IEEE技术与社会“杂志,2004.23(2) 夏季:4-5。5 Giannopoulos Nikos , Roy Rajkumar , Taratoukhine Victor, et al.5.尼科斯罗伊费道宜,维克多等。 Embedded systems software cost estimating with the concurrent Engineering environment