From 1c3469a02b4b7e231c8077c08c45d59729e60f7d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A6=82=E6=84=8F=20=E5=BD=AD?= <2417589739@qq.com>
Date: Wed, 29 Jun 2022 15:20:10 +0800
Subject: [PATCH] =?UTF-8?q?Web=20api=20=E6=8E=A5=E5=8F=A3=E6=B5=8B?=
=?UTF-8?q?=E8=AF=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controllers/robotjobController.cs | 16 +++++++--------
BPASmartClient.HubHelper/HubHelper.cs | 17 +++++-----------
.../FryPot_DosingSystem.csproj | 1 +
FryPot_DosingSystem/View/MainWindow.xaml.cs | 20 ++++++++++++++++---
TestDemo/Form1.Designer.cs | 13 ++++++++++++
TestDemo/Form1.cs | 13 ++++++++++--
6 files changed, 55 insertions(+), 25 deletions(-)
diff --git a/BPASmartClient.AgvApi/Controllers/robotjobController.cs b/BPASmartClient.AgvApi/Controllers/robotjobController.cs
index 686278d0..a0c6865d 100644
--- a/BPASmartClient.AgvApi/Controllers/robotjobController.cs
+++ b/BPASmartClient.AgvApi/Controllers/robotjobController.cs
@@ -15,13 +15,13 @@ namespace BPASmartClient.AgvApi.Controllers
///
///
[HttpPost("report")]
- public string report(string ent)
+ public string report(string sign)
{
- if (ent != null)
+ if (sign != null)
{
try
{
- var res = JsonConvert.DeserializeObject(ent);
+ var res = JsonConvert.DeserializeObject(sign);
if (res != null)
{
Factory.GetInstance.SendReport(res);
@@ -40,19 +40,19 @@ namespace BPASmartClient.AgvApi.Controllers
///
/// AGV上下料交互请求接口
///
- ///
+ ///
///
[HttpPost("upstreamrequest")]
- public string upstreamrequest(string upstreamrequest)
+ public string upstreamrequest(string sign)
{
- if (upstreamrequest != null)
+ if (sign != null)
{
try
{
- var res = JsonConvert.DeserializeObject(upstreamrequest);
+ var res = JsonConvert.DeserializeObject(sign);
if (res != null)
{
- Factory.GetInstance.SendUpstreamrequest(upstreamrequest);
+ Factory.GetInstance.SendUpstreamrequest(sign);
return "SUCCESS";
}
}
diff --git a/BPASmartClient.HubHelper/HubHelper.cs b/BPASmartClient.HubHelper/HubHelper.cs
index eac1b90b..c5443b3a 100644
--- a/BPASmartClient.HubHelper/HubHelper.cs
+++ b/BPASmartClient.HubHelper/HubHelper.cs
@@ -13,20 +13,13 @@ namespace BPASmartClient.HubHelper
HubConnection hubConnection;
- public void Connect()
+ public void Connect(string ip, int port)
{
- hubConnection = new HubConnectionBuilder().WithAutomaticReconnect().WithUrl("http://localhost:8089/personhub").Build();//连接
- hubConnection.On