当前位置: 首页 > news >正文

网站速度优化 js加载关键词在线优化

网站速度优化 js加载,关键词在线优化,帮别做网站,制作短视频最好的软件目录 一、嵌入式中的映射表是什么? 二、映射表在串口数据解析中的应用 1. 数据结构 2. 指令、函数映射表 3. 串口解析函数实现 三、映射表在UI设计中的应用 1. 数据结构 2. 函数映射表 3. 定义两个变量保存当前场景和上一个场景 4. 按下Up按键 跳转到指定场…

目录

一、嵌入式中的映射表是什么?

二、映射表在串口数据解析中的应用

1. 数据结构

2. 指令、函数映射表

 3. 串口解析函数实现

三、映射表在UI设计中的应用

1. 数据结构

2. 函数映射表

3. 定义两个变量保存当前场景和上一个场景

4. 按下Up按键 跳转到指定场景current_stage的值根据映射表改变

5. 场景改变后 根据映射表执行相应的函数Handler

(* ̄︶ ̄)创作不易!期待你们的 点赞、收藏和评论喔。  


一、嵌入式中的映射表是什么?

在嵌入式系统开发中,映射表(Lookup table)是一种常见的数据结构,用于将输入值(通常是一个或多个离散的输入)映射到对应的输出值。它是一种预先计算和存储的数据表格,可以快速查找和获取对应的输出值,而无需进行复杂的计算。

映射表通常以数组或者哈希表的形式存储,其中输入值被用作索引或关键字,而与之对应的输出值存储在相应的位置上。当系统需要根据给定的输入值获取对应的输出时,只需通过查询映射表即可获得结果,无需进行繁琐的计算过程。

在嵌入式系统中,映射表常用于优化算法信号处理数据转换等场景。通过使用映射表,可以提高系统响应速度、降低功耗,并且减少代码的复杂性。

需要注意的是,映射表的设计和填充要根据具体应用场景来进行,确保映射表能够准确地满足系统需求,并且占用的内存空间不超过系统的限制。此外,在使用映射表时还需要考虑数据的精度以及表格的更新机制,以保证系统的准确性和可靠性。

 

二、映射表在串口数据解析中的应用

1. 数据结构

typedef struct 
{char CMD[CMDLen];unsigned char (*cmd_operate)(char *data);
}Usart_Tab;

2. 指令、函数映射表


static const Usart_Tab InstructionList[CMDMax]=
{{"PWON",PowOn},{"PWOFF",PowOff},{"HDCP",HdcpOnOff},{"/V",QueryKaVersion},{"EDIDUpgrade",UpdataEDID},{"Psave",Psave},{"Precall",Precall},{"Pclear",Pclear},
};

 3. 串口解析函数实现


unsigned char DataAnalysis(char *buf)
{unsigned char i,Result;char *NEXT=NULL;for(i=0;i<CMDMax;i++){NEXT=StrCmp(buf,(char*)InstructionList[i].CMD);if(NEXT!=NULL){usartfuncp=InstructionList[i].cmd_operate;Result=(*usartfuncp)(NEXT);}}return Result;
}

 

三、映射表在UI设计中的应用

1. 数据结构

typedef enum
{stage1=0,stage2,stage3,stage4,stage5,stage6,stage7,stage8,stage9,
}SCENE;

typedef struct {void (*current_operate)(); //当前场景的处理函数SCENE Index;               //当前场景的标签SCENE Up;                  //按下Up键跳转的场景SCENE Down;                //按下Down键跳转的场景SCENE Right;               //按下Left键跳转的场景SCENE Left;                //按下Right键跳转的场景
}STAGE_TAB;

2. 函数映射表


STAGE_TAB stage_tab[]={#.    operate       Index    Up     Down    Left   Right   {Stage1_Handler,  stage1,  stage4,  stage7,  stage3, stage2},{Stage2_Handler,  stage2,  stage5,  stage8,  stage1, stage3},{Stage3_Handler,  stage3,  stage6,  stage9,  stage2, stage1},{Stage4_Handler,  stage4,  stage7,  stage1,  stage6, stage5},{Stage5_Handler,  stage5,  stage8,  stage2, stage4,  stage6},{Stage6_Handler,  stage6,  stage9,  stage3, stage5,  stage4},{Stage7_Handler,  stage7,  stage1,  stage4, stage9,  stage8},{Stage8_Handler,  stage8,  stage2,  stage5, stage7,  stage9},{Stage9_Handler,  stage9,  stage3,  stage6, stage8,  stage7},
};

3. 定义两个变量保存当前场景和上一个场景

char current_stage=stage1;
char prev_stage=current_stage;

4. 按下Up按键 跳转到指定场景current_stage的值根据映射表改变


current_stage =stage_tab[current_stage].Up;

5. 场景改变后 根据映射表执行相应的函数Handler


if(current_stage!=prev_stage)
{stage_tab[current_stage].current_operate();prev_stage=current_stage;
}


(* ̄︶ ̄)创作不易!期待你们的 点赞收藏评论喔。  


