




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
密级分类号编号成绩本科生毕业设计(论文)外文翻译原文标题ResearchandImplementationofEmbeddedGraphicUserInterfaceBasedonLinux译文标题嵌入式图形界面系统的设计与实现作者所在系别计算机科学与工程作者所在专业计算机科学与技术作者所在班级******作者姓名******作者学号****指导教师姓名**指导教师职称**完成时间2021年2月北华航天工业学院教务处制译文标题嵌入式图形界面系统的设计与实现原文标题ResearchandImplementationofEmbeddedGraphicUserInterfaceBasedonLinux作者LiuYijun,ChenWenbin,HeXiaoman译名刘毅军,陈文斌,何小曼国籍中国原文出处
会议记录基于Linux的嵌入式图形用户界面的研究与实现刘毅军,陈文斌,何小曼西南石油大学计算机科学学院hexiaoman_2021@163摘要:虽然在深入的研究Linux系统和嵌入式系统的图形用户界面〔GUI〕,本文设计了一种基于Linux的嵌入式GUI,并将之实现。测试分析说明,研究成果和描述的设计思路和方法是合理,可行的,对于类似软件的开发有一定的参考价值。关键词:Linux的嵌入式系统,图形用户界面Ⅰ.引言随着计算机技术的开展,嵌入式系统已成为计算机领域的一个重要组成局部。所谓的嵌入式系统,是以应用为中心,以计算机技术为根底,软件和硬件可定制的,以满足应用系统的严格的专用计算机系统对功能,可靠性,本钱,体积,功耗的要求。嵌入式计算机中的应用数量远远超过了各种通用计算机,制造工业,过程控制,通讯,设备,仪器仪表,汽车,船舶,航空,航空航天,军事装备,消费类产品都是嵌入式计算机的应用领域。Ⅱ基于嵌入式Linux的用户界面A.嵌入式作业系统嵌入式系统以用户为导向,以产品为导向,以应用为导向,功能不同于一般通用计算机,嵌入式系统是一个特殊的针对特定应用系统,一般其对本钱敏感,对其硬件和软件必须有效地设计,量身定制,去除冗余。一个很好的嵌入式系统是最小的系统来完成的预定目标。在嵌入式系统开发过程中,嵌入式软件是实现多种系统功能的关键,也是计算机技术最活泼的研究方向之一。在一般情况下,嵌入式系统由硬件和软件两个主要局部组成,硬件局部包括处理器/微处理器,存储器,外围设备的I/O端口,图形控制器等嵌入式系统。与一般的计算机处理系统不同,它不具有大容量硬盘作为存储介质,而用最普遍使用的EPROM,EEPROM,或闪存作为存储介质。软件局部包括操作系统软件,该软件需要实时和多任务操作,并可对应用程序编程。操作系统控制着应用程序与硬件交互,以及应用程序控制系统的操作和行为。B.图形用户界面概述广泛普及是目前的计算机技术极大地方便了非专业用户使用的主要成就之一,人们不再需要死记硬背大量的命令,但可以很容易地通过操作窗口和菜单对计算机进行操作。GUI系统通常由三个根本层次是显示模式,窗口模式和用户模式,用户模型,包含显示器的主要特点和互动,从而长期的GUI有时仅是指用户模型。图1是GUI系统的层次结构。桌面管理系统用户模型窗口模型操作系统硬件图1.GUI系统的层次结构底部是上述操作系统的计算机硬件平台,上面的是计算机操作系统,是GUI显示模式,用以确定屏幕上的图形显示模式。不同的图形用户界面系统使用不同的显示模式。以上显示模式是窗口GUI系统模型。这是决定如何显示在屏幕上的窗口,如何改变大小,如何移动和水平的关系之间的窗口,它通常由两局部组成:首先是编程工具,第二个是如何输出和阅读对屏幕上的信息的描述,因为X窗口不仅要求如何显示根本图形对象,也提供了如何显示窗口,所以它不仅可以是一个图形用户界面显示模式,而且还可以是窗口模式。窗口模型的顶部是用户模式,这也被称为图形用户界面,它包括两局部:一种是用户界面的工具,另一个是对如何在屏幕上组织各种图形对象和如何开展这些对象之间的互动的描述。Ⅲ.嵌入式GUI系统的设计A.系统架构嵌入式GUI系统采用分层设计,其体系结构如图2所示。应用程序编程接口核心I/O接口图2.嵌入式GUI的层次结构API是应用程序编程接口,提供各种GUI对象〔如窗口,菜单等〕。核心是提供中心的图形操作功能,如消息机制,图形设备接口,字体,窗口和桌面管理功能,中心的图形操作层的核心模块的特定分区如图3所示。控制库控制库图形资源核心机制模块LALGAL初始化桌面子模块驱动模块定时器图3.中心的图形操作层结构LAL和GAL是单独的硬件设备输入抽象层和图形输出抽象层,这是根本输入输出设备,以方便GUI连接到不同的输入和输出设备,以到达良好的可移植性和GUI系统的多功能性。B.核心机制的设计和实施核心机制模块是嵌入式GUI系统的最重要组成局部,包括消息和事件驱动机制,桌面操作预先定义的堆栈,初始化,定时器操作等几个子模块,以下将简要介绍这几个子功能模块。C消息和事件驱动机制的子模块该子模块主要负责消息接收,分配和路由操作。1〕消息队列初始化:考虑到多消息队列GUI系统开销和资源消耗的系统缺陷,通常有很少的互动关系的图形用户界面和实时控制任务,因此GUI本是一个单一的消息队列架构。当运行在正常工作状态时,GUI系统将初始化消息队列。2〕消息循环:当控制应用程序窗口和控件创立已经完全显示在屏幕上,进入消息循环,等待输入事件,消息循环流如图4所示。获取信息获取信息信息类型识别消息数据分析消息数据分布是否输出消息结束是否图4消息循环流程图3〕消息分布:从消息队列中删除消息后,他们将被分配到相应的窗口或控件,被他们消息处理函数响应。D.Desktop子模块桌面是非常重要的图形用户界面系统的一局部,这相当于一个底部窗口,它涵盖了所有主要的窗口,也保存了许多全球业务在GUI中,如输入消息的分布;增加影响的主要窗口的处理。此外,显示,删除,移动和其他对环境的业务,并完成相应的映射操作,通过分布的PAINT的相关消息,调用窗口模块或GUI模块的功能。1〕窗口添加:除了设定自己的属性值,当用户在调用系统API创立一个主窗口时,相关系统的信息也将被改变,例如:新的主窗口和现有的主窗口之间有重叠的关系,这将关系到Z序列表的操作:新增加的主窗口将导致现有的主要窗口削减信息的变化。2〕窗口删除:在GUI中它往往需要删除一个主窗口,例如,对话框在主窗口的形式出现,所以它将被关闭,它应该被删除,用户可能有独立删除一个主窗口。窗口模块提供的功能来删除通过系统调用的窗口,到桌面最终发送MEG_REMOVEMAINWIN的消息。假设要移动主要窗口到顶端。需要显示其他窗口被遮住的局部,然后更新目标窗口的移动对其他窗口的影响以及系统变量。3〕窗口显示:窗口模块提供系统调用GUI窗口显示功能,其命令参数设置初始值是SW_SHOW时,窗口显示为无法看到。对于主窗口,它实际上是发送MSG_SHOWMAINWIN消息到桌面。4〕窗口移动:GUI系统的根本要求之一是可以拖动窗口,为窗口模块提供了一个系统调用GUI窗口显示函数来完成这个功能,和发送MSG_SHOWMAINWIN消息到桌面。E.子模块的初始化这是一个根本的GUI系统模块,每个GUI操作的开始均是通过这个模块的API函数开展整个GUI环境参数的设置和初始化操作。当要终止GUI时,初始化模块只提供了一个整体的GUI初始化函数和去除功能,因此界面的入口函数可以通过调用GUI初始化函数初始化GUI的各种操作,使GUI正常工作。去除功能的GUI终止是负责在终止所有相关的清理工作完成GUI功能的。F.定时器子模块定时器是一个GUI的非常重要的组成局部,当用户需要及时处理时将使用它,并在系统中使用一定的操作。用户在使用它之前必须先设置定时器,它由在TJMER模块表示数据结构定时器,定时器限值涉及到记录定时器时比它更大值,它将发送一个MSGTIMER消息给所属窗口的计时器。G.系统性能测试本文仅测试事件-驱动响应速度,结果如表1和表2所示。表Ⅰ.Windows事件响应速度测试事件创立频率(/s)销毁频率(/s)滚动频率(/s)翻新频率(/s)单色2.93.02.83.1彩色4.3表Ⅱ.控制事件响应速度测试事件点击频率(/s)文本集频率(/s)翻新频率(/s)单色3.02.92.8彩色从上面可以看出,与其他嵌入式GUI系统相比,该系统具有更好的可移植性,准备和可裁剪性,系统资源消耗少。Ⅳ.结论目前,嵌入式Linux系统的研究正在蓬勃开展,已经占据了很大的市场份额,但在基于嵌入式Linux系统的GUI系统的开展阶段,有许多重要问题有待解决。本文设计了一个嵌入式的基于Linux的图形用户界面,并实现了它。它的测试结果和分析说明,与其他嵌入式GUI系统相比,该系统具有更好的可移植性,准备和定制,系统资源消耗少,对于相关软件的开展有一定的参考价值。参考[1].基思.哈维兰,迪娜灰色,本萨拉马Unix系统编程。〔第二版〕艾迪·韦斯利,2004:321-323。[2].米哈伊尔,使用一个GUI框架浏览和搜索编写的应用程序的源代码,软件工程,2002年,ICSE2002,第24届国际大会,2002年,327-337。[3].罗素,丹尼尔·昆兰密码博士。文件系统层次标准V2.3,文件系统层次标准集团,2004年55-56。[4].谢尔,乙,嵌入式处理的崛起和开放标准的时机[J]IEEE技术与社会“杂志,2004.23〔2〕夏季:4-5。[5].尼科斯·罗伊·费道宜,维克多等。嵌入式系统软件本钱估算与ISPE的第十届国际会议并行工程环境诉讼2003:353-357。[6].梅蒙AM,波拉克ME。层次的GUI测试用例生成使用自动化规划。软件工程汇刊,2001,2.V01.27,144.155。ResearchandImplementationofEmbeddedGraphicUserInterfaceBasedonLinuxLiuYijun,ChenWenbin,HeXiaomanComputerScienceCollege,SouthwestPetroleumUniversityhexiaoman_2021@163.comAbstract-thoughtheIn-depthresearchonLinuxsystemandembeddedsystemgraphicaluserinterface(GUI),thispaperdesignsanembeddedGUIbasedonLinuxandimplementsit.Thetestanalysisshowsthattheresearchresultsandthedescribeddesignideasandmethodsarereasonable,feasible,havecertainreferencevalueforsimilarsoftwaredevelopment.Keywords-Linux;embeddedsystem;GUIⅠ.INTRODUCTIONWiththedevelopmentofcomputertechnology,embeddedsystemhasbecomeanimportantpartofthecomputerfield.Theso-calledembeddedsystem,thatis,aspecialcomputersystemwithapplicationascenter,computertechnologyasthebasis,softwareandhardwarecanbetailoredtomeettheapplicationSystemstrictrequirementsforfunctionality,reliability,cost,size,andpowerconsumption.Embeddedcomputerfarexceedsavarietyofgeneral-purposecomputersinthenumberoftheapplications,manufacturingindustry,processcontrol,communications,equipment,instruments,automobiles,ships,aviation,aerospace,militaryequipment,andconsumerproductsarealltheapplicationfieldoftheembeddedcomputer.Ⅱ.USERINTERFACEBASEDONEMBEDDEDLINUXA.EmbeddedoperationsystemEmbeddedsystemhasuser-oriented,product-oriented,application-orientedfeatures.Differentfromgeneral—purposecomputers,embeddedsystemisaspecialsystemforspecificapplications,generallyiscost-sensitive,anditshardwareandsoftwaremustbeefficientlydesigned,tailoredtoremoveredundancy.Agoodembeddedsystemistheminimumsystemtocompletethetargetfunctions.Inembeddedsystemdevelopment,embeddedsoftwareisthekeytoachieveavarietyofsystemfunctions,alsooneofthemostactiveresearchdirectionsofcomputertechnology.Ingeneral,embeddedsystemconsistsofhardwareandsoftwaretwomajorcomponents.Thehardwarepartincludesprocessors/microprocessors,memory,peripheraldevices,I/0ports,graphicscontrollerandsoon.Embeddedsystemisdifferentfromthegeneralcomputerprocessingsystems,whichdoesnothavealarge-capacitystoragemediumasharddrive.butmostuseEPROM,EEPROM.orflashmemoryasstoragemedium.Thesoftwarepartincludesoperatingsystemsoftwarewhichneedsreal-timeandmultitaskingoperations,andtheapplicationprogramming.Theoperatingsystemcontrolstheapplicationprogrammingandhardwareinteraction,andtheapplicationcontrolsthesystemoperationandbehaviors.B.GUIoverviewThebroadpopularityisoneofthemajorachievementsofcurrentcomputertechnology,whichgreatlyfacilitatestheuseofnon-professionalusers,andpeoplenolongerneedstocramalotofcommands.butcaneasilyoperatethroughthewindowandmenu.AGUIsystemisusuallycomposedbythreebasiclevelswhicharedisplaymodel,windowmodelandusermodel.Usermodelcontainsthemainfeaturesofdisplayandinteraction,thusthetermofGUIsometimesonlyreferstotheusermodel.Figure1istheGUIsystemhierarchystructure.DesktopmanagementsystemUsermodelWindowmodelOperatingsystemHardwareFigure1.GUIsystemhierarchystructureThebottomisthecomputerhardwareplatform,theaboveofwhichisthecomputeroperatingsystem.TheaboveoftheoperatingsystemistheGUIdisplaymodelwhichdeterminesthebasicdisplaymodeofthegraphicsonthescreen.Differentgraphicaluserinterfacesystemsusedifferentdisplaymodels.TheaboveofthedisplaymodelisthewindowmodeloftheGUIsystem.whichistodeterminehowtodisplaythewindowonthescreen,howtochangethesize,howtomoveandthelevelrelationshipbetweenthewindows.Itusuallyconsistsoftwoparts:firstistheprogrammingtool,andthesecondisthehowtomoveoutputandreadthedescriptionofthescreeninformation.BecauseXwindownotonlyrequireshowtodisplaybasicgraphicsobjects,butalsoprovideshowtodisplaythewindow,soitcannotonlybeagraphicaluserinterfacedisplaymodel,butalsocanbeawindowmodel.Thetopofthewindowmodelistheusermodelwhichisalsoknownasgraphicaluserinterfacesense.Itincludestwoparts:oneistheuserinterfacetool;theotheristhedescriptionofhowtoorganizethevariousgraphicalobjectsonthescreen,andhowtocarryoutinteractionbetweentheseobjects.Ⅲ.EMBEDDEDGUISYSTEMDESIGNA.SystemarchitectureEmbeddedGUIsystemuseshierarchicaldesign,thearchitectureasshowninfigure2.APICoreI/OinterfaceFigure2.EmbeddedGUIhierarchicalstructureAPIistoprovidetheapplicationprogramminginterfacefunctionsforvariousGUIobjects(suchaswindows,menus,etc.).Coreistoprovidecentricgraphicaloperationfunctions,suchasmessagemechanism,graphicsdeviceinterface,fonts,windowanddesktopmanagementcapabilities.TheparticularpartitionofthecentricgraphicaloperationlayerCoremoduleisshownasinfigure3.ControllibraryControllibraryGraphicresourcesCoremechanismmoduleLALGALInitializationDesktopsub-moduleDrivingmoduleTimerFigure3.CentricgraphicaloperationlayerstructureLALandGALisseparatelythehardwaredeviceinputabstractionlayerandthegraphicsoutputabstractionlayer,whichareconnectedwiththeunderlyinginput-outputdevicetofacilitatetheGUItoconnectdifferentinputandoutputdevices,toachievegoodportabilityandversatilityoftheGUIsystem.B.CoremechanismdesignandimplementationThecoremechanismmoduleisthemostimportantcomponentoftheembeddedGUIsystem,includingmessageandevent-drivenmechanism,desktopoperationspre-definedstack,initialization,andtimeroperationseveralsub-modules,thefollowswillbrieflyintroducethefunctionsofseveralsub-modules.CMessageandevent-drivenmechanismsub-moduleThissub-moduleismainlyresponsibleformessagereceiving,distributionandroutingoperations.1)Messagequeueinitialization:consideringthedefectsofthemulti-messagequeueGUIsysteminsystemoverheadandresourceconsumption,andthereareusuallyverylittleinteractionbetweenthegraphicaluserinterfaceandreal-timecontroltasksinaembeddedsystem,sotheGUIinthispaperisasinglemessagequeuearchitecture.TheGUIsystemwillinitializethemessagequeuewhenbeginningrunningtomakeitinanormalworkstate.2)Messagecycle:whenthewindows,controlstheapplicationcreatedhavebeencompletelydisplayedonthescreen,toenterthemessageloopwaitingforinputevents,andthemessagecycleflowasshowninfigure4.ObtainmessageObtainmessageMessagetypediscriminationMessagedataanalysisMessagedatadistributionWhetherthemessageoutENDYNFigure4messagecycleflowchart3)Messagedistribution:afterthemessagesremovedfromthemessagequeue,theywillbedistributedtothecorrespondingwindoworcontrol,toberespondedbytheirmessageprocessingfunction.D.Desktopsub-moduleDesktopisaveryimportantpartoftheGUIsystem,whichisequivalenttoabottomwindow,allthemainwindowsarecoveredonit,alsoitpreservesmanyglobaloperationsintheGUI,suchasthedistributionofinputmessages;processingtheimpactofthemainwindowaddition,display,deletion,movementandotheroperationsontheenvironment,andthecompletionofthecorrespondingmappingoperationsthroughthedistributionofthePAINTrelatednews,callingthewindowmoduleorGUImodulefunctions.l)Windowaddition:whentheusercreatingamainwindowinthecallingsystemAPI,inadditiontosettingitsowncharacterattributevalue,alsotherelatedsysteminformationwillbechanged,forexample,thereisoverlappingrelationshipbetweenthenewmainwindowandtheexistingmainwindow,whichwillberelatedtotheoperationoftheZorderlist:andthenewaddedmainwindowwillleadtothechangeoftheexistingmainwindowcutinformation.2)Windowdeletion:intheGUI,itisoftenneededtodeleteamainwindow,forexample,thedialogisoccurredintheformofmainwindow,sowhenitwillbecloseditshouldbedeletedandusersmayhavetoindependentlyremoveamainwindow.Thewindowmoduleprovidesthefunctiontodeletethewindowthroughsystemcalling,andultimatelysendsMEG_REMOVEMAINWINmessagetothedesktop.Tomoveamainwindowtothetoplaver.itneedstodisplaythepartoriginallycoveredbyotherwindows,andthenupdatetheimpactofthemovementonotherwindowsandsystemvariables.3)Windowdisplay:windowmoduleprovidessystemcallaGUIwindowshowfunction,whensettingitscommandparameterisSW_SHOW,awindoworiginallycouldnotseecanbedisplayed.Forthemainwindow,itactuallyistosendaMSG_SHOWMAINWINmessagetothedesktop.4)Windowmovement:oneofthebasicrequirementsoftheGUIsystemisthatthewindowcanbedraggedsothewindowmoduleprovidesasystemcallaGUIwindowshowfunctiontocompletethisfunction,andsendMSG_SHOWMAINWINmessagetothedesktop.E.Initializationonsub-moduleItisabasicGUIsystemmodule,andthebeginningofeachGUIoperationwillcarryoutsetandinitializationoperationsfortheentireGUIenvironmentparametersthroughtheAPIfunctionofthismodule.InitializationmoduleonlyprovidesanoverallGUIinitializationfunctionandaclearancefunctionwhenterminatingtheGUI,thustheGUIentrancefunctioncaninitializethevariouspansoftheGUIthroughcallingaGUIinitializationfunction,tomaketheGUIworknormally.TheclearancefunctionofGUIterminationisresponsibleforthecompletionofallrelevantclearanceworkintheterminationoftheGUI.F.Timersub-moduleTimerisaveryimportantcomponentoftheGUI.Whenusersneedtotimelyprocessacertainoperationitwillbeused,andalsousedinthesystem.Usersmustfirstsetthetimerbeforeusingit,anditinTJMERmoduleisexpressedbythedatastructureTIMER,Timerlimitvaluereferstothatwhentherecordingvalueofthetimergreaterthanit,itwillsendaMSGTIMERmessagetothewindowthetimerbelongedto.G.SystemperformancetestingThispaperonlyteststheevent—drivenresponsespeed,theresultsasshownintable1andtable2.TABLEⅠ.WINDOWSEVENTRESPONSESPEEDTesteventCreationFrequency(/s)DestructionFrequency(/s)RollFrequency(/s)RefurbishmentFrequency(/s)Monochrome2.93.02.83.1Multicolor4.3TABLEⅡ.CONTROLEVENTRESPONSESPEEDTesteventClickFrequency(/s)TextsetFrequency(/s)RefurbishmentFrequency(/s)Monochrome3.02.92.8MulticolorFromtheaboveitcanbeseen,comparedwithotherembeddedGUIsystems,thissystemhasbetterportability,preparationandcustomization,andthesystemresourceconsumptionisfewer.IV.CONCLUSIONAtpresent,thestudyoftheembeddedLinuxsystemisbooming,andhasoccupiedalotofmarketshare,buttheGUIsystembasedonemb
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 燃气资金计划管理办法
- 物资采购期限管理办法
- 特殊工种施工管理办法
- 特殊疾病监护管理办法
- 特色访客门禁管理办法
- 独立院校设置管理办法
- 玉米收货时期管理办法
- 环保应急项目管理办法
- 环保集成项目管理办法
- 环境保护监督管理办法
- 产品经理绩效管理制度
- 2025年烟台市中考历史试卷真题(含答案)
- 2025四川产业振兴基金投资集团有限公司招聘12人笔试参考题库附带答案详解析集合
- 风湿免疫病患者结核病诊治及预防实践指南(2025版)解读课件
- 膜结构车棚安装合同协议
- 山东省2016年安装定额解释
- 2025-2030中国相变热界面材料行业市场现状供需分析及投资评估规划分析研究报告
- 《中华人民共和国公务员法概述》课件
- 华为公司财务报表分析案例
- 安徽省合肥市2025届高三下学期第二次教学质量检测 英语试题(含解析无听力音频有听力原文)
- 《分数乘法》(2课时)(教学设计)-2024-2025学年六年级上册数学苏教版
评论
0/150
提交评论