




已阅读5页,还剩8页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
英文原文ResearchandImplementationofEmbeddedGraphicUserInterfaceBasedonLinuxLiuYijun,ChenWenbin,HeXiaomanComputerScienceCollege,SouthwestPetroleumUniversityhexiaoman_2008163com.INTRODUCTIONWiththedevelopmentofcomputertechnology,embeddedsystemhasbecomeanimportantpartofthecomputerfieldTheso-calledembeddedsystem,thatis,aspecialcomputersystemwithapplicationascenter,computertechnologyasthebasis,softwareandhardwarecanbetailoredtomeettheapplicationSystemstrictrequirementsforfunctionality,reliability,cost,size,andpowerconsumptionEmbeddedcomputerfarexceedsavarietyofgeneral-purposecomputersinthenumberoftheapplications,manufacturingindustry,processcontrol,communications,equipment,instruments,automobiles,ships,aviation,aerospace,militaryequipment,andconsumerproductsarealltheapplicationfieldoftheembeddedcomputerUSERINTERFACEBASEDONEMBEDDEDLINUXA.EmbeddedoperationsystemEmbeddedsystemhasuser-oriented,product-oriented,application-orientedfeaturesDifferentfromgeneralpurposecomputers,embeddedsystemisaspecialsystemforspecificapplications,generallyiscost-sensitive,anditshardwareandsoftwaremustbeefficientlydesigned,tailoredtoremoveredundancyAgoodembeddedsystemistheminimumsystemtocompletethetargetfunctionsInembeddedsystemdevelopment,embeddedsoftwareisthekeytoachieveavarietyofsystemfunctions,alsooneofthemostactiveresearchdirectionsofcomputertechnologyIngeneral,embeddedsystemconsistsofhardwareandsoftwaretwomajorcomponentsThehardwarepartincludesprocessorsmicroprocessors,memory,peripheraldevices,I0ports,graphicscontrollerandsoonEmbeddedsystemisdifferentfromthegeneralcomputerprocessingsystems,whichdoesnothavealarge-capacitystoragemediumasharddrivebutmostuseEPROM,EEPROMorflashmemoryasstoragemediumThesoftwarepartincludesoperatingsystemsoftwarewhichneedsreal-timeandmultitaskingoperations,andtheapplicationprogrammingTheoperatingsystemcontrolstheapplicationprogrammingandhardwareinteraction,andtheapplicationcontrolsthesystemoperationandbehaviorsBGUIoverviewThebroadpopularityisoneofthemajorachievementsofcurrentcomputertechnology,whichgreatlyfacilitatestheuseofnon-professionalusers,andpeoplenolongerneedstocramalotofcommandsbutcaneasilyoperatethroughthewindowandmenuAGUIsystemisusuallycomposedbythreebasiclevelswhicharedisplaymodel,windowmodelandusermodelUsermodelcontainsthemainfeaturesofdisplayandinteraction,thusthetermofGUIsometimesonlyreferstotheusermodelFigure1istheGUIsystemhierarchystructure.DesktopmanagementsystemUsermodelWindowmodelOperatingsystemHardwareFigure1.GUIsystemhierarchystructureThebottomisthecomputerhardwareplatform,theaboveofwhichisthecomputeroperatingsystemTheaboveoftheoperatingsystemistheGUIdisplaymodelwhichdeterminesthebasicdisplaymodeofthegraphicsonthescreenDifferentgraphicaluserinterfacesystemsusedifferentdisplaymodelsTheaboveofthedisplaymodelisthewindowmodeloftheGUIsystemwhichistodeterminehowtodisplaythewindowonthescreen,howtochangethesize,howtomoveandthelevelrelationshipbetweenthewindowsItusuallyconsistsoftwoparts:firstistheprogrammingtool,andthesecondisthehowtomoveoutputandreadthedescriptionofthescreeninformation.BecauseXwindownotonlyrequireshowtodisplaybasicgraphicsobjects,butalsoprovideshowtodisplaythewindow,soitcannotonlybeagraphicaluserinterfacedisplaymodel,butalsocanbeawindowmodelThetopofthewindowmodelistheusermodelwhichisalsoknownasgraphicaluserinterfacesenseItincludestwoparts:oneistheuserinterfacetool;theotheristhedescriptionofhowtoorganizethevariousgraphicalobjectsonthescreen,andhowtocarryoutinteractionbetweentheseobjectsEMBEDDEDGUISYSTEMDESIGNA.SystemarchitectureEmbeddedGUIsystemuseshierarchicaldesign,thearchitectureasshowninfigure2APICoreI/OinterfaceFigure2.EmbeddedGUIhierarchicalstructureAPIistoprovidetheapplicationprogramminginterfacefunctionsforvariousGUIobjects(suchaswindows,menus,etc)Coreistoprovidecentricgraphicaloperationfunctions,suchasmessagemechanism,graphicsdeviceinterface,fonts,windowanddesktopmanagementcapabilitiesTheparticularpartitionofthecentricgraphicaloperationlayerCoremoduleisshownasinfigureFigure3CentricgraphicaloperationlayerstructureLALandGALisseparatelythehardwaredeviceinputabstractionlayerandthegraphicsoutputabstractionlayer,whichareconnectedwiththeunderlyinginput-outputdevicetofacilitatetheGUItoconnectdifferentinputandoutputdevices,toachievegoodportabilityandversatilityoftheGUIsystemB.CoremechanismdesignandimplementationThecoremechanismmoduleisthemostimportantcomponentoftheembeddedGUIsystem,includingmessageandevent-drivenmechanism,desktopoperationspre-definedstack,initialization,andtimeroperationseveralsub-modules,thefollowswillbrieflyintroducethefunctionsofseveralsub-modules.CMessageandevent-drivenmechanismsub-moduleThissub-moduleismainlyresponsibleformessagereceiving,distributionandroutingoperationsControllibraryGraphicresourcesCoremechanismmoduleLALGALInitializationDesktopsub-moduleDrivingmoduleTimer1)Messagequeueinitialization:consideringthedefectsofthemulti-messagequeueGUIsysteminsystemoverheadandresourceconsumption,andthereareusuallyverylittleinteractionbetweenthegraphicaluserinterfaceandreal-timecontroltasksinaembeddedsystem,sotheGUIinthispaperisasinglemessagequeuearchitectureTheGUIsystemwillinitializethemessagequeuewhenbeginningrunningtomakeitinanormalworkstate2)Messagecycle:whenthewindows,controlstheapplicationcreatedhavebeencompletelydisplayedonthescreen,toenterthemessageloopwaitingforinputevents,andthemessagecycleflowasshowninfigure4.Figure4messagecycleflowchart3)Messagedistribution:afterthemessagesremovedfromthemessagequeue,theywillbedistributedtothecorrespondingwindoworcontrol,toberespondedbytheirmessageprocessingfunctionObtainmessageMessagetypediscriminationMessagedataanalysisMessagedatadistributionWhetherthemessageoutENDYND.Desktopsub-moduleDesktopisaveryimportantpartoftheGUIsystem,whichisequivalenttoabottomwindow,allthemainwindowsarecoveredonit,alsoitpreservesmanyglobaloperationsintheGUI,suchasthedistributionofinputmessages;processingtheimpactofthemainwindowaddition,display,deletion,movementandotheroperationsontheenvironment,andthecompletionofthecorrespondingmappingoperationsthroughthedistributionofthePAINTrelatednews,callingthewindowmoduleorGUImodulefunctionsl)Windowaddition:whentheusercreatingamainwindowinthecallingsystemAPI,inadditiontosettingitsowncharacterattributevalue,alsotherelatedsysteminformationwillbechanged,forexample,thereisoverlappingrelationshipbetweenthenewmainwindowandtheexistingmainwindow,whichwillberelatedtotheoperationoftheZorderlist:andthenewaddedmainwindowwillleadtothechangeoftheexistingmainwindowcutinformation2)Windowdeletion:intheGUI,itisoftenneededtodeleteamainwindow,forexample,thedialogisoccurredintheformofmainwindow,sowhenitwillbecloseditshouldbedeletedandusersmayhavetoindependentlyremoveamainwindowThewindowmoduleprovidesthefunctiontodeletethewindowthroughsystemcalling,andultimatelysendsMEG_REMOVEMAINWINmessagetothedesktopTomoveamainwindowtothetoplaveritneedstodisplaythepartoriginallycoveredbyotherwindows,andthenupdatetheimpactofthemovementonotherwindowsandsystemvariables3)Windowdisplay:windowmoduleprovidessystemcallaGUIwindowshowfunction,whensettingitscommandparameterisSW_SHOW,awindoworiginallycouldnotseecanbedisplayed.Forthemainwindow,itactuallyistosendaMSG_SHOWMAINWINmessagetothedesktop4)Windowmovement:oneofthebasicrequirementsoftheGUIsystemisthatthewindowcanbedraggedsothewindowmoduleprovidesasystemcallaGUIwindowshowfunctiontocompletethisfunction,andsendMSG_SHOWMAINWINmessagetothedesktop.E.Initializationonsub-moduleItisabasicGUIsystemmodule,andthebeginningofeachGUIoperationwillcarryoutsetandinitializationoperationsfortheentireGUIenvironmentparametersthroughtheAPIfunctionofthismoduleInitializationmoduleonlyprovidesanoverallGUIinitializationfunctionandaclearancefunctionwhenterminatingtheGUI,thustheGUIentrancefunctioncaninitializethevariouspansoftheGUIthroughcallingaGUIinitializationfunction,tomaketheGUIworknormallyTheclearancefunctionofGUIterminationisresponsibleforthecompletionofallrelevantclearanceworkintheterminationoftheGUI.F.Timersub-moduleTimerisaveryimportantcomponentoftheGUIWhenusersneedtotimelyprocessacertainoperationitwillbeused,andalsousedinthesystemUsersmustfirstsetthetimerbeforeusingit,anditinTJMERmoduleisexpressedbythedatastructureTIMER,Timerlimitvaluereferstothatwhentherecordingvalueofthetimergreaterthanit,itwillsendaMSGTIMERmessagetothewindowthetimerbelongedtoG.SystemperformancetestingThispaperonlyteststheeventdrivenresponsespeed,theresultsasshownintable1andtable2TABLEWINDOWSEVENTRESPONSESPEEDTesteventCreationFrequency(/s)DestructionFrequency(/s)RollFrequency(/s)RefurbishmentFrequency(/s)Monochrome2.93.02.83.1Multicolor4.3TABLECONTROLEVENTRESPONSESPEEDTesteventClickFrequency(/s)TextsetFrequency(/s)RefurbishmentFrequency(/s)Monochrome3.02.92.8MulticolorFromtheaboveitcanbeseen,comparedwithotherembeddedGUIsystems,thissystemhasbetterportability,preparationandcustomization,andthesystemresourceconsumptionisfewerIVCONCLUSIONAtpresent,thestudyoftheembeddedLinuxsystemisbooming,andhasoccupiedalotofmarketshare,buttheGUIsystembasedonembeddedLinuxsystemisinthedevelopmentstage,therearemanycriticalissuestoberesolvedThispaperdesignedanembeddedLinux-basedgraphicaluserinterfacedesign,andimplementedit.ThetestresultsandanalysisshowthatcomparedwithotherembeddedGUIsystemsthissystemhasbetterportability,preparationandcustomization,andthesystemresourceconsumptionisfewer,hasacertainreferencevalueforthedevelopmentofsimilarsoftware中文翻译基于Linux的嵌入式图形用户界面的研究与实现刘毅军,陈文斌,何小曼西南石油大学计算机科学学院hexiaoman_2008163.com.引言随着计算机技术的发展,嵌入式系统已成为计算机领域的一个重要组成部分。所谓的嵌入式系统,是以应用为中心,以计算机技术为基础,软件和硬件可定制的,以满足应用系统的严格的专用计算机系统对功能,可靠性,成本,体积,功耗的要求。嵌入式计算机中的应用数量远远超过了各种通用计算机,制造工业,过程控制,通讯,设备,仪器仪表,汽车,船舶,航空,航空航天,军事装备,消费类产品都是嵌入式计算机的应用领域。基于嵌入式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所示。图3.图形操作层的核心模块LAL和GAL是单独的硬件设备输入抽象层和图形输出抽象层,这是基本输入输出设备,以方便GUI连接到不同的输入和输出设备,以达到良好的可移植性和GUI系统的多功能性。B.核心机制的设计和实施核心机制模块是嵌入式GUI系统的最重要组成部分,包括消息和事件驱动机制,桌面操作预先定义的堆栈,初始化,定时器操作等几个子模块,以下将简要介绍这几个子功能模块。C消息和事件驱动机制的子模块该子模块主要负责消息接收,分配和路由操作。1)消息队列初始化:考虑到多消息队列GUI系统开销和资源消耗的系统缺陷,通常有很少的互动关系的图形用户界面和实时控制任务,因此GUI本是一个单一的消息队列架构。当运行在正常工作状态时,GUI系统将初始化消息队列。2)消息循环:当控制应用程序窗口和控件创建已经完全显示在屏幕上,进入消息循环,等待输入事件,消息循环流如图4所示。控制库图形资源核心机制模块LALGAL初始化桌面子模块驱动模块定时器图4消息循环流程图3)消息分布:从消息队列中删除消息后,他们将被分配到相应的窗口或控件,被他们消息处理函数响应。D.Desktop子模块桌面是非常重要的图形用户界面系统的一部分,这相当于一个底部窗口,它涵盖了所有主要的窗口,也保留了许多全球业务在GUI中,如输入消息的分布;增加影响的主要窗口的处理。此外,显示,删除,移动和其他对环境的业务,并完成相应的
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 坡屋面挂瓦施工技术操作流程
- 市场调研报告编写范文与模板
- 企业导师带徒计划模板
- 五年级下册数学专项计算训练题
- 建筑工程装饰施工合同范例
- 小学美术剪纸手工创新课堂教学设计
- 2026年高考试题汇编物理专题09恒定电流(原卷版)
- 康复科护理考试题
- 起重机安全培训考试题
- 脑梗死护理考试题
- 工厂主管人员值班表
- 消防安全周巡查记录表
- 俱舍论原文内容
- 第三章 护理伦理学基本原则规范和范畴
- 能源化学与能源化工概论-第一章 能源简介
- GB/T 18742.3-2017冷热水用聚丙烯管道系统第3部分:管件
- FZ/T 52058-2021低熔点聚乳酸(LMPLA)/聚乳酸(PLA)复合短纤维
- 2023年华中师范大学研究生入学考试试题汉语言文字专业语言及应用语言学对外汉语教学专业试题
- 2021新教材高中历史第四单元资本主义制度的确立-教学课件-人教版历史纲要下
- 高中生职业生涯规划主题班会课件
- 土方清表方案
评论
0/150
提交评论