Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO827-AutoScanAndLabel
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 1a7b2329
由
张东亮
编写于
2023-01-18 19:59:20 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
959d8cdd
全部展开
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
13 行增加
和
19 行删除
DeviceLibrary/AGVManager.cs
DeviceLibrary/AGVService/Controllers/taskNotificationController.cs → DeviceLibrary/AGVService/Controllers/notificationController.cs
DeviceLibrary/AGVService/Schemas/RtnData.cs
DeviceLibrary/DeviceLibrary.csproj
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
DeviceLibrary/AGVManager.cs
查看文件 @
1a7b232
此文件的差异被折叠,
点击展开。
DeviceLibrary/AGVService/Controllers/
taskN
otificationController.cs
→
DeviceLibrary/AGVService/Controllers/
n
otificationController.cs
查看文件 @
1a7b232
...
@@ -13,7 +13,7 @@ namespace DeviceLibrary.AGVService.Controllers
...
@@ -13,7 +13,7 @@ namespace DeviceLibrary.AGVService.Controllers
/// 任务执行通知
/// 任务执行通知
/// </summary>
/// </summary>
[
RoutePrefix
(
"nepconSmf/notification"
)]
[
RoutePrefix
(
"nepconSmf/notification"
)]
public
class
taskN
otificationController
:
ApiController
public
class
n
otificationController
:
ApiController
{
{
[
HttpPost
]
[
HttpPost
]
public
RtnData
taskStatus
([
FromBody
]
NotificationDto
dto
)
public
RtnData
taskStatus
([
FromBody
]
NotificationDto
dto
)
...
...
DeviceLibrary/AGVService/Schemas/RtnData.cs
查看文件 @
1a7b232
...
@@ -8,7 +8,7 @@ namespace DeviceLibrary.AGVService.Schemas
...
@@ -8,7 +8,7 @@ namespace DeviceLibrary.AGVService.Schemas
{
{
public
class
RtnData
public
class
RtnData
{
{
public
int
code
{
get
;
set
;
}
=
0
;
public
int
code
{
get
;
set
;
}
=
20
0
;
public
object
data
{
get
;
set
;
}
public
object
data
{
get
;
set
;
}
public
string
msg
{
get
;
set
;
}
=
"ok"
;
public
string
msg
{
get
;
set
;
}
=
"ok"
;
}
}
...
...
DeviceLibrary/DeviceLibrary.csproj
查看文件 @
1a7b232
...
@@ -87,7 +87,7 @@
...
@@ -87,7 +87,7 @@
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Compile Include="AGVService\Controllers\deviceOperateController.cs" />
<Compile Include="AGVService\Controllers\deviceOperateController.cs" />
<Compile Include="AGVService\Controllers\
taskN
otificationController.cs" />
<Compile Include="AGVService\Controllers\
n
otificationController.cs" />
<Compile Include="AGVService\HttpService.cs" />
<Compile Include="AGVService\HttpService.cs" />
<Compile Include="AGVService\Schemas\DeviceCheckDto.cs" />
<Compile Include="AGVService\Schemas\DeviceCheckDto.cs" />
<Compile Include="AGVService\Schemas\NotificationDto.cs" />
<Compile Include="AGVService\Schemas\NotificationDto.cs" />
...
...
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
查看文件 @
1a7b232
...
@@ -46,23 +46,10 @@ namespace DeviceLibrary
...
@@ -46,23 +46,10 @@ namespace DeviceLibrary
private
void
ServerConnectTimer_Elapsed
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
private
void
ServerConnectTimer_Elapsed
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
{
{
if
(
Monitor
.
TryEnter
(
serverConnectTimer
))
{
try
{
if
(!
server
.
StartsWith
(
"http"
))
if
(!
server
.
StartsWith
(
"http"
))
return
;
return
;
SendLineStatus
();
SendLineStatus
();
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
$
"ServerConnectTimer_Elapsed:{ex}"
);
}
finally
{
Monitor
.
Exit
(
serverConnectTimer
);
}
}
}
}
public
void
StartConnectServer
()
public
void
StartConnectServer
()
{
{
...
@@ -164,7 +151,8 @@ namespace DeviceLibrary
...
@@ -164,7 +151,8 @@ namespace DeviceLibrary
{
{
if
(
RobotManage
.
IsDebug
)
if
(
RobotManage
.
IsDebug
)
return
;
return
;
try
{
lock
(
serverclock
)
lock
(
serverclock
)
{
{
bool
printlog
=
false
;
bool
printlog
=
false
;
...
@@ -188,6 +176,12 @@ namespace DeviceLibrary
...
@@ -188,6 +176,12 @@ namespace DeviceLibrary
}
}
}
}
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"SendLineStatus"
,
ex
);
}
}
public
bool
SendAgvLog
(
string
msg
)
public
bool
SendAgvLog
(
string
msg
)
{
{
lock
(
serverclock
)
lock
(
serverclock
)
...
@@ -198,7 +192,7 @@ namespace DeviceLibrary
...
@@ -198,7 +192,7 @@ namespace DeviceLibrary
{
{
new
AgvLogInfo
(
msg
)
new
AgvLogInfo
(
msg
)
};
};
LogUtil
.
info
(
JsonHelper
.
SerializeObject
(
operation
));
//
LogUtil.info(JsonHelper.SerializeObject(operation));
Operation
resultOperation
=
HttpHelper
.
Post
(
GetPostApi
(),
operation
,
5000
);
Operation
resultOperation
=
HttpHelper
.
Post
(
GetPostApi
(),
operation
,
5000
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论