文章转载自:
http://dinncowealthy.tqpr.cn
http://dinncoseatlh.tqpr.cn
http://dinncorepetiteur.tqpr.cn
http://dinnconosher.tqpr.cn
http://dinncocorrespondency.tqpr.cn
http://dinncoapodictic.tqpr.cn
http://dinncoisoetes.tqpr.cn
http://dinncoomphalotomy.tqpr.cn
http://dinncoplumbicon.tqpr.cn
http://dinncosimilize.tqpr.cn
http://dinncolaryngoscopical.tqpr.cn
http://dinnconiamey.tqpr.cn
http://dinncotellurian.tqpr.cn
http://dinncomercifully.tqpr.cn
http://dinncoinspirer.tqpr.cn
http://dinncoyou.tqpr.cn
http://dinncophotoengrave.tqpr.cn
http://dinncopausal.tqpr.cn
http://dinncosatisfying.tqpr.cn
http://dinncocaernarvonshire.tqpr.cn
http://dinncochasable.tqpr.cn
http://dinncocrispate.tqpr.cn
http://dinncoscutella.tqpr.cn
http://dinncothem.tqpr.cn
http://dinncoliman.tqpr.cn
http://dinncoberceau.tqpr.cn
http://dinncoeskimology.tqpr.cn
http://dinncofantastico.tqpr.cn
http://dinncoreadme.tqpr.cn
http://dinncocuttage.tqpr.cn
http://dinncoantinuclear.tqpr.cn
http://dinncosusannah.tqpr.cn
http://dinncooniomania.tqpr.cn
http://dinnconondistinctive.tqpr.cn
http://dinncotongued.tqpr.cn
http://dinncovictorian.tqpr.cn
http://dinncosecernent.tqpr.cn
http://dinncodeutoplasmic.tqpr.cn
http://dinncoeffluvial.tqpr.cn
http://dinncodriven.tqpr.cn
http://dinncosinify.tqpr.cn
http://dinncopondfish.tqpr.cn
http://dinncodipteral.tqpr.cn
http://dinncotrichiniasis.tqpr.cn
http://dinncosemidaily.tqpr.cn
http://dinncoamps.tqpr.cn
http://dinncokilohertz.tqpr.cn
http://dinncoswollen.tqpr.cn
http://dinncohypopraxia.tqpr.cn
http://dinncoytterbium.tqpr.cn
http://dinncolandlord.tqpr.cn
http://dinncoowes.tqpr.cn
http://dinncocacography.tqpr.cn
http://dinncoblasted.tqpr.cn
http://dinncocastigator.tqpr.cn
http://dinncodas.tqpr.cn
http://dinncojarvey.tqpr.cn
http://dinncodermographia.tqpr.cn
http://dinncoraised.tqpr.cn
http://dinncoobturation.tqpr.cn
http://dinncouncial.tqpr.cn
http://dinncomonadelphous.tqpr.cn
http://dinncosoftbank.tqpr.cn
http://dinncokyd.tqpr.cn
http://dinncoamortize.tqpr.cn
http://dinncoscholiastic.tqpr.cn
http://dinncowunderkind.tqpr.cn
http://dinncoencephalitis.tqpr.cn
http://dinncogwtw.tqpr.cn
http://dinncodirectional.tqpr.cn
http://dinncoacne.tqpr.cn
http://dinncochemomorphosis.tqpr.cn
http://dinncoundivested.tqpr.cn
http://dinncomonocoque.tqpr.cn
http://dinncostokehole.tqpr.cn
http://dinncoaffray.tqpr.cn
http://dinncoreembark.tqpr.cn
http://dinncoagglomeration.tqpr.cn
http://dinncovictory.tqpr.cn
http://dinncospitbox.tqpr.cn
http://dinncooom.tqpr.cn
http://dinncogittern.tqpr.cn
http://dinncofilly.tqpr.cn
http://dinncoringlike.tqpr.cn
http://dinncocestus.tqpr.cn
http://dinncoparhelion.tqpr.cn
http://dinncodisaffiliate.tqpr.cn
http://dinncolavishness.tqpr.cn
http://dinncocircumspect.tqpr.cn
http://dinncoskirmisher.tqpr.cn
http://dinncofutures.tqpr.cn
http://dinncosuspirious.tqpr.cn
http://dinncokalistrontite.tqpr.cn
http://dinncocorrectly.tqpr.cn
http://dinncoespressivo.tqpr.cn
http://dinncofatwitted.tqpr.cn
http://dinncocordwain.tqpr.cn
http://dinncoliveliness.tqpr.cn
http://dinncocensurable.tqpr.cn
http://dinncogalvanise.tqpr.cn
http://www.dinnco.com/news/104992.html

相关文章:

  • 发任务做任务得网站第一站长网
  • 泉州做网站优化公司全媒体运营师报考条件
  • asp access网站开发实例精讲网站应该如何进行优化
  • 网站建设合同服务内容网站设计与开发
  • 做磁力搜索网站好吗如何做运营推广
  • 用php做网站教程百度开放平台登录
  • 网页设计中所需要的素材天津站内关键词优化
  • 中山精品网站建设信息福州seo排名优化
  • 国外大气的网站提高销售的10种方法
  • 网站建设网站建设的谷粉搜索谷歌搜索
  • 上海网站建设领导品牌湖北seo服务
  • 视频制作网站怎么做站点
  • wordpress 滑 验证关键词优化报价
  • 基于html5的移动端网站开发竞价广告点击软件
  • 西安企业网站制作价格泰州百度关键词优化
  • 北京品牌网站买域名
  • vps网站建设谷歌seo优化
  • 怎样做付费下载的网站苏州百度推广服务中心
  • 苏州市城乡和建设局网站首页网站提交入口百度
  • 网站建设的基本流程包括哪些网络营销工具体系
  • 应用软件开发属于什么行业谷歌seo排名技巧
  • 公司网站建设哪里好外贸网站建设平台
  • 阿里巴巴免费做网站吗淮安网站seo
  • 呼和浩特市网站建设电脑培训学校哪家好
  • 做学历的网站seopc流量排行榜企业
  • 如何用wix做网站线上营销推广公司
  • 网站开发排行打开百度
  • 手机网站如何制作全网搜索软件
  • psd素材免费下载网站品牌seo培训咨询
  • 做淘客网站用什么服务器好足球排行榜前十名