Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-ACPackingStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 8c704242
由
LN
编写于
2020-02-20 09:05:28 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
1e5c7724
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
34 行增加
和
9 行删除
dll/Client.dll
dll/Client.xml
source/Common/util/LogUtil.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Shelf.cs
source/DeviceLibrary/agvClient/AgvClient.cs
dll/Client.dll
查看文件 @
8c70424
此文件类型无法预览
dll/Client.xml
查看文件 @
8c70424
...
...
@@ -261,6 +261,16 @@
是否连接服务器
</summary>
</member>
<member
name=
"P:Asa.Client2.CancelState"
>
<summary>
取消状态,true发送none,false发送实际状态
</summary>
</member>
<member
name=
"P:Asa.Client2.SendLog"
>
<summary>
仅发送命令的代码日志
</summary>
</member>
<member
name=
"M:Asa.Client2.Connect"
>
<summary>
连接
...
...
source/Common/util/LogUtil.cs
查看文件 @
8c70424
...
...
@@ -124,7 +124,7 @@ namespace OnlineStore.Common
logBox
.
AppendText
(
now
.
ToLongTimeString
()
+
" "
+
msg
+
Environment
.
NewLine
);
//增加文本
TimeSpan
span
=
DateTime
.
Now
-
lastTime
;
if
(
span
.
TotalSeconds
>
1
0
)
if
(
span
.
TotalSeconds
>
300000
0
)
{
lastTime
=
DateTime
.
Now
;
logBox
.
Select
(
logBox
.
Text
.
Length
,
0
);
//设置光标的位置到文本尾
...
...
@@ -140,14 +140,26 @@ namespace OnlineStore.Common
private
static
DateTime
lastTime
=
DateTime
.
Now
;
public
static
void
UpdateLogbox
()
{
try
{
if
(
logBox
!=
null
&&
logBox
.
Visible
)
{
logBox
.
Text
=
LastText
;
TimeSpan
span
=
DateTime
.
Now
-
lastTime
;
if
(
span
.
TotalSeconds
>
3000000
)
{
lastTime
=
DateTime
.
Now
;
logBox
.
Select
(
logBox
.
Text
.
Length
,
0
);
//设置光标的位置到文本尾
logBox
.
ScrollToCaret
();
//滚动到控件光标处
}
}
}
catch
(
Exception
ex
)
{
LOGGER
.
Error
(
"出错:"
+
ex
.
ToString
());
}
}
public
static
void
ClearLog
()
{
if
(
logBox
!=
null
)
...
...
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Shelf.cs
查看文件 @
8c70424
...
...
@@ -199,11 +199,11 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_02_LocatinDown
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_03_WaitArrive
);
MoveInfo
.
TimeOutSeconds
=
18
0
;
MoveInfo
.
OneWaitCanEndStep
=
true
;
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
18
0000
));
InOutStoreLog
(
moveName
+
MoveInfo
.
SLog
+
":再次调用 NeedLeave["
+
CurrShelfID
+
"],等待Agv "
+
Config
.
AgvNodeName
+
" Arrive ,最多等待180000
"
);
AgvClient
.
SetStatus
(
Config
.
AgvNodeName
,
""
,
CurrShelfID
,
ClientAction
.
NeedLeave
,
ClientLevel
.
Low
,
true
);
MoveInfo
.
TimeOutSeconds
=
60
0
;
//
MoveInfo.OneWaitCanEndStep = true;
// MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(60
0000));
InOutStoreLog
(
moveName
+
MoveInfo
.
SLog
+
":再次调用 NeedLeave["
+
CurrShelfID
+
"],等待Agv "
+
Config
.
AgvNodeName
+
" Arrive ,最多等待1200秒
"
);
AgvClient
.
SetStatus
(
Config
.
AgvNodeName
,
""
,
CurrShelfID
,
ClientAction
.
NeedLeave
,
ClientLevel
.
Low
,
true
);
//等待agv到达
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAgvAction
((
int
)
ClientAction
.
Arrive
));
}
...
...
@@ -230,7 +230,7 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_05_WaitReady
);
MoveInfo
.
TimeOutSeconds
=
120
;
InOutStoreLog
(
moveName
+
MoveInfo
.
SLog
+
":移门已打开,调用MayLeave["
+
CurrShelfID
+
"],等待agv "
+
Config
.
AgvNodeName
+
" Ready"
);
InOutStoreLog
(
moveName
+
MoveInfo
.
SLog
+
":移门已打开,调用MayLeave["
+
CurrShelfID
+
"],等待agv "
+
Config
.
AgvNodeName
+
" Ready"
);
AgvClient
.
SetStatus
(
Config
.
AgvNodeName
,
""
,
CurrShelfID
,
ClientAction
.
MayLeave
,
ClientLevel
.
High
,
true
);
//等待agv到达
...
...
source/DeviceLibrary/agvClient/AgvClient.cs
查看文件 @
8c70424
using
Asa
;
using
log4net
;
using
OnlineStore.Common
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Reflection
;
using
System.Text
;
using
System.Threading.Tasks
;
...
...
@@ -10,6 +12,7 @@ namespace OnlineStore.DeviceLibrary
{
public
class
AgvClient
{
public
static
readonly
ILog
LOGGER
=
LogManager
.
GetLogger
(
MethodBase
.
GetCurrentMethod
().
DeclaringType
);
private
static
string
ServerIp
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
AgvServerIp
);
private
static
Asa
.
Client2
agvClient
;
public
static
Dictionary
<
string
,
Asa
.
ClientAction
>
actionMap
=
new
Dictionary
<
string
,
Asa
.
ClientAction
>();
...
...
@@ -138,7 +141,7 @@ namespace OnlineStore.DeviceLibrary
bool
isLog
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
Agv_Log_Open
).
Equals
(
1
);
if
(
isLog
)
{
L
ogUtil
.
i
nfo
(
" AGV "
+
ServerIp
+
" Log : "
+
s
);
L
OGGER
.
I
nfo
(
" AGV "
+
ServerIp
+
" Log : "
+
s
);
}
}
catch
(
Exception
ex
)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论