Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
SO1131-AGVDispatch
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 233510f1
由
张东亮
编写于
2023-06-14 14:51:03 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
9a35a1c9
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
37 行增加
和
19 行删除
.vs/SO1131-AGVDispatch/v17/.suo
Source/AGVDispatch/bin/Debug/DeviceLib.dll
Source/AGVDispatch/bin/Debug/DeviceLib.pdb
Source/AGVDispatch/bin/ProCopyClient.exe.config
Source/AGVDispatch/obj/Debug/AGVDispatch.csproj.AssemblyReference.cache
Source/Common/obj/Debug/Common.csproj.AssemblyReference.cache
Source/DeviceLib/bin/Debug/DeviceLib.dll
Source/DeviceLib/bin/Debug/DeviceLib.pdb
Source/DeviceLib/bll/Context.cs
Source/DeviceLib/bll/manager/RobotManager.cs
Source/DeviceLib/obj/Debug/DeviceLib.csproj.AssemblyReference.cache
Source/DeviceLib/obj/Debug/DeviceLib.dll
Source/DeviceLib/obj/Debug/DeviceLib.pdb
Source/UIControls/bin/Debug/DeviceLib.dll
Source/UIControls/bin/Debug/DeviceLib.pdb
Source/UIControls/obj/Debug/UIControl.csproj.AssemblyReference.cache
.vs/SO1131-AGVDispatch/v17/.suo
查看文件 @
233510f
此文件类型无法预览
Source/AGVDispatch/bin/Debug/DeviceLib.dll
查看文件 @
233510f
此文件类型无法预览
Source/AGVDispatch/bin/Debug/DeviceLib.pdb
查看文件 @
233510f
此文件类型无法预览
Source/AGVDispatch/bin/ProCopyClient.exe.config
查看文件 @
233510f
...
...
@@ -4,6 +4,6 @@
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.6.1"
/>
</
startup
>
<
appSettings
>
<
add
key
=
"ProName"
value
=
"AGVDispatch-
待机点不显示
"
/>
<
add
key
=
"ProName"
value
=
"AGVDispatch-
添加上报日志打印
"
/>
</
appSettings
>
</
configuration
>
\ No newline at end of file
Source/AGVDispatch/obj/Debug/AGVDispatch.csproj.AssemblyReference.cache
查看文件 @
233510f
此文件类型无法预览
Source/Common/obj/Debug/Common.csproj.AssemblyReference.cache
查看文件 @
233510f
此文件类型无法预览
Source/DeviceLib/bin/Debug/DeviceLib.dll
查看文件 @
233510f
此文件类型无法预览
Source/DeviceLib/bin/Debug/DeviceLib.pdb
查看文件 @
233510f
此文件类型无法预览
Source/DeviceLib/bll/Context.cs
查看文件 @
233510f
...
...
@@ -8,7 +8,7 @@ namespace DeviceLib.BLL
public
class
Context
{
static
Thread
threadRobotCall
;
static
int
interval
=
3
00
;
static
int
interval
=
10
00
;
static
bool
isLoad
=
false
;
static
bool
loop
=
false
;
...
...
Source/DeviceLib/bll/manager/RobotManager.cs
查看文件 @
233510f
...
...
@@ -62,7 +62,7 @@ namespace DeviceLib.BLL
/// <returns></returns>
public
static
bool
RobotIsInNode
(
string
nodename
)
{
return
robots
.
Find
(
s
=>
s
?.
mission_state
?.
node_name
.
Equals
(
nodename
)
??
false
)!=
null
;
return
robots
.
Find
(
s
=>
s
?.
mission_state
?.
node_name
.
Equals
(
nodename
)
??
false
)
!=
null
;
}
/// <summary>
/// 获取可执行任务的机器人
...
...
@@ -87,7 +87,7 @@ namespace DeviceLib.BLL
public
static
void
SetRobot
(
Robot
robot
)
{
ConfigOperation
.
SetRobot
(
robot
);
}
}
public
static
void
SetDebug
(
int
id
,
bool
debug
)
{
Robot
robot
=
getRobot
(
id
);
...
...
@@ -129,31 +129,32 @@ namespace DeviceLib.BLL
}
}
static
Dictionary
<
string
,
string
>
uploadStr
=
new
Dictionary
<
string
,
string
>();
public
static
void
UploadState
(
Robot
robot
)
{
try
{
AgvStatus
agv
=
new
AgvStatus
()
AgvStatus
agv
=
new
AgvStatus
()
{
name
=
robot
.
name
,
elec
=
robot
?.
status
?.
battery_percentage
.
ToString
(
"f2"
),
type
=
robot
.
id
};
if
(
robot
.
job
!=
null
)
type
=
robot
.
id
};
if
(
robot
.
job
!=
null
)
{
if
(
robot
.
job
is
StandbyJob
)
if
(
robot
.
job
is
StandbyJob
)
{
agv
.
loc
=
"STANDBY"
;
}
else
if
(
robot
.
job
is
ChargeJob
)
else
if
(
robot
.
job
is
ChargeJob
)
{
agv
.
loc
=
"CHARGE"
;
}
else
if
(
robot
.
job
is
CommLineJob
||
robot
.
job
is
ToStoreJob
)
else
if
(
robot
.
job
is
CommLineJob
||
robot
.
job
is
ToStoreJob
)
{
agv
.
loc
=
"TAKE"
;
}
else
if
(
robot
.
job
.
JobParam
.
LineNode
!=
null
)
else
if
(
robot
.
job
.
JobParam
.
LineNode
!=
null
)
{
agv
.
loc
=
robot
.
job
.
JobParam
.
LineNode
.
name
;
}
...
...
@@ -170,21 +171,38 @@ namespace DeviceLib.BLL
{
if
(!
string
.
IsNullOrEmpty
(
robot
.
mission_state
.
node_name
))
{
if
(
Setting_Str
.
standby
.
Equals
(
robot
.
mission_state
.
node_name
))
if
(
Setting_Str
.
standby
.
Equals
(
robot
.
mission_state
.
node_name
))
{
agv
.
loc
=
"STANDBY"
;
}
else
if
(
Setting_Str
.
Charge
.
Equals
(
robot
.
mission_state
.
node_name
))
else
if
(
Setting_Str
.
Charge
.
Equals
(
robot
.
mission_state
.
node_name
))
{
agv
.
loc
=
"CHARGE"
;
}
}
}
HttpManager
.
UpdateAgvStatus
(
new
List
<
AgvStatus
>
{
agv
});
HttpManager
.
UpdateAgvStatus
(
new
List
<
AgvStatus
>
{
agv
});
string
json
=
JsonHelper
.
SerializeObject
(
agv
);
if
(!
uploadStr
.
ContainsKey
(
agv
.
name
))
{
uploadStr
.
Add
(
agv
.
name
,
json
);
LogUtil
.
Info
(
$
"Upload AGV State:{json}"
);
}
else
{
if
(!
string
.
IsNullOrEmpty
(
json
))
{
if
(!
json
.
Equals
(
uploadStr
[
agv
.
name
]))
{
uploadStr
[
agv
.
name
]
=
json
;
LogUtil
.
Info
(
$
"Upload AGV State:{json}"
);
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
LogUtil
.
Error
(
$
"{robot.name} 上报状态失败"
,
ex
);
LogUtil
.
Error
(
$
"{robot.name} 上报状态失败"
,
ex
);
}
}
static
MissionState
getMissionState
(
int
id
)
...
...
@@ -205,9 +223,9 @@ namespace DeviceLib.BLL
}
return
null
;
}
public
static
void
ClearBoxBind
(
Robot
robot
,
string
rfid
)
public
static
void
ClearBoxBind
(
Robot
robot
,
string
rfid
)
{
HttpManager
.
ClearBoxBind
(
rfid
,
robot
.
name
);
HttpManager
.
ClearBoxBind
(
rfid
,
robot
.
name
);
}
}
}
Source/DeviceLib/obj/Debug/DeviceLib.csproj.AssemblyReference.cache
查看文件 @
233510f
此文件类型无法预览
Source/DeviceLib/obj/Debug/DeviceLib.dll
查看文件 @
233510f
此文件类型无法预览
Source/DeviceLib/obj/Debug/DeviceLib.pdb
查看文件 @
233510f
此文件类型无法预览
Source/UIControls/bin/Debug/DeviceLib.dll
查看文件 @
233510f
此文件类型无法预览
Source/UIControls/bin/Debug/DeviceLib.pdb
查看文件 @
233510f
此文件类型无法预览
Source/UIControls/obj/Debug/UIControl.csproj.AssemblyReference.cache
查看文件 @
233510f
此文件类型无法预览
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论