mtk的MMI架构开发指导

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

ManMachineInterface2Agenda™MTKSoftwareArchitecture™MTKMMIArchitecture™ExampletoWriteanApplication™ThirdPartySoftware™Tool™Q&AMTKSoftwareArchitecture4MTKSoftwareArchitecture™SoftwareArchitecture™KALandOSL™DateType™TaskManagement5SoftwareArchitecture6SoftwareArchitecture–abbreviations„RMI:RemoteMMI,i.e.,PCside,whichusesATcommandstocommunicatewithProtocolstack.„L4:TheadaptationlayerbetweenMMI/ATandprotocolstack.„L4A:Layer4Adaptationtotranslateprimitivessentfromupperlayerstofunctioncalls.„L4C:Layer4Controller,coordinatesallL4modulestoserveupperlayers.„ATCI:ATCommandInterpreter.„UEM:UserEquipmentsmoduleusedtoabstractbasicdevicedriverslikekeypad,LED,GPIO.„PHB:PhoneBookmanagement.„SMU:SecurityManagement(SIM,STK).„CSM:CallServiceManagement(bearercapabilityhandling,CSD/FAXservice,CC,SS).„RAC:RegistrationAccessControl(GSM/GPRSregistrationmanagement,PLMNlist/selection,RSSIreport)„SMSAL:SMSApplicationLayer(messagestorage,MO/MTmessages,CB).„TCM:TerminalContextManagement(PDPcontextprofiles,contextactivate/deactivate,relayofpacketdata),interfacetoPPP/TCPIP/SNDCP.„ENG:EngineerModetologinformation.7KAL(KernelAbstractionLayer)TargetRealTimeOperatingSystemGSMHandsetSoftwareGSMHandsetSoftwareKernelAbstractionLayer(KAL)TargetRealTimeOperatingSystemXXTest/DebugFacilities™Portability™Commondesignphilosophy™Test/Debugfacilities™Easiercodeintegration8KALServicesKALServicesTest/Logging/SimulationfacilitiesExceptionhandlingResource/MemorymanagementTaskmanagement/communication/synchronizationTimerControlTask-ATask-B™Reference:™KAL_ProgrammingGuide_20041005.pdf™SystemServiceUserManual_20050527.pdf9OSLNucleus,orotherRTOSKALOSLPCsimulator–simulatetheOSLservicesonWin32tofacilitatedevelopmentanddebuggingMMItaskonPC.N.B.toensureallprogramswithinMMItaskcanruncorrectlyonPC,useofOSLAPIsisMUST.10DataTypesGeneraldatatypes:ƒKal_non_specific_general_types.hKALspecificdatatypesandfunctions’prototypes:ƒKal_release.hOSLspecificdatatypesusedwithinMMITasks:ƒPixtelDataTypes.h11TaskManagement&Identificationmodule_typeandtask_indx_typeƒDefinedin“Stack_config.h”ƒUsedtodefineindexofallmodulesandalltasksmod_task_g[RPS_TOTAL_STACK_MODULES]ƒDefinedin“syscomp_config.c”ƒUsedtomapMODULE-IDtoTASK-IDsys_comp_config_tbl[RPS_TOTAL_STACK_TASKS+1]ƒDefinedin“syscomp_config.c”ƒUsedtodefineinformationofalltasks,e.g.,task’sname,taskqueue’sname,priority,sizeofexternal/internalqueue,taskcreationfunction,whethertouseinternalram.custom_comp_config_tbl[MAX_CUSTOM_TASKS]ƒUsedforcustomerdefinedmodulesortasks.task_info_g[RPS_TOTAL_STACK_TASKS+1]ƒGlobalarraycontainingcomponenttaskinformation,whichwillbefilledinwhilecallingstack_init_comp_info().module_info_g[MAX_MULTIMOD_TASK_NUM]ƒGlobalarraycontainingcomponenttaskinformation,whichwillbefilledinwhilecallingstack_init_module_info().12TaskRoutines13TaskCommunicationApp_ltlcom.hDatastructureofmassageusedforinter-layercommunicationApp_ltlcom.hDatastructureofmassageusedforinter-layercommunicationStack_ltlcom.hMacroandAPIusedtosend/freemessagesStack_ltlcom.hMacroandAPIusedtosend/freemessages14TaskCommunication–example1Toallocatememoryfromsharedmemorypool.Ctrl_buff_pool.hDefinesizeandnumberofcontrolbuffer(memorypool)Toallocatememoryfromsharedmemorypool.Ctrl_buff_pool.hDefinesizeandnumberofcontrolbuffer(memorypool)Toinitializespecificmodule’sparameterpointerandpeerbufferpointerbeforeuseit.(module_ilm_g[module_id])Toinitializespecificmodule’sparameterpointerandpeerbufferpointerbeforeuseit.(module_ilm_g[module_id])SendmessagetoothertaskSendmessagetoothertask15TaskCommunication–example2ToreceivemessagefromexternalqueueToreceivemessagefromexternalqueueToreceivemessagefrominternalqueueToreceivemessagefrominternalqueueQueueGprot.hUsageofOSLsend/receiveinternal/externalmsg.QueueGprot.hUsageofOSLsend/receiveinternal/externalmsg.MTKMMIArchitecture17MTKMMIArchitecture™MMITaskstructure™MMIandL4Communication™MMIArchitecture¾FrameworkProvidesOSabstractionEventHandlersHistoryManagerNVRAMAccessFileSystemManagement¾UI,Resource™MMIDirectories18Taskstructure„Taskstruct(sys_comp_config_tbl):typedefstruct{kal_char*comp_name_ptr;kal_char*comp_qname_ptr;kal_uint32comp_priority;//3-255kal_uint16comp_stack_size;kal_uint8comp_ext_qsize;kal_uint8comp_int_qsize;kal_create_func_ptrcomp_create_func;kal_boolcomp_internal_ram_stack;}comptask_info_struct;KAL_FALSEmmi_create100304096TASK_PRIORITY_MMI“MMIQ”MMIMMITask19Layer4AdapterExample:MOD_MMI---MOD_L4Cmmi_frm_sms_send_message()PRT_MSG_ID_MMI_SMS_SEND_MSG_REQ---------------------------------L4a_callback.cl4a_recv_msg_ft[MSG_ID_MMI_MESSAGE_SUM]_call_MSG_ID_MMI_SMS_SEND_MSG_REQ_()---------------------------------MOD_L4C---MOD_SMSALl4c_sms_exe_post_msg_req()MSG_ID_L4CSMSAL_SEND_REQ20MMIandL4Communication(1/3)„HowToCommunicate„Send/ReceivemessagesthruthemessageQueue.#defineOslMsgSendExtQueuemsg_send_ext_queue#defineOslReceiveMsgExtQreceive_msg_ext_qSetProtocolEventHandler(FuncCB,msg_id);„CommunicationDatatypedefstructilm_struct{oslModuleTypeoslSrcId;//SourcemoduleID.oslModuleTypeoslDestId;//DestinationmoduleID.oslMsgTypeo

1 / 73
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功