Commit abf5d2c6 authored by 叶飞's avatar 叶飞

Initial commit

parents
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>物联网知识库</title>
<meta name="description" content="物联网知识点分享">
<meta name="generator" content="VuePress 1.3.1">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
<link rel="icon" href="/favicon.ico">
<link rel="preload" href="/assets/css/0.styles.2c51ae0d.css" as="style"><link rel="preload" href="/assets/js/app.394670a6.js" as="script"><link rel="preload" href="/assets/js/7.b3d344a0.js" as="script"><link rel="prefetch" href="/assets/js/1.564fda4f.js"><link rel="prefetch" href="/assets/js/10.623acd6b.js"><link rel="prefetch" href="/assets/js/11.86f4dd7b.js"><link rel="prefetch" href="/assets/js/12.55cdf3a6.js"><link rel="prefetch" href="/assets/js/13.4fdfc039.js"><link rel="prefetch" href="/assets/js/14.87e817f5.js"><link rel="prefetch" href="/assets/js/15.3478b4f4.js"><link rel="prefetch" href="/assets/js/16.0f9fce17.js"><link rel="prefetch" href="/assets/js/17.8a162a2f.js"><link rel="prefetch" href="/assets/js/18.9ab8d900.js"><link rel="prefetch" href="/assets/js/3.a4daf23b.js"><link rel="prefetch" href="/assets/js/4.d089dd84.js"><link rel="prefetch" href="/assets/js/5.1adb0957.js"><link rel="prefetch" href="/assets/js/6.9e699f41.js"><link rel="prefetch" href="/assets/js/8.6d98bd53.js"><link rel="prefetch" href="/assets/js/9.05f0eb0f.js">
<link rel="stylesheet" href="/assets/css/0.styles.2c51ae0d.css">
</head>
<body>
<div id="app" data-server-rendered="true"><div class="theme-container"><div class="content"><h1>404</h1> <blockquote>How did we get here?</blockquote> <a href="/" class="router-link-active">Take me home.</a></div></div><div class="global-ui"><div class="back-to-ceiling" style="right:1rem;bottom:6rem;width:2.5rem;height:2.5rem;border-radius:.25rem;line-height:2.5rem;display:none;" data-v-a81d141e data-v-a81d141e><svg t="1574745035067" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5404" class="icon" data-v-a81d141e><path d="M526.60727968 10.90185116a27.675 27.675 0 0 0-29.21455937 0c-131.36607665 82.28402758-218.69155461 228.01873535-218.69155402 394.07834331a462.20625001 462.20625001 0 0 0 5.36959153 69.94390903c1.00431239 6.55289093-0.34802892 13.13561351-3.76865779 18.80351572-32.63518765 54.11355614-51.75690182 118.55860487-51.7569018 187.94566865a371.06718723 371.06718723 0 0 0 11.50484808 91.98906777c6.53300375 25.50556257 41.68394495 28.14064038 52.69160883 4.22606766 17.37162448-37.73630017 42.14135425-72.50938081 72.80769204-103.21549295 2.18761121 3.04276886 4.15646224 6.24463696 6.40373557 9.22774369a1871.4375 1871.4375 0 0 0 140.04691725 5.34970492 1866.36093723 1866.36093723 0 0 0 140.04691723-5.34970492c2.24727335-2.98310674 4.21612437-6.18497483 6.3937923-9.2178004 30.66633723 30.70611158 55.4360664 65.4791928 72.80769147 103.21549355 11.00766384 23.91457269 46.15860503 21.27949489 52.69160879-4.22606768a371.15156223 371.15156223 0 0 0 11.514792-91.99901164c0-69.36717486-19.13165746-133.82216804-51.75690182-187.92578088-3.42062944-5.66790279-4.76302748-12.26056868-3.76865837-18.80351632a462.20625001 462.20625001 0 0 0 5.36959269-69.943909c-0.00994388-166.08943902-87.32547796-311.81420293-218.6915546-394.09823051zM605.93803103 357.87693858a93.93749974 93.93749974 0 1 1-187.89594924 6.1e-7 93.93749974 93.93749974 0 0 1 187.89594924-6.1e-7z" p-id="5405" data-v-a81d141e></path><path d="M429.50777625 765.63860547C429.50777625 803.39355007 466.44236686 1000.39046097 512.00932183 1000.39046097c45.56695499 0 82.4922232-197.00623328 82.5015456-234.7518555 0-37.75494459-36.9345906-68.35043303-82.4922232-68.34111062-45.57627738-0.00932239-82.52019037 30.59548842-82.51086798 68.34111062z" p-id="5406" data-v-a81d141e></path></svg></div></div></div>
<script src="/assets/js/app.394670a6.js" defer></script><script src="/assets/js/7.b3d344a0.js" defer></script>
</body>
</html>
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{287:function(t,e,n){},331:function(t,e,n){"use strict";var a=n(287);n.n(a).a},346:function(t,e,n){"use strict";n.r(e);var a={functional:!0,props:{type:{type:String,default:"tip"},text:String,vertical:{type:String,default:"top"}},render:function(t,e){var n=e.props,a=e.slots;return t("span",{class:["badge",n.type],style:{verticalAlign:n.vertical}},n.text||a().default)}},i=(n(331),n(3)),r=Object(i.a)(a,void 0,void 0,!1,null,"312e2a2a",null);e.default=r.exports}}]);
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{340:function(t,e,n){"use strict";n.r(e);var s=n(3),l=Object(s.a)({},(function(){var t=this.$createElement;return(this._self._c||t)("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}})}),[],!1,null,null,null);e.default=l.exports}}]);
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{339:function(a,t,v){"use strict";v.r(t);var _=v(3),r=Object(_.a)({},(function(){var a=this,t=a.$createElement,v=a._self._c||t;return v("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[v("h1",{attrs:{id:"边缘网关"}},[v("a",{staticClass:"header-anchor",attrs:{href:"#边缘网关"}},[a._v("#")]),a._v(" 边缘网关")]),a._v(" "),v("h2",{attrs:{id:"简述"}},[v("a",{staticClass:"header-anchor",attrs:{href:"#简述"}},[a._v("#")]),a._v(" 简述")]),a._v(" "),v("h3",{attrs:{id:"什么是边缘网关"}},[v("a",{staticClass:"header-anchor",attrs:{href:"#什么是边缘网关"}},[a._v("#")]),a._v(" 什么是边缘网关")]),a._v(" "),v("p",[a._v("边缘网关是部署在网络边缘侧的网关,通过"),v("code",[a._v("网络联接")]),a._v("、"),v("code",[a._v("协议转换")]),a._v("、"),v("code",[a._v("逻辑运算")]),a._v("等功能联接物理和数字世界,提供轻量化的联接管理、实时数据分析及应用管理功能。")]),a._v(" "),v("h3",{attrs:{id:"边缘网关功能"}},[v("a",{staticClass:"header-anchor",attrs:{href:"#边缘网关功能"}},[a._v("#")]),a._v(" 边缘网关功能")]),a._v(" "),v("ul",[v("li",[a._v("丰富的接口和协议,方便现场设备能够广泛的接入")]),a._v(" "),v("li",[a._v("支持物联网协议(如MQTT),兼容协议广、开放包容,平滑接入各种云平台")]),a._v(" "),v("li",[a._v("支持本地存储")]),a._v(" "),v("li",[a._v("兼容多种通信方式,专利技术保障无线通信“永久在线”")]),a._v(" "),v("li",[a._v("多数据中心同步传输,管理协同更高效")]),a._v(" "),v("li",[a._v("支持数据补传")]),a._v(" "),v("li",[a._v("支持本地或远程配置升级,网关管理简便")]),a._v(" "),v("li",[a._v("专为无人值守环境设计,适用恶劣工况环境")]),a._v(" "),v("li",[a._v("高清触摸屏(选配)")])]),a._v(" "),v("h2",{attrs:{id:"vpn物联网方案"}},[v("a",{staticClass:"header-anchor",attrs:{href:"#vpn物联网方案"}},[a._v("#")]),a._v(" VPN物联网方案")]),a._v(" "),v("h3",{attrs:{id:"概述"}},[v("a",{staticClass:"header-anchor",attrs:{href:"#概述"}},[a._v("#")]),a._v(" 概述")]),a._v(" "),v("p",[a._v("通过搭建VPN服务器实现泵房和服务器在同一"),v("code",[a._v("局域网")]),a._v("。通过传统组态软件进行即可视化调试。")]),a._v(" "),v("h3",{attrs:{id:"数据流程图"}},[v("a",{staticClass:"header-anchor",attrs:{href:"#数据流程图"}},[a._v("#")]),a._v(" 数据流程图")]),a._v(" "),v("p",[v("img",{attrs:{src:"/img/gateway/oldDataStream.jpg",alt:"数据流程图"}})]),a._v(" "),v("h3",{attrs:{id:"分析"}},[v("a",{staticClass:"header-anchor",attrs:{href:"#分析"}},[a._v("#")]),a._v(" 分析")]),a._v(" "),v("ul",[v("li",[a._v("优点\n"),v("ol",[v("li",[a._v("远程维护便捷性")]),a._v(" "),v("li",[a._v("上位机选型空间大")])])]),a._v(" "),v("li",[a._v("缺点\n"),v("ol",[v("li",[a._v("VPN组网价格较高")]),a._v(" "),v("li",[a._v("实施需要专业网络技能")])])])]),a._v(" "),v("h2",{attrs:{id:"边缘网关物联网方案"}},[v("a",{staticClass:"header-anchor",attrs:{href:"#边缘网关物联网方案"}},[a._v("#")]),a._v(" 边缘网关物联网方案")]),a._v(" "),v("h3",{attrs:{id:"概述-2"}},[v("a",{staticClass:"header-anchor",attrs:{href:"#概述-2"}},[a._v("#")]),a._v(" 概述")]),a._v(" "),v("p",[v("code",[a._v("分布式")]),a._v("部署边缘网关,通过每个边缘网关采集各自负责的边缘模块,在边缘解决"),v("code",[a._v("设备通讯")]),a._v(","),v("code",[a._v("协议转换")]),a._v(","),v("code",[a._v("存储")]),a._v("等功能,并跟数据中心建立"),v("code",[a._v("持久化``双向链接")])]),a._v(" "),v("h3",{attrs:{id:"数据流程图-2"}},[v("a",{staticClass:"header-anchor",attrs:{href:"#数据流程图-2"}},[a._v("#")]),a._v(" 数据流程图")]),a._v(" "),v("p",[v("img",{attrs:{src:"/img/gateway/newDataStream.jpg",alt:"数据流程图"}})]),a._v(" "),v("h3",{attrs:{id:"分析-2"}},[v("a",{staticClass:"header-anchor",attrs:{href:"#分析-2"}},[a._v("#")]),a._v(" 分析")]),a._v(" "),v("ul",[v("li",[a._v("优点\n"),v("ol",[v("li",[a._v("将通讯和解析压力分散到各自模块当中")]),a._v(" "),v("li",[a._v("每个通信单元互不影响,排查故障简单")])])]),a._v(" "),v("li",[a._v("缺点\n"),v("ol",[v("li",[a._v("边缘网关种类繁多,不易选型")]),a._v(" "),v("li",[a._v("由于下位机的不确定性,难一做到一个网关适配所有的下位机,通常是根据实际工况选型对应的设备")])])])]),a._v(" "),v("h2",{attrs:{id:"市场边缘网关产品"}},[v("a",{staticClass:"header-anchor",attrs:{href:"#市场边缘网关产品"}},[a._v("#")]),a._v(" 市场边缘网关产品")]),a._v(" "),v("p",[v("a",{attrs:{href:"https://g.civnet.cn:8443/doc/software/raw/master/%E7%89%A9%E8%81%94%E7%BD%91%E5%85%B3%E4%BA%A7%E5%93%81%E5%AF%B9%E6%AF%94.xlsx",target:"_blank",rel:"noopener noreferrer"}},[a._v("产品对比"),v("OutboundLink")],1)])])}),[],!1,null,null,null);t.default=r.exports}}]);
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{341:function(t,r,e){"use strict";e.r(r);var a=e(3),i=Object(a.a)({},(function(){var t=this,r=t.$createElement,e=t._self._c||r;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"设备通信"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#设备通信"}},[t._v("#")]),t._v(" 设备通信")]),t._v(" "),e("h2",{attrs:{id:"通讯方式"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#通讯方式"}},[t._v("#")]),t._v(" 通讯方式")]),t._v(" "),e("ul",[e("li",[t._v("串口通信\n串行接口是一种可以将接收来自CPU的并行数据字符转换为连续的串行数据流发送出去,同时可将接收的串行数据流转换为并行的数据字符供给CPU的器件。一般完成这种功能的电路,我们称为串行接口电路。")]),t._v(" "),e("li",[t._v("以太网通信\n以太网是一种基带局域网技术,以太网通信是一种使用同轴电缆作为网络媒体,采用载波多路访问和冲突检测机制的通信方式,数据传输速率达到1Gbit/s,可满足非持续性网络数据传输的需要。")])]),t._v(" "),e("h2",{attrs:{id:"环境准备"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#环境准备"}},[t._v("#")]),t._v(" 环境准备")]),t._v(" "),e("ul",[e("li",[e("a",{attrs:{href:"https://g.civnet.cn:8443/doc/software/raw/master/kepserverex.rar",target:"_blank",rel:"noopener noreferrer"}},[t._v("kepserver6.4"),e("OutboundLink")],1)]),t._v(" "),e("li",[e("a",{attrs:{href:"https://g.civnet.cn:8443/doc/software/raw/master/KEPServerEX-6.4.321.0%20%E7%88%86%E7%A0%B4(%E5%AE%8C%E7%BE%8E).rar",target:"_blank",rel:"noopener noreferrer"}},[t._v("kepserver6.4补丁"),e("OutboundLink")],1)]),t._v(" "),e("li",[e("a",{attrs:{href:"https://g.civnet.cn:8443/doc/software/raw/master/jre-8u241-windows-i586.exe",target:"_blank",rel:"noopener noreferrer"}},[t._v("jre-8u241-windows-i586"),e("OutboundLink")],1)]),t._v(" "),e("li",[e("a",{attrs:{href:"https://g.civnet.cn:8443/doc/software/raw/master/mqttfx-1.7.0-windows-x64.exe",target:"_blank",rel:"noopener noreferrer"}},[t._v("mqtt.fx"),e("OutboundLink")],1)]),t._v(" "),e("li",[e("a",{attrs:{href:"https://www.emqx.io/cn/",target:"_blank",rel:"noopener noreferrer"}},[t._v("emq"),e("OutboundLink")],1)])]),t._v(" "),e("h2",{attrs:{id:"kepserver-modbus-rtu-serial"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#kepserver-modbus-rtu-serial"}},[t._v("#")]),t._v(" KepServer Modbus RTU Serial")]),t._v(" "),e("ol",[e("li",[t._v("kepServer添加通道选择Modbus RTU Serial驱动"),e("br"),t._v(" "),e("img",{attrs:{src:"/img/gateway/rtu1.jpg",alt:"添加通道1"}})]),t._v(" "),e("li",[t._v("指定通道名称"),e("br"),t._v(" "),e("img",{attrs:{src:"/img/gateway/rtu2.jpg",alt:"添加通道2"}})]),t._v(" "),e("li",[t._v("分配通道"),e("br"),t._v(" "),e("img",{attrs:{src:"/img/gateway/rtu3.jpg",alt:"添加通道3"}})]),t._v(" "),e("li",[e("code",[t._v("**重要**")]),t._v("选择COM口"),e("br"),t._v(" "),e("img",{attrs:{src:"/img/gateway/rtu4.jpg",alt:"添加通道4"}})]),t._v(" "),e("li",[t._v("选择完成添加通道"),e("br"),t._v(" "),e("img",{attrs:{src:"/img/gateway/rtu6.jpg",alt:"添加通道6"}})]),t._v(" "),e("li",[t._v("添加设备"),e("br"),t._v(" "),e("img",{attrs:{src:"/img/gateway/rtu11.jpg",alt:"添加设备1"}})]),t._v(" "),e("li",[t._v("确定设备型号"),e("br"),t._v(" "),e("img",{attrs:{src:"/img/gateway/rtu12.jpg",alt:"添加设备2"}})]),t._v(" "),e("li",[e("code",[t._v("**重要**")]),t._v("确定从站ID"),e("br"),t._v(" "),e("img",{attrs:{src:"/img/gateway/rtu13.jpg",alt:"添加设备2"}})]),t._v(" "),e("li",[t._v("选择完成添加设备"),e("br"),t._v(" "),e("img",{attrs:{src:"/img/gateway/rtu14.jpg",alt:"添加设备3"}})]),t._v(" "),e("li",[e("code",[t._v("**重要**")]),t._v("根据地址表添加条目"),e("br"),t._v(" "),e("img",{attrs:{src:"/img/gateway/rtu15.jpg",alt:"添加条目1"}})]),t._v(" "),e("li",[t._v("验证采集结构,通信质量良好证明通信成功"),e("br"),t._v(" "),e("img",{attrs:{src:"/img/gateway/rtu16.jpg",alt:"测试条目1"}})])]),t._v(" "),e("h2",{attrs:{id:"kepserver-iot-gateway"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#kepserver-iot-gateway"}},[t._v("#")]),t._v(" KepServer IoT Gateway")]),t._v(" "),e("p",[t._v("使用KepServer IoT Gateway插件需要安装"),e("code",[t._v("32位jre")]),e("a",{attrs:{href:"https://g.civnet.cn:8443/doc/software/raw/master/jre-8u241-windows-i586.exe",target:"_blank",rel:"noopener noreferrer"}},[t._v("jre-8u241-windows-i586"),e("OutboundLink")],1)]),t._v(" "),e("ol",[e("li",[t._v("添加IoT Agent,选择MQTT Client"),e("br"),t._v(" "),e("img",{attrs:{src:"/img/gateway/iot1.jpg",alt:"添加iot1"}})]),t._v(" "),e("li",[t._v("填写MQTT服务器参数信息\n我这里使用的EMQ服务器搭建的测试服务器,可以参考"),e("a",{attrs:{href:"https://www.emqx.io/cn/",target:"_blank",rel:"noopener noreferrer"}},[t._v("emq"),e("OutboundLink")],1),e("br"),t._v(" "),e("img",{attrs:{src:"/img/gateway/iot2.jpg",alt:"添加iot2"}})]),t._v(" "),e("li",[t._v("填写MQTT客户端认证信息,注意:client ID相同会踢掉前任"),e("br"),t._v(" "),e("img",{attrs:{src:"/img/gateway/iot3.jpg",alt:"添加iot3"}})]),t._v(" "),e("li",[t._v("选择要转发的条目"),e("br"),t._v(" "),e("img",{attrs:{src:"/img/gateway/iot4.jpg",alt:"添加iot4"}})]),t._v(" "),e("li",[t._v("转发规则"),e("br"),t._v(" "),e("ul",[e("li",[e("code",[t._v("only Data Changes")]),t._v("数据变化时上报")]),t._v(" "),e("li",[e("code",[t._v("every scan")]),t._v("每次轮询就上报"),e("br"),t._v(" "),e("img",{attrs:{src:"/img/gateway/iot5.jpg",alt:"添加iot5"}})])])]),t._v(" "),e("li",[t._v("验证转发,这里采用的MQTT.fx订阅mqtt服务器数据"),e("a",{attrs:{href:"https://g.civnet.cn:8443/doc/software/raw/master/mqttfx-1.7.0-windows-x64.exe",target:"_blank",rel:"noopener noreferrer"}},[t._v("mqtt.fx"),e("OutboundLink")],1),e("br"),t._v(" "),e("img",{attrs:{src:"/img/gateway/iot6.jpg",alt:"添加iot6"}})]),t._v(" "),e("li",[t._v("控制主题,网关订阅主题实现反向控制设备"),e("br"),t._v(" "),e("img",{attrs:{src:"/img/gateway/iot7.jpg",alt:"添加iot7"}})])])])}),[],!1,null,null,null);r.default=i.exports}}]);
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{342:function(t,r,a){"use strict";a.r(r);var e=a(3),s=Object(e.a)({},(function(){var t=this,r=t.$createElement,a=t._self._c||r;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"modbus"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#modbus"}},[t._v("#")]),t._v(" modbus")]),t._v(" "),a("h2",{attrs:{id:"应用层协议"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#应用层协议"}},[t._v("#")]),t._v(" 应用层协议")]),t._v(" "),a("p",[t._v("Modbus协议是OSI模型的"),a("code",[t._v("第七层")]),t._v("的应用层通讯协议,定义了不同类型设备间交换信息方式,以及信息的格式。"),a("br"),t._v(" "),a("img",{attrs:{src:"/img/gateway/modbusosi.png",alt:"image"}})]),t._v(" "),a("h2",{attrs:{id:"工作方式"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#工作方式"}},[t._v("#")]),t._v(" 工作方式")]),t._v(" "),a("p",[t._v("Modbus的工作方式是"),a("code",[t._v("请求")]),t._v("/"),a("code",[t._v("应答")]),t._v(",每次通讯都是主站先发送指令,可以是广播,或是向特定从站的单播,从站响应指令,并按要求应答,或者报告异常。当主站不发送请求时,从站不会自己发出数据,从站和从站之间不能直接通讯。")]),t._v(" "),a("h2",{attrs:{id:"工作模式"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#工作模式"}},[t._v("#")]),t._v(" 工作模式")]),t._v(" "),a("p",[t._v("分为"),a("code",[t._v("串行")]),t._v("和"),a("code",[t._v("TCP")]),t._v(",串行又分为"),a("code",[t._v("ASCII")]),t._v("和"),a("code",[t._v("RTU")]),t._v("。对于Modbus TCP而言,主站通常称为Client,从站称为Server;而对于Modbus RTU和Modbus ASCII来说,主站是Master,从站是Slave。Modbus TCP基于以太网和TCP/IP协议,Modbus RTU和Modbus ASCII则是使用异步串行传输(通常是RS-232/422/485)。")]),t._v(" "),a("h2",{attrs:{id:"协议内容"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#协议内容"}},[t._v("#")]),t._v(" 协议内容")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://g.civnet.cn:8443/doc/software/raw/master/Modbus%E9%80%9A%E8%AE%AF%E5%8D%8F%E8%AE%AE.pdf",target:"_blank",rel:"noopener noreferrer"}},[t._v("协议内容下载地址"),a("OutboundLink")],1),t._v(" "),a("br"),t._v(" "),a("img",{attrs:{src:"/img/gateway/mod1.jpg",alt:"modbus1"}}),t._v(" "),a("img",{attrs:{src:"/img/gateway/mod2.jpg",alt:"modbus2"}}),t._v(" "),a("br"),t._v(" "),a("img",{attrs:{src:"/img/gateway/mod3.jpg",alt:"modbus3"}}),t._v(" "),a("img",{attrs:{src:"/img/gateway/mod4.jpg",alt:"modbus4"}})])]),t._v(" "),a("h2",{attrs:{id:"包格式"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#包格式"}},[t._v("#")]),t._v(" 包格式")]),t._v(" "),a("p",[t._v("Modbus协议的报文(或帧)的基本格式是:"),a("br"),t._v(" "),a("img",{attrs:{src:"/img/gateway/modbusContent.png",alt:"image"}})]),t._v(" "),a("ul",[a("li",[t._v("对TCP。Modbus On TCP给PDU加上表头,没有差错校验(因为下面的TCP是基于可靠的连接),然后交给TCP层。")]),t._v(" "),a("li",[t._v("对serial。PDU被直接交给Modbus链路层加上表头和校验码。表头包含Modbus从站地址,RTU用CRC校验,ASCII用LRC校验。\n表头包含了从站的地址,功能码告诉从站要执行何种功能,数据区是具体的信息。")])]),t._v(" "),a("p",[t._v("先以RTU为例,主站发送了:")]),t._v(" "),a("div",{staticClass:"language- line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("09 03 00 04 00 03 XX YY\n")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br")])]),a("p",[t._v('主站告诉从站09,我要做"03"操作,即读Holding Register内容,开始偏移地址为4、长度为3。因为Holding Register的有效地址范围是40001-49999,开始偏移地址4、长度为3即地址40005、40006、40007的值。"XXYY"代表RTU的校验位CRC。\n从站收到信息后,就从对应的寄存器找到数值,回复:')]),t._v(" "),a("div",{staticClass:"language- line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("09 03 06 02 2B 00 01 00 64 XX YY\n")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br")])]),a("p",[t._v('从站回答,该地址偏移为4的寄存器值为02 2B,地址偏移为5的寄存器值为00 01,地址偏移为6的寄存器值为00 64。其中"09 03"是复制了主站发来的地址和功能码,"06"代表接下来的数据共有6个字节。\n如果从站收到了一个错误的请求,例如发现要读的寄存器地址是错误的,则回复:09 83 02 XX YY\n其中"83"是把功能码"03"的最高位置1,告诉主站发生了异常,"02"是异常码,说明发生了无效地址的异常。\n#Modbus的四种数据类型')]),t._v(" "),a("ul",[a("li",[t._v("Coil:可读可写bit,既可以是一个输出量输出点,也可以是数字量输入点,有效的地址范围是1-9999。")]),t._v(" "),a("li",[t._v("Input Status:只读bit,即数字量输出点,有效地址范围是10001-19999。")]),t._v(" "),a("li",[t._v("Input Register:只读word,可以用作模拟量或16位打包输入点,有效地址范围是30001-39999。")]),t._v(" "),a("li",[t._v("Holding Register:可读可写word,既可以是一个模拟量或16位打包输入点,也可以是模拟量或16位打包输出点,有效地址范围是40001-49999。")])]),t._v(" "),a("p",[t._v("在PLC或DCS上用点名标记不同的变量,在Modbus则以数据地址来标记每个点。以上所说的地址都是参考地址,而不是实际的物理地址。上述的地址是在设备中的地址,按照"),a("code",[t._v("PLC的习惯从1开始递增")]),t._v(",而Modbus报文中是从0开始递增。例如地址偏移为4、5、6的Holding Register,其实是指参考地址是40005、40006、40007的寄存器。\n#TCP、Serial的区别\n对于Modbus TCP而言,主站通常称为Client,从站称为Server;而对于Modbus RTU和Modbus ASCII来说,主站是Master,从站是Slave。Modbus TCP端口号是502"),a("br"),t._v(" "),a("a",{attrs:{href:"http://www.ip33.com/crc.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("CRC循环校验"),a("OutboundLink")],1)]),t._v(" "),a("h2",{attrs:{id:"rtu和ascii的区别"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#rtu和ascii的区别"}},[t._v("#")]),t._v(" RTU和ASCII的区别")]),t._v(" "),a("p",[t._v("RTU模式下,一个字节的数据,传输的就是一个字节。ASCII模式下,同样一个字节数据用了两个字节来传输。\n例如,要传输数字0x5B,RTU传输的是0101 1011(二进制),而ASCII传输的是00110101(53,ASCII的5的码是53)和01000010。可见,ASCII传输的速率是RTU的一半。ASCII模式采用LRC校验,RTU模式采用16位CRC校验。")]),t._v(" "),a("h2",{attrs:{id:"modbus-slave-poll"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#modbus-slave-poll"}},[t._v("#")]),t._v(" modbus Slave&Poll")]),t._v(" "),a("ul",[a("li",[t._v("使用教程:"),a("a",{attrs:{href:"https://www.cnblogs.com/hieroly/p/9063710.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("参考链接"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("下载地址:\n"),a("a",{attrs:{href:"https://g.civnet.cn:8443/doc/software/raw/master/ModbusPollSalveSN.rar",target:"_blank",rel:"noopener noreferrer"}},[t._v("modbus Slave&Poll"),a("OutboundLink")],1),t._v(" "),a("a",{attrs:{href:"https://g.civnet.cn:8443/doc/software/raw/master/virtualserialportdriver8.rar",target:"_blank",rel:"noopener noreferrer"}},[t._v("虚拟串口"),a("OutboundLink")],1)])])])}),[],!1,null,null,null);r.default=s.exports}}]);
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{343:function(t,s,e){"use strict";e.r(s);var n=e(3),r=Object(n.a)({},(function(){var t=this.$createElement,s=this._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[s("h1",{attrs:{id:"iot"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#iot"}},[this._v("#")]),this._v(" IoT")])])}),[],!1,null,null,null);s.default=r.exports}}]);
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{344:function(t,e,s){"use strict";s.r(e);var n=s(3),r=Object(n.a)({},(function(){var t=this.$createElement,e=this._self._c||t;return e("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[e("h1",{attrs:{id:"schneider"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#schneider"}},[this._v("#")]),this._v(" Schneider")])])}),[],!1,null,null,null);e.default=r.exports}}]);
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{345:function(t,s,e){"use strict";e.r(s);var n=e(3),i=Object(n.a)({},(function(){var t=this.$createElement,s=this._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[s("h1",{attrs:{id:"siemens"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#siemens"}},[this._v("#")]),this._v(" siemens")])])}),[],!1,null,null,null);s.default=i.exports}}]);
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{234:function(n,w,o){}}]);
\ No newline at end of file
This diff is collapsed.
(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{235:function(t,e,a){},236:function(t,e,a){},237:function(t,e,a){},238:function(t,e,a){},239:function(t,e,a){},241:function(t,e,a){"use strict";function n(){var t=["#e15b64","#f47e60","#f8b26a","#abbd81","#849b87","#e15b64","#f47e60","#f8b26a","#f26d6d","#67cc86","#fb9b5f","#3498db"];return t[Math.floor(Math.random()*t.length)]}a.d(e,"a",(function(){return n}))},243:function(t,e,a){"use strict";a(245),a(20),a(145),a(21),a(25);var n=a(45),r={props:{pageInfo:{type:Object,default:function(){return{}}},currentTag:{type:String,default:""},showAccessNumber:{type:Boolean,default:!1}},data:function(){return{numStyle:{fontSize:".9rem",fontWeight:"normal",color:"#999"}}},filters:{formatDateValue:function(t){if(!t)return"";t=t.replace("T"," ").slice(0,t.lastIndexOf("."));var e=Number(t.substr(11,2)),a=Number(t.substr(14,2)),r=Number(t.substr(17,2));return e>0||a>0||r>0?Object(n.d)(t):Object(n.d)(t,"yyyy-MM-dd")}},methods:{goTags:function(t){this.$router.push({path:"/tags/".concat(t,"/")})}}},s=(a(247),a(3)),o=Object(s.a)(r,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t.pageInfo.frontmatter.author||t.$themeConfig.author||t.$site.title?a("i",{staticClass:"iconfont reco-account"},[a("span",[t._v(t._s(t.pageInfo.frontmatter.author||t.$themeConfig.author||t.$site.title))])]):t._e(),t._v(" "),t.pageInfo.frontmatter.date?a("i",{staticClass:"iconfont reco-date"},[a("span",[t._v(t._s(t._f("formatDateValue")(t.pageInfo.frontmatter.date)))])]):t._e(),t._v(" "),!0===t.showAccessNumber?a("i",{staticClass:"iconfont reco-eye"},[a("AccessNumber",{attrs:{idVal:t.pageInfo.path,numStyle:t.numStyle}})],1):t._e(),t._v(" "),t.pageInfo.frontmatter.tags?a("i",{staticClass:"iconfont reco-tag tags"},t._l(t.pageInfo.frontmatter.tags,(function(e,n){return a("span",{key:n,staticClass:"tag-item",class:{active:t.currentTag==e},on:{click:function(a){return t.goTags(e)}}},[t._v("\n "+t._s(e)+"\n ")])})),0):t._e()])}),[],!1,null,"484a899e",null);e.a=o.exports},244:function(t,e,a){"use strict";var n=a(235);a.n(n).a},245:function(t,e,a){var n=a(0),r=a(246);n({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},246:function(t,e,a){"use strict";var n=a(17),r=a(33),s=a(11),o=a(26),c=a(19),i=Math.min,u=[].lastIndexOf,g=!!u&&1/[1].lastIndexOf(1,-0)<0,f=o("lastIndexOf"),l=c("indexOf",{ACCESSORS:!0,1:0}),p=g||!f||!l;t.exports=p?function(t){if(g)return u.apply(this,arguments)||0;var e=n(this),a=s(e.length),o=a-1;for(arguments.length>1&&(o=i(o,r(arguments[1]))),o<0&&(o=a+o);o>=0;o--)if(o in e&&e[o]===t)return o||0;return-1}:u},247:function(t,e,a){"use strict";var n=a(236);a.n(n).a},248:function(t,e,a){"use strict";var n=a(237);a.n(n).a},249:function(t,e,a){"use strict";var n=a(238);a.n(n).a},250:function(t,e,a){"use strict";a(143);e.a={methods:{_getStoragePage:function(){var t=window.location.pathname,e=JSON.parse(sessionStorage.getItem("currentPage"));return null===e||t!==e.path?(sessionStorage.setItem("currentPage",{page:1,path:""}),1):parseInt(e.page)},_setStoragePage:function(t){var e=window.location.pathname;sessionStorage.setItem("currentPage",JSON.stringify({page:t,path:e}))}}}},251:function(t,e,a){},254:function(t,e,a){"use strict";a(20);var n={components:{PageInfo:a(243).a},props:["item","currentPage","currentTag"]},r=(a(248),a(3)),s={components:{NoteAbstractItem:Object(r.a)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"abstract-item"},[t.item.frontmatter.sticky?a("i",{staticClass:"iconfont reco-sticky"}):t._e(),t._v(" "),a("div",{staticClass:"title"},[t.item.frontmatter.keys?a("i",{staticClass:"iconfont reco-lock"}):t._e(),t._v(" "),a("router-link",{attrs:{to:t.item.path}},[t._v(t._s(t.item.title))])],1),t._v(" "),a("div",{staticClass:"abstract",domProps:{innerHTML:t._s(t.item.excerpt)}}),t._v(" "),a("hr",{staticClass:"hr"}),t._v(" "),a("PageInfo",{attrs:{pageInfo:t.item,currentTag:t.currentTag}})],1)}),[],!1,null,"28f76ce9",null).exports},props:["data","currentPage","currentTag"],computed:{currentPageData:function(){var t=10*this.currentPage-10,e=10*this.currentPage;return this.data.slice(t,e)}}},o=(a(249),Object(r.a)(s,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"abstract-wrapper"},t._l(t.currentPageData,(function(e){return a("NoteAbstractItem",{key:e.path,attrs:{item:e,currentPage:t.currentPage,currentTag:t.currentTag}})})),1)}),[],!1,null,"b014bc36",null));e.a=o.exports},255:function(t,e,a){"use strict";var n=a(239);a.n(n).a},257:function(t,e,a){"use strict";a(142);var n=a(24),r=a(241),s={props:{currentTag:{type:String,default:""}},computed:{tags:function(){return[{name:"全部",path:"/tag/"}].concat(Object(n.a)(this.$tags.list))}},methods:{tagClick:function(t){this.$emit("getCurrentTag",t)},getOneColor:r.a}},o=(a(255),a(3)),c=Object(o.a)(s,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"tags"},t._l(t.tags,(function(e,n){return a("span",{key:n,class:{active:e.name==t.currentTag},style:{backgroundColor:t.getOneColor()},on:{click:function(a){return t.tagClick(e)}}},[t._v(t._s(e.name))])})),0)}),[],!1,null,"36b9f66a",null);e.a=c.exports},274:function(t,e,a){"use strict";var n=a(251);a.n(n).a},283:function(t,e,a){},327:function(t,e,a){"use strict";var n=a(283);a.n(n).a},335:function(t,e,a){"use strict";a.r(e);a(32);var n=a(256),r=a(254),s=a(257),o=a(250),c=a(242),i=a(43),u=a(240),g={mixins:[o.a,u.a],components:{Common:n.a,NoteAbstract:r.a,TagList:s.a,ModuleTransition:c.a},data:function(){return{currentPage:1,currentTag:"全部"}},computed:{posts:function(){var t=this.$currentTags.pages;return t=Object(i.a)(t),Object(i.c)(t),t}},mounted:function(){this._setPage(this._getStoragePage())},methods:{getCurrentTag:function(t){this.$emit("currentTag",t)},tagClick:function(t){this.$router.push({path:t.path})},getCurrentPage:function(t){this._setPage(t),setTimeout((function(){window.scrollTo(0,0)}),100)},_setPage:function(t){this.currentPage=t,this.$page.currentPage=t,this._setStoragePage(t)}},watch:{$route:function(){this._setPage(this._getStoragePage())}}},f=(a(244),a(274),a(327),a(3)),l=Object(f.a)(g,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"tag-wrapper"},[a("Common",{attrs:{sidebar:!1,isComment:!1}},[a("ModuleTransition",[a("TagList",{directives:[{name:"show",rawName:"v-show",value:t.recoShowModule,expression:"recoShowModule"}],staticClass:"tags",attrs:{currentTag:t.$currentTags.key},on:{getCurrentTag:t.tagClick}})],1),t._v(" "),a("ModuleTransition",{attrs:{delay:"0.08"}},[a("note-abstract",{directives:[{name:"show",rawName:"v-show",value:t.recoShowModule,expression:"recoShowModule"}],staticClass:"list",attrs:{data:t.posts,currentPage:t.currentPage},on:{currentTag:t.$currentTags.key}})],1),t._v(" "),a("ModuleTransition",{attrs:{delay:"0.16"}},[a("pagation",{staticClass:"pagation",attrs:{total:t.posts.length,currentPage:t.currentPage},on:{getCurrentPage:t.getCurrentPage}})],1)],1)],1)}),[],!1,null,"c2f129e2",null);e.default=l.exports}}]);
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{236:function(t,e,a){},237:function(t,e,a){},238:function(t,e,a){},239:function(t,e,a){},241:function(t,e,a){"use strict";function n(){var t=["#e15b64","#f47e60","#f8b26a","#abbd81","#849b87","#e15b64","#f47e60","#f8b26a","#f26d6d","#67cc86","#fb9b5f","#3498db"];return t[Math.floor(Math.random()*t.length)]}a.d(e,"a",(function(){return n}))},243:function(t,e,a){"use strict";a(245),a(20),a(145),a(21),a(25);var n=a(45),r={props:{pageInfo:{type:Object,default:function(){return{}}},currentTag:{type:String,default:""},showAccessNumber:{type:Boolean,default:!1}},data:function(){return{numStyle:{fontSize:".9rem",fontWeight:"normal",color:"#999"}}},filters:{formatDateValue:function(t){if(!t)return"";t=t.replace("T"," ").slice(0,t.lastIndexOf("."));var e=Number(t.substr(11,2)),a=Number(t.substr(14,2)),r=Number(t.substr(17,2));return e>0||a>0||r>0?Object(n.d)(t):Object(n.d)(t,"yyyy-MM-dd")}},methods:{goTags:function(t){this.$router.push({path:"/tags/".concat(t,"/")})}}},s=(a(247),a(3)),o=Object(s.a)(r,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t.pageInfo.frontmatter.author||t.$themeConfig.author||t.$site.title?a("i",{staticClass:"iconfont reco-account"},[a("span",[t._v(t._s(t.pageInfo.frontmatter.author||t.$themeConfig.author||t.$site.title))])]):t._e(),t._v(" "),t.pageInfo.frontmatter.date?a("i",{staticClass:"iconfont reco-date"},[a("span",[t._v(t._s(t._f("formatDateValue")(t.pageInfo.frontmatter.date)))])]):t._e(),t._v(" "),!0===t.showAccessNumber?a("i",{staticClass:"iconfont reco-eye"},[a("AccessNumber",{attrs:{idVal:t.pageInfo.path,numStyle:t.numStyle}})],1):t._e(),t._v(" "),t.pageInfo.frontmatter.tags?a("i",{staticClass:"iconfont reco-tag tags"},t._l(t.pageInfo.frontmatter.tags,(function(e,n){return a("span",{key:n,staticClass:"tag-item",class:{active:t.currentTag==e},on:{click:function(a){return t.goTags(e)}}},[t._v("\n "+t._s(e)+"\n ")])})),0):t._e()])}),[],!1,null,"484a899e",null);e.a=o.exports},245:function(t,e,a){var n=a(0),r=a(246);n({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},246:function(t,e,a){"use strict";var n=a(17),r=a(33),s=a(11),o=a(26),c=a(19),i=Math.min,u=[].lastIndexOf,g=!!u&&1/[1].lastIndexOf(1,-0)<0,l=o("lastIndexOf"),f=c("indexOf",{ACCESSORS:!0,1:0}),m=g||!l||!f;t.exports=m?function(t){if(g)return u.apply(this,arguments)||0;var e=n(this),a=s(e.length),o=a-1;for(arguments.length>1&&(o=i(o,r(arguments[1]))),o<0&&(o=a+o);o>=0;o--)if(o in e&&e[o]===t)return o||0;return-1}:u},247:function(t,e,a){"use strict";var n=a(236);a.n(n).a},248:function(t,e,a){"use strict";var n=a(237);a.n(n).a},249:function(t,e,a){"use strict";var n=a(238);a.n(n).a},250:function(t,e,a){"use strict";a(143);e.a={methods:{_getStoragePage:function(){var t=window.location.pathname,e=JSON.parse(sessionStorage.getItem("currentPage"));return null===e||t!==e.path?(sessionStorage.setItem("currentPage",{page:1,path:""}),1):parseInt(e.page)},_setStoragePage:function(t){var e=window.location.pathname;sessionStorage.setItem("currentPage",JSON.stringify({page:t,path:e}))}}}},252:function(t,e,a){},253:function(t,e,a){},254:function(t,e,a){"use strict";a(20);var n={components:{PageInfo:a(243).a},props:["item","currentPage","currentTag"]},r=(a(248),a(3)),s={components:{NoteAbstractItem:Object(r.a)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"abstract-item"},[t.item.frontmatter.sticky?a("i",{staticClass:"iconfont reco-sticky"}):t._e(),t._v(" "),a("div",{staticClass:"title"},[t.item.frontmatter.keys?a("i",{staticClass:"iconfont reco-lock"}):t._e(),t._v(" "),a("router-link",{attrs:{to:t.item.path}},[t._v(t._s(t.item.title))])],1),t._v(" "),a("div",{staticClass:"abstract",domProps:{innerHTML:t._s(t.item.excerpt)}}),t._v(" "),a("hr",{staticClass:"hr"}),t._v(" "),a("PageInfo",{attrs:{pageInfo:t.item,currentTag:t.currentTag}})],1)}),[],!1,null,"28f76ce9",null).exports},props:["data","currentPage","currentTag"],computed:{currentPageData:function(){var t=10*this.currentPage-10,e=10*this.currentPage;return this.data.slice(t,e)}}},o=(a(249),Object(r.a)(s,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"abstract-wrapper"},t._l(t.currentPageData,(function(e){return a("NoteAbstractItem",{key:e.path,attrs:{item:e,currentPage:t.currentPage,currentTag:t.currentTag}})})),1)}),[],!1,null,"b014bc36",null));e.a=o.exports},255:function(t,e,a){"use strict";var n=a(239);a.n(n).a},257:function(t,e,a){"use strict";a(142);var n=a(24),r=a(241),s={props:{currentTag:{type:String,default:""}},computed:{tags:function(){return[{name:"全部",path:"/tag/"}].concat(Object(n.a)(this.$tags.list))}},methods:{tagClick:function(t){this.$emit("getCurrentTag",t)},getOneColor:r.a}},o=(a(255),a(3)),c=Object(o.a)(s,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"tags"},t._l(t.tags,(function(e,n){return a("span",{key:n,class:{active:e.name==t.currentTag},style:{backgroundColor:t.getOneColor()},on:{click:function(a){return t.tagClick(e)}}},[t._v(t._s(e.name))])})),0)}),[],!1,null,"36b9f66a",null);e.a=c.exports},281:function(t,e,a){"use strict";var n=a(252);a.n(n).a},282:function(t,e,a){"use strict";var n=a(253);a.n(n).a},284:function(t,e,a){},328:function(t,e,a){"use strict";var n=a(284);a.n(n).a},336:function(t,e,a){"use strict";a.r(e);a(32);var n=a(256),r=a(257),s=a(254),o=a(250),c=a(242),i=a(240),u={mixins:[o.a,i.a],components:{Common:n.a,NoteAbstract:s.a,TagList:r.a,ModuleTransition:c.a},data:function(){return{tags:[],currentTag:"全部",currentPage:1,allTagName:"全部"}},created:function(){this.$tags.list.length>0&&(this.currentTag=this.$route.query.tag?this.$route.query.tag:this.currentTag)},mounted:function(){this._setPage(this._getStoragePage())},methods:{tagClick:function(t){this.$router.push({path:t.path})},getCurrentTag:function(t){this.$emit("currentTag",t)},getCurrentPage:function(t){this._setPage(t),setTimeout((function(){window.scrollTo(0,0)}),100)},_setPage:function(t){this.currentPage=t,this.$page.currentPage=t,this._setStoragePage(t)}}},g=(a(281),a(282),a(328),a(3)),l=Object(g.a)(u,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"tags-wrapper"},[a("Common",{attrs:{sidebar:!1,isComment:!1}},[a("ModuleTransition",[a("TagList",{directives:[{name:"show",rawName:"v-show",value:t.recoShowModule,expression:"recoShowModule"}],attrs:{currentTag:t.currentTag},on:{getCurrentTag:t.tagClick}})],1),t._v(" "),a("ModuleTransition",{attrs:{delay:"0.08"}},[a("note-abstract",{directives:[{name:"show",rawName:"v-show",value:t.recoShowModule,expression:"recoShowModule"}],staticClass:"list",attrs:{data:t.$recoPosts,currentPage:t.currentPage,currentTag:t.currentTag},on:{currentTag:t.getCurrentTag}})],1),t._v(" "),a("ModuleTransition",{attrs:{delay:"0.16"}},[a("pagation",{staticClass:"pagation",attrs:{total:t.$recoPosts.length,currentPage:t.currentPage},on:{getCurrentPage:t.getCurrentPage}})],1)],1)],1)}),[],!1,null,"2a407e7f",null);e.default=l.exports}}]);
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{235:function(t,e,a){},236:function(t,e,a){},237:function(t,e,a){},238:function(t,e,a){},241:function(t,e,a){"use strict";function n(){var t=["#e15b64","#f47e60","#f8b26a","#abbd81","#849b87","#e15b64","#f47e60","#f8b26a","#f26d6d","#67cc86","#fb9b5f","#3498db"];return t[Math.floor(Math.random()*t.length)]}a.d(e,"a",(function(){return n}))},243:function(t,e,a){"use strict";a(245),a(20),a(145),a(21),a(25);var n=a(45),r={props:{pageInfo:{type:Object,default:function(){return{}}},currentTag:{type:String,default:""},showAccessNumber:{type:Boolean,default:!1}},data:function(){return{numStyle:{fontSize:".9rem",fontWeight:"normal",color:"#999"}}},filters:{formatDateValue:function(t){if(!t)return"";t=t.replace("T"," ").slice(0,t.lastIndexOf("."));var e=Number(t.substr(11,2)),a=Number(t.substr(14,2)),r=Number(t.substr(17,2));return e>0||a>0||r>0?Object(n.d)(t):Object(n.d)(t,"yyyy-MM-dd")}},methods:{goTags:function(t){this.$router.push({path:"/tags/".concat(t,"/")})}}},s=(a(247),a(3)),o=Object(s.a)(r,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t.pageInfo.frontmatter.author||t.$themeConfig.author||t.$site.title?a("i",{staticClass:"iconfont reco-account"},[a("span",[t._v(t._s(t.pageInfo.frontmatter.author||t.$themeConfig.author||t.$site.title))])]):t._e(),t._v(" "),t.pageInfo.frontmatter.date?a("i",{staticClass:"iconfont reco-date"},[a("span",[t._v(t._s(t._f("formatDateValue")(t.pageInfo.frontmatter.date)))])]):t._e(),t._v(" "),!0===t.showAccessNumber?a("i",{staticClass:"iconfont reco-eye"},[a("AccessNumber",{attrs:{idVal:t.pageInfo.path,numStyle:t.numStyle}})],1):t._e(),t._v(" "),t.pageInfo.frontmatter.tags?a("i",{staticClass:"iconfont reco-tag tags"},t._l(t.pageInfo.frontmatter.tags,(function(e,n){return a("span",{key:n,staticClass:"tag-item",class:{active:t.currentTag==e},on:{click:function(a){return t.goTags(e)}}},[t._v("\n "+t._s(e)+"\n ")])})),0):t._e()])}),[],!1,null,"484a899e",null);e.a=o.exports},244:function(t,e,a){"use strict";var n=a(235);a.n(n).a},245:function(t,e,a){var n=a(0),r=a(246);n({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},246:function(t,e,a){"use strict";var n=a(17),r=a(33),s=a(11),o=a(26),i=a(19),c=Math.min,u=[].lastIndexOf,l=!!u&&1/[1].lastIndexOf(1,-0)<0,f=o("lastIndexOf"),g=i("indexOf",{ACCESSORS:!0,1:0}),p=l||!f||!g;t.exports=p?function(t){if(l)return u.apply(this,arguments)||0;var e=n(this),a=s(e.length),o=a-1;for(arguments.length>1&&(o=c(o,r(arguments[1]))),o<0&&(o=a+o);o>=0;o--)if(o in e&&e[o]===t)return o||0;return-1}:u},247:function(t,e,a){"use strict";var n=a(236);a.n(n).a},248:function(t,e,a){"use strict";var n=a(237);a.n(n).a},249:function(t,e,a){"use strict";var n=a(238);a.n(n).a},250:function(t,e,a){"use strict";a(143);e.a={methods:{_getStoragePage:function(){var t=window.location.pathname,e=JSON.parse(sessionStorage.getItem("currentPage"));return null===e||t!==e.path?(sessionStorage.setItem("currentPage",{page:1,path:""}),1):parseInt(e.page)},_setStoragePage:function(t){var e=window.location.pathname;sessionStorage.setItem("currentPage",JSON.stringify({page:t,path:e}))}}}},251:function(t,e,a){},254:function(t,e,a){"use strict";a(20);var n={components:{PageInfo:a(243).a},props:["item","currentPage","currentTag"]},r=(a(248),a(3)),s={components:{NoteAbstractItem:Object(r.a)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"abstract-item"},[t.item.frontmatter.sticky?a("i",{staticClass:"iconfont reco-sticky"}):t._e(),t._v(" "),a("div",{staticClass:"title"},[t.item.frontmatter.keys?a("i",{staticClass:"iconfont reco-lock"}):t._e(),t._v(" "),a("router-link",{attrs:{to:t.item.path}},[t._v(t._s(t.item.title))])],1),t._v(" "),a("div",{staticClass:"abstract",domProps:{innerHTML:t._s(t.item.excerpt)}}),t._v(" "),a("hr",{staticClass:"hr"}),t._v(" "),a("PageInfo",{attrs:{pageInfo:t.item,currentTag:t.currentTag}})],1)}),[],!1,null,"28f76ce9",null).exports},props:["data","currentPage","currentTag"],computed:{currentPageData:function(){var t=10*this.currentPage-10,e=10*this.currentPage;return this.data.slice(t,e)}}},o=(a(249),Object(r.a)(s,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"abstract-wrapper"},t._l(t.currentPageData,(function(e){return a("NoteAbstractItem",{key:e.path,attrs:{item:e,currentPage:t.currentPage,currentTag:t.currentTag}})})),1)}),[],!1,null,"b014bc36",null));e.a=o.exports},274:function(t,e,a){"use strict";var n=a(251);a.n(n).a},275:function(t,e,a){},320:function(t,e,a){"use strict";var n=a(275);a.n(n).a},334:function(t,e,a){"use strict";a.r(e);a(32);var n=a(256),r=a(254),s=a(242),o=a(250),i=a(43),c=a(241),u=a(240),l={mixins:[o.a,u.a],components:{Common:n.a,NoteAbstract:r.a,ModuleTransition:s.a},data:function(){return{currentPage:1}},computed:{posts:function(){var t=this.$currentCategories.pages;return t=Object(i.a)(t),Object(i.c)(t),t},title:function(){return this.$currentCategories.key}},mounted:function(){this._setPage(this._getStoragePage())},methods:{getCurrentTag:function(t){this.$emit("currentTag",t)},getCurrentPage:function(t){this._setPage(t),setTimeout((function(){window.scrollTo(0,0)}),100)},_setPage:function(t){this.currentPage=t,this.$page.currentPage=t,this._setStoragePage(t)},getOneColor:c.a},watch:{$route:function(){this._setPage(this._getStoragePage())}}},f=(a(244),a(274),a(320),a(3)),g=Object(f.a)(l,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"categories-wrapper"},[a("Common",{attrs:{sidebar:!1,isComment:!1}},[a("ModuleTransition",[a("ul",{directives:[{name:"show",rawName:"v-show",value:t.recoShowModule,expression:"recoShowModule"}],staticClass:"category-wrapper"},t._l(this.$categories.list,(function(e,n){return a("li",{key:n,staticClass:"category-item",class:t.title==e.name?"active":""},[a("router-link",{attrs:{to:e.path}},[a("span",{staticClass:"category-name"},[t._v(t._s(e.name))]),t._v(" "),a("span",{staticClass:"post-num",style:{backgroundColor:t.getOneColor()}},[t._v(t._s(e.pages.length))])])],1)})),0)]),t._v(" "),a("ModuleTransition",{attrs:{delay:"0.08"}},[a("note-abstract",{directives:[{name:"show",rawName:"v-show",value:t.recoShowModule,expression:"recoShowModule"}],staticClass:"list",attrs:{data:t.posts,currentPage:t.currentPage},on:{currentTag:t.getCurrentTag}})],1),t._v(" "),a("ModuleTransition",{attrs:{delay:"0.16"}},[a("pagation",{staticClass:"pagation",attrs:{total:t.posts.length,currentPage:t.currentPage},on:{getCurrentPage:t.getCurrentPage}})],1)],1)],1)}),[],!1,null,"7d81bf34",null);e.default=g.exports}}]);
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{235:function(e,t,n){},244:function(e,t,n){"use strict";var o=n(235);n.n(o).a},258:function(e,t,n){},296:function(e,t,n){"use strict";var o=n(258);n.n(o).a},333:function(e,t,n){"use strict";n.r(t);var o=["There's nothing here.","How did we get here?","That's a Four-Oh-Four.","Looks like we've got some broken links."],r={computed:{noFoundPageByTencent:function(){return!1!==this.$themeConfig.noFoundPageByTencent}},mounted:function(){if(this.noFoundPageByTencent){var e=document.createElement("script");e.setAttribute("homePageName","回到首页"),e.setAttribute("homePageUrl","/"),e.setAttribute("src","//qzonestyle.gtimg.cn/qzone/hybrid/app/404/search_children.js"),document.body.append(e)}},methods:{getMsg:function(){return o[Math.floor(Math.random()*o.length)]}}},s=(n(244),n(296),n(3)),i=Object(s.a)(r,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.noFoundPageByTencent?e._e():n("div",{staticClass:"theme-container"},[n("div",{staticClass:"content"},[n("h1",[e._v("404")]),e._v(" "),n("blockquote",[e._v(e._s(e.getMsg()))]),e._v(" "),n("router-link",{attrs:{to:"/"}},[e._v("Take me home.")])],1)])}),[],!1,null,null,null);t.default=i.exports}}]);
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{235:function(e,t,a){},244:function(e,t,a){"use strict";var n=a(235);a.n(n).a},285:function(e,t,a){},329:function(e,t,a){"use strict";var n=a(285);a.n(n).a},337:function(e,t,a){"use strict";a.r(t);a(142),a(146),a(147),a(67),a(21),a(25),a(148);var n=a(256),o=a(242),r={mixins:[a(240).a],name:"TimeLine",components:{Common:n.a,ModuleTransition:o.a},filters:{dateFormat:function(e,t){e=function(e){var t=new Date(e).toJSON();return new Date(+new Date(t)+288e5).toISOString().replace(/T/g," ").replace(/\.[\d]{3}Z/,"").replace(/-/g,"/")}(e);var a=new Date(e),n=a.getMonth()+1,o=a.getDate();return"".concat(n,"-").concat(o)}},methods:{go:function(e){this.$router.push({path:e})}}},s=(a(244),a(329),a(3)),i=Object(s.a)(r,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("Common",{attrs:{sidebar:!1,isComment:!1}},[a("ul",{staticClass:"timeline-wrapper"},[a("ModuleTransition",[a("li",{directives:[{name:"show",rawName:"v-show",value:e.recoShowModule,expression:"recoShowModule"}],staticClass:"desc"},[e._v("Yesterday Once More!")])]),e._v(" "),e._l(e.$recoPostsForTimeline,(function(t,n){return a("ModuleTransition",{key:n,attrs:{delay:String(.08*(n+1))}},[a("li",{directives:[{name:"show",rawName:"v-show",value:e.recoShowModule,expression:"recoShowModule"}]},[a("h3",{staticClass:"year"},[e._v(e._s(t.year))]),e._v(" "),a("ul",{staticClass:"year-wrapper"},e._l(t.data,(function(t,n){return a("li",{key:n},[a("span",{staticClass:"date"},[e._v(e._s(e._f("dateFormat")(t.frontmatter.date)))]),e._v(" "),a("span",{staticClass:"title",on:{click:function(a){return e.go(t.path)}}},[e._v(e._s(t.title))])])})),0)])])}))],2)])],1)}),[],!1,null,"3cbc0e8d",null);t.default=i.exports}}]);
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{286:function(t,s,e){},330:function(t,s,e){"use strict";var a=e(286);e.n(a).a},338:function(t,s,e){"use strict";e.r(s);e(67),e(32);var a={data:function(){return{deg:6}},methods:{},watch:{},mounted:function(){var t=this;setInterval((function(){var s=new Date,e=5*s.getHours()*t.deg,a=s.getMinutes()*t.deg,n=s.getSeconds()*t.deg;t.$refs.hh.style.transform="rotateZ(".concat(e+a/12,"deg)"),t.$refs.mm.style.transform="rotateZ(".concat(a,"deg)"),t.$refs.ss.style.transform="rotateZ(".concat(n,"deg)")}),1e3)}},n=(e(330),e(3)),r=Object(n.a)(a,(function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"wrap",attrs:{id:"clock"}},[s("div",{staticClass:"clock"},[s("div",{ref:"hh",staticClass:"hour"}),this._v(" "),s("div",{ref:"mm",staticClass:"min"}),this._v(" "),s("div",{ref:"ss",staticClass:"sec"})])])}),[],!1,null,"730a23f4",null);s.default=r.exports}}]);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment