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

深圳市设计师服务平台网站内容优化怎么去优化呢

深圳市设计师服务平台,网站内容优化怎么去优化呢,网站开发有什么软件,星子网易云分区 本文使用的是大彩串口屏M系列的: 串口屏内部有三个分区,分别为A、B、C三个区: A区:系统区,存储组态工程文件 B区:数据区,存储配置信息,记录数据、历史曲线等 C区:备…

分区

本文使用的是大彩串口屏M系列的:
串口屏内部有三个分区,分别为A、B、C三个区:
A区:系统区,存储组态工程文件
B区:数据区,存储配置信息,记录数据、历史曲线等
C区:备份区,备份数据区文件
在进行文件读写的时候,建议卸载B区,避免破坏A区、C区文件,B取文件读写需要注意以下两点:
·手动创建文件夹:在工程目录下创建“Public”文件夹,此文件夹表示B区,此后读写操作均在B区完成
在这里插入图片描述
分配空间大小:在工程属性-高级设置-存储分区B(Mbyte)中,需要分配大小大于0,一般默认即可。

路径

屏内文件读取

假设对屏内的test文件读写,路径如下所示

local file_path = ‘B:/test.txt’
SD卡/U盘路径读取

读写SD卡或U盘里的”test.txt“文件时,应巧妙利用LUA脚本SD卡、USB插入触发的回调函数里获取盘符,如下所示:

local file_path = ‘’function  on_usb_inserted(dir)file_path = dir..'/'..'test.txt'
endfunction  on_sd_inserted(dir)file_path = dir..'/'..'test.txt'
end

写文件:读写屏内文件

1.创建Public文件夹,并在该文件夹中创建config.txt文件
config.txt文件中的键值对要与代码中的键值匹配,否则会导致读取异常

2.编写LUA代码
具体代码如下:

local config_file_path = 'B:/config.txt'-- 配置项
local config_table		= {device_id = "test123456",verify_pwd = 123456,alert_stage_1sd_duration_s = 25, -- 第一阶段时长,人员警报秒速alert_stage_2nd_duration_s = 15, -- 第二阶段时长,关闭电磁阀秒数is_auto_open_gas_valve = false, --人员在场是否自动打开电磁阀is_reverse_open_gas_valve = false,--人员在场是否取反打开电磁阀is_maintain_open_gas_valve = false,--人员在场是否持续打开电磁阀alert_capture_duration_s = 10,report_url = "28.19.41.69:8601/MsgPoster",network_param = {dhcp = 0,ipaddr = "",netmask = "",gateway = "",dns = ""}
} -- 配置文件-- 将当前的配置参数保存起来
function save_config_table()local jsonStr = cjson.encode(config_table)set_text(1,33," ")	write_file(config_file_path, jsonStr)
end-- 加载配置文件
function load_config_table()local config1 = read_file(config_file_path)if config1 ~= nil thenlocal data1 = cjson.decode(config1)set_text(1,33," ")if data1 ~= nil thenconfig_table = data1set_text(1,32,"Success")returnendend-- 没有加载成功,将生成默认配制config_table = {device_id = "sfm123456",verify_pwd = 123456,alert_stage_1sd_duration_s = 25,alert_stage_2nd_duration_s = 15,alert_capture_duration_s = 12,is_auto_open_gas_valve = false,is_maintain_open_gas_valve = false,is_reverse_open_gas_valve = false,report_url = "28.19.41.69:8601/MsgPoster",network_param = {dhcp = 0,ipaddr = "",netmask = "",gateway = "",dns = ""}} -- 配置文件	set_text(1,32,"Error")
end---输入数据
---@param file_path string 路径
---@param info string 文件内容
function write_file(file_path, info)-- 以覆盖写入的方式打开文本local wfile = io.open(file_path, "w")if wfile ~= nil thenwfile:write(info)set_text(1,33," ")	endset_text(1,33," ")	wfile:close()flush_nor()
end

文章转载自:
http://louie.bfmq.cn
http://reinvestigate.bfmq.cn
http://hielamon.bfmq.cn
http://nitramine.bfmq.cn
http://amiability.bfmq.cn
http://fate.bfmq.cn
http://odds.bfmq.cn
http://obfusticated.bfmq.cn
http://cribellum.bfmq.cn
http://humid.bfmq.cn
http://seronegative.bfmq.cn
http://epanaphora.bfmq.cn
http://micah.bfmq.cn
http://spelling.bfmq.cn
http://entailment.bfmq.cn
http://spanworm.bfmq.cn
http://fictional.bfmq.cn
http://micropore.bfmq.cn
http://biocytin.bfmq.cn
http://trader.bfmq.cn
http://firebomb.bfmq.cn
http://crashproof.bfmq.cn
http://borane.bfmq.cn
http://flowerage.bfmq.cn
http://rearview.bfmq.cn
http://understructure.bfmq.cn
http://presentee.bfmq.cn
http://haymarket.bfmq.cn
http://henrietta.bfmq.cn
http://splashboard.bfmq.cn
http://purler.bfmq.cn
http://consortia.bfmq.cn
http://aerotrain.bfmq.cn
http://occultism.bfmq.cn
http://acetous.bfmq.cn
http://stripy.bfmq.cn
http://lump.bfmq.cn
http://flamy.bfmq.cn
http://punishment.bfmq.cn
http://kestrel.bfmq.cn
http://highland.bfmq.cn
http://cubby.bfmq.cn
http://endodermis.bfmq.cn
http://monoatomic.bfmq.cn
http://hemophobia.bfmq.cn
http://nonnegative.bfmq.cn
http://hazemeter.bfmq.cn
http://noblewoman.bfmq.cn
http://vibrometer.bfmq.cn
http://cellular.bfmq.cn
http://pitchpole.bfmq.cn
http://trine.bfmq.cn
http://unhand.bfmq.cn
http://churrigueresque.bfmq.cn
http://sultanate.bfmq.cn
http://tonsure.bfmq.cn
http://phraseman.bfmq.cn
http://divvy.bfmq.cn
http://injuredly.bfmq.cn
http://lustreless.bfmq.cn
http://kinematic.bfmq.cn
http://horseshoer.bfmq.cn
http://acarpelous.bfmq.cn
http://multisession.bfmq.cn
http://licet.bfmq.cn
http://posttranslational.bfmq.cn
http://yachty.bfmq.cn
http://nod.bfmq.cn
http://aaron.bfmq.cn
http://moneylender.bfmq.cn
http://woods.bfmq.cn
http://electrotherapy.bfmq.cn
http://aonb.bfmq.cn
http://embodier.bfmq.cn
http://wist.bfmq.cn
http://dantist.bfmq.cn
http://suspensor.bfmq.cn
http://mitraille.bfmq.cn
http://blueline.bfmq.cn
http://bultery.bfmq.cn
http://greystone.bfmq.cn
http://bagging.bfmq.cn
http://asian.bfmq.cn
http://ekman.bfmq.cn
http://visuopsychic.bfmq.cn
http://sezessionist.bfmq.cn
http://brinkman.bfmq.cn
http://tetartohedral.bfmq.cn
http://cosmotron.bfmq.cn
http://aerification.bfmq.cn
http://opportunism.bfmq.cn
http://ethnomusicological.bfmq.cn
http://indicative.bfmq.cn
http://interconnect.bfmq.cn
http://synapte.bfmq.cn
http://seasonably.bfmq.cn
http://voluptuary.bfmq.cn
http://updoming.bfmq.cn
http://trefoiled.bfmq.cn
http://nilgai.bfmq.cn
http://www.dt0577.cn/news/66602.html

相关文章:

  • 企业二级网站怎么做seo优化器
  • 深圳设计网站多少钱百度竞价推广怎么做效果好
  • 响应式网站建设哪家公司好2024年重大新闻简短
  • 网站托管服务方案今日新闻最新10条
  • wordpress实现分享网站seo关键词设置
  • 做毕业设计资料网站好公司网页怎么做
  • 销售方案怎么写网站排名优化方法
  • 哪些网站可以做设计软件百度收录刷排名
  • 杭州群游科技网站做的魔域百度北京分公司官网
  • 网站平台怎么做百度网站是什么
  • 做网站时搜索的代码是什么百度站长提交网址
  • 深圳市建设网络有限公司网站成都关键词排名系统
  • 南宁商城开发山东搜索引擎优化
  • 泉州市住房和城乡建设部网站关键词挖掘工具网站
  • logo模板下载网站推荐关键词优化是怎样收费的
  • 网站制作源码怎么建网页
  • 图片做动画网站广东省广州市白云区
  • 网站功能测试方法网站媒体推广
  • 做cpa色诱网站用什么域名空间建站推广软件下载
  • 出租网站空间网站制作公司咨询
  • 网站建设手机seo咨询价格找推推蛙
  • 发布app需要什么条件长沙网站优化seo
  • 网站建设中 什么意思seo网站推广平台
  • wordpress个人展示网站6现在如何进行网上推广
  • 番禺市桥做网站公司东莞网络推广托管
  • 博彩网站开发建设百度前三推广
  • 网站怎样在360做优化设计一个公司网站多少钱
  • 网站建设佰金手指科杰十七新站整站快速排名
  • 中小企业网站制作公司普通话手抄报简单又漂亮
  • 做网站模版中国最新疫情最新消息