文档添加演示站点

This commit is contained in:
Kimdiego2098
2024-01-26 11:09:13 +08:00
parent 3a9f745a2d
commit 495806d5e3
54 changed files with 250 additions and 246 deletions

10
doc/build/404.html vendored

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
"use strict";(self.webpackChunkthingsgateway=self.webpackChunkthingsgateway||[]).push([[8976],{137:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>i,contentTitle:()=>o,default:()=>d,frontMatter:()=>r,metadata:()=>s,toc:()=>c});var a=n(7462),l=(n(7294),n(3905));n(4996),n(510),n(2969);const r={id:20005,title:"Dlt645"},o=void 0,s={unversionedId:"20005",id:"20005",title:"Dlt645",description:"\u5b9a\u4e49",source:"@site/docs/20005.mdx",sourceDirName:".",slug:"/20005",permalink:"/thingsgateway-docs/docs/20005",draft:!1,editUrl:"https://gitee.com/diego2098/ThingsGateway/tree/master/doc/docs/20005.mdx",tags:[],version:"current",lastUpdatedBy:"Kimdiego2098",lastUpdatedAt:1705826523,formattedLastUpdatedAt:"Jan 21, 2024",frontMatter:{id:"20005",title:"Dlt645"},sidebar:"docs",previous:{title:"OpcUa",permalink:"/thingsgateway-docs/docs/20004"},next:{title:"\u8054\u7cfb\u6211\u4eec",permalink:"/thingsgateway-docs/docs/1002"}},i={},c=[{value:"\u5b9a\u4e49",id:"\u5b9a\u4e49",level:2},{value:"\u4e00\u3001\u8bf4\u660e",id:"\u4e00\u8bf4\u660e",level:2},{value:"\u4e8c\u3001\u65b0\u5efa",id:"\u4e8c\u65b0\u5efa",level:2}],p={toc:c},u="wrapper";function d(t){let{components:e,...n}=t;return(0,l.kt)(u,(0,a.Z)({},p,n,{components:e,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"\u5b9a\u4e49"},"\u5b9a\u4e49"),(0,l.kt)("p",null,"\u7a0b\u5e8f\u96c6\uff1a",(0,l.kt)("a",{parentName:"p",href:"https://www.nuget.org/packages/ThingsGateway.Foundation.Dlt645"},"ThingsGateway.Foundation.Dlt645")),(0,l.kt)("h2",{id:"\u4e00\u8bf4\u660e"},"\u4e00\u3001\u8bf4\u660e"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"ThingsGateway.Foundation.Dlt645"),"\u662f\u5bf9\u4e8eDlt645-2007\u534f\u8bae\u7684\u5c01\u88c5\u7c7b\u5e93"),(0,l.kt)("p",null,"\u652f\u6301\u591a\u4e2a\u901a\u8baf\u94fe\u8def\uff1aTcp/Udp/SerialPort"),(0,l.kt)("h2",{id:"\u4e8c\u65b0\u5efa"},"\u4e8c\u3001\u65b0\u5efa"),(0,l.kt)("p",null,"1\u3001\u521b\u5efaDlt645Master"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},' /// <summary>\n /// \u65b0\u5efa\u94fe\u8def\n /// </summary>\n /// <returns></returns>\n public IChannel GetChannel()\n {\n TouchSocketConfig touchSocketConfig = new TouchSocketConfig();\n return touchSocketConfig.GetSerialPortWithOption(new("COM1")); //\u76f4\u63a5\u83b7\u53d6\u4e32\u53e3\u5bf9\u8c61\n //return touchSocketConfig.GetChannel(ChannelTypeEnum.SerialPortClient, null, null, new("COM1"));//\u901a\u8fc7\u94fe\u8def\u679a\u4e3e\u83b7\u53d6\u5bf9\u8c61\n }\n\n /// <summary>\n /// \u65b0\u5efa\u534f\u8bae\u5bf9\u8c61\n /// </summary>\n /// <param name="channel"></param>\n /// <returns></returns>\n public IProtocol GetProtocol(IChannel channel)\n {\n var client = new Dlt645_2007Master(channel);\n client.Station = "311111111114";//\u8868\u53f7\n return client;\n }\n')),(0,l.kt)("p",null,"2\u3001\u8bfb\u5199\u64cd\u4f5c"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},' Dlt645MasterTest dlt645MasterTest = new Dlt645MasterTest();\n var channel = dlt645MasterTest.GetChannel();\n var protocol = dlt645MasterTest.GetProtocol(channel);\n var data = await protocol.ReadDoubleAsync("02010100"); //\u8bfb\u53d6A\u76f8\u7535\u538b\n\n')),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"02010100"),"\u662fDlt645\u4e2d\u7684\u5730\u5740\u8868\u793a\u65b9\u5f0f\uff0c\u4ee3\u8868A\u76f8\u7535\u538b\uff0c\u8bf7\u67e5\u770b\u76f8\u5173\u534f\u8bae\u6587\u6863\uff0c\u53ef\u5728\u6e90\u7801\u9644\u4ef6\u4e2d\u627e\u5230\u6587\u6863"),(0,l.kt)("p",null,"3\u3001\u5176\u4ed6\u65b9\u6cd5"),(0,l.kt)("p",null,"\u4fee\u6539\u5bc6\u7801"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"}," var result = await protocol.WritePasswordAsync(level, oldPassword, newPassword);\n")),(0,l.kt)("p",null,"\u66f4\u6539\u8868\u53f7"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"}," var result = await protocol.WriteDeviceStationAsync(station);\n")),(0,l.kt)("p",null,"\u4fee\u6539\u6ce2\u7279\u7387"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"}," var result = await protocol.WriteBaudRateAsync(baudRate);\n")),(0,l.kt)("p",null,"\u8bfb\u53d6\u8868\u53f7"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"}," var result = await protocol.ReadDeviceStationAsync;\n")))}d.isMDXComponent=!0}}]);
"use strict";(self.webpackChunkthingsgateway=self.webpackChunkthingsgateway||[]).push([[8976],{137:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>i,contentTitle:()=>o,default:()=>d,frontMatter:()=>r,metadata:()=>s,toc:()=>c});var a=n(7462),l=(n(7294),n(3905));n(4996),n(510),n(2969);const r={id:20005,title:"Dlt645"},o=void 0,s={unversionedId:"20005",id:"20005",title:"Dlt645",description:"\u5b9a\u4e49",source:"@site/docs/20005.mdx",sourceDirName:".",slug:"/20005",permalink:"/thingsgateway-docs/docs/20005",draft:!1,editUrl:"https://gitee.com/diego2098/ThingsGateway/tree/master/doc/docs/20005.mdx",tags:[],version:"current",lastUpdatedBy:"Kimdiego2098",lastUpdatedAt:1706236999,formattedLastUpdatedAt:"Jan 26, 2024",frontMatter:{id:"20005",title:"Dlt645"},sidebar:"docs",previous:{title:"OpcUa",permalink:"/thingsgateway-docs/docs/20004"},next:{title:"\u8054\u7cfb\u6211\u4eec",permalink:"/thingsgateway-docs/docs/1002"}},i={},c=[{value:"\u5b9a\u4e49",id:"\u5b9a\u4e49",level:2},{value:"\u4e00\u3001\u8bf4\u660e",id:"\u4e00\u8bf4\u660e",level:2},{value:"\u4e8c\u3001\u65b0\u5efa",id:"\u4e8c\u65b0\u5efa",level:2}],p={toc:c},u="wrapper";function d(t){let{components:e,...n}=t;return(0,l.kt)(u,(0,a.Z)({},p,n,{components:e,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"\u5b9a\u4e49"},"\u5b9a\u4e49"),(0,l.kt)("p",null,"\u7a0b\u5e8f\u96c6\uff1a",(0,l.kt)("a",{parentName:"p",href:"https://www.nuget.org/packages/ThingsGateway.Foundation.Dlt645"},"ThingsGateway.Foundation.Dlt645")),(0,l.kt)("h2",{id:"\u4e00\u8bf4\u660e"},"\u4e00\u3001\u8bf4\u660e"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"ThingsGateway.Foundation.Dlt645"),"\u662f\u5bf9\u4e8eDlt645-2007\u534f\u8bae\u7684\u5c01\u88c5\u7c7b\u5e93"),(0,l.kt)("p",null,"\u652f\u6301\u591a\u4e2a\u901a\u8baf\u94fe\u8def\uff1aTcp/Udp/SerialPort"),(0,l.kt)("h2",{id:"\u4e8c\u65b0\u5efa"},"\u4e8c\u3001\u65b0\u5efa"),(0,l.kt)("p",null,"1\u3001\u521b\u5efaDlt645Master"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},' /// <summary>\n /// \u65b0\u5efa\u94fe\u8def\n /// </summary>\n /// <returns></returns>\n public IChannel GetChannel()\n {\n TouchSocketConfig touchSocketConfig = new TouchSocketConfig();\n return touchSocketConfig.GetSerialPortWithOption(new("COM1")); //\u76f4\u63a5\u83b7\u53d6\u4e32\u53e3\u5bf9\u8c61\n //return touchSocketConfig.GetChannel(ChannelTypeEnum.SerialPortClient, null, null, new("COM1"));//\u901a\u8fc7\u94fe\u8def\u679a\u4e3e\u83b7\u53d6\u5bf9\u8c61\n }\n\n /// <summary>\n /// \u65b0\u5efa\u534f\u8bae\u5bf9\u8c61\n /// </summary>\n /// <param name="channel"></param>\n /// <returns></returns>\n public IProtocol GetProtocol(IChannel channel)\n {\n var client = new Dlt645_2007Master(channel);\n client.Station = "311111111114";//\u8868\u53f7\n return client;\n }\n')),(0,l.kt)("p",null,"2\u3001\u8bfb\u5199\u64cd\u4f5c"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},' Dlt645MasterTest dlt645MasterTest = new Dlt645MasterTest();\n var channel = dlt645MasterTest.GetChannel();\n var protocol = dlt645MasterTest.GetProtocol(channel);\n var data = await protocol.ReadDoubleAsync("02010100"); //\u8bfb\u53d6A\u76f8\u7535\u538b\n\n')),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"02010100"),"\u662fDlt645\u4e2d\u7684\u5730\u5740\u8868\u793a\u65b9\u5f0f\uff0c\u4ee3\u8868A\u76f8\u7535\u538b\uff0c\u8bf7\u67e5\u770b\u76f8\u5173\u534f\u8bae\u6587\u6863\uff0c\u53ef\u5728\u6e90\u7801\u9644\u4ef6\u4e2d\u627e\u5230\u6587\u6863"),(0,l.kt)("p",null,"3\u3001\u5176\u4ed6\u65b9\u6cd5"),(0,l.kt)("p",null,"\u4fee\u6539\u5bc6\u7801"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"}," var result = await protocol.WritePasswordAsync(level, oldPassword, newPassword);\n")),(0,l.kt)("p",null,"\u66f4\u6539\u8868\u53f7"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"}," var result = await protocol.WriteDeviceStationAsync(station);\n")),(0,l.kt)("p",null,"\u4fee\u6539\u6ce2\u7279\u7387"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"}," var result = await protocol.WriteBaudRateAsync(baudRate);\n")),(0,l.kt)("p",null,"\u8bfb\u53d6\u8868\u53f7"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"}," var result = await protocol.ReadDeviceStationAsync;\n")))}d.isMDXComponent=!0}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

10
doc/build/index.html vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -42,7 +42,11 @@ module.exports = {
position: "left",
to: "docs/upgrade"
},
{
label: "演示",
position: "right",
href: "http://120.24.62.140:5000",
},
{
label: "源码",
position: "right",