Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
AutoCountMachine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 8dbedc7b
由
LN
编写于
2020-05-29 15:16:49 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
bug修改
1 个父辈
286fe85c
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
7 行增加
和
5 行删除
RC1266-AutoCountMachine/source/AutoCountClient/FrmRobotMain.cs
RC1266-AutoCountMachine/source/Common/util/LogUtil.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/BatchMoveBean_Partial.cs
RC1266-AutoCountMachine/source/AutoCountClient/FrmRobotMain.cs
查看文件 @
8dbedc7
...
@@ -364,7 +364,7 @@ namespace OnlineStore.AutoCountClient
...
@@ -364,7 +364,7 @@ namespace OnlineStore.AutoCountClient
StringBuilder
sbResult
=
new
StringBuilder
();
StringBuilder
sbResult
=
new
StringBuilder
();
PerformanceCounter
pf1
=
new
PerformanceCounter
(
"Process"
,
"Working Set - Private"
,
process
.
ProcessName
);
PerformanceCounter
pf1
=
new
PerformanceCounter
(
"Process"
,
"Working Set - Private"
,
process
.
ProcessName
);
sbResult
.
AppendFormat
(
DateTime
.
Now
.
ToLongTimeString
()
+
", 名称:{0} 内存:{1}M "
,
process
.
ProcessName
,
Math
.
Round
(
pf1
.
NextValue
()
/
1024
/
1024F
,
2
));
sbResult
.
AppendFormat
(
DateTime
.
Now
.
ToLongTimeString
()
+
", 名称:{0} 内存:{1}M "
,
process
.
ProcessName
,
Math
.
Round
(
pf1
.
NextValue
()
/
1024
/
1024F
,
2
));
sbResult
.
AppendFormat
(
", CPU : {0} %"
,
curtime
.
NextValue
());
sbResult
.
AppendFormat
(
", CPU : {0} %"
,
curtime
.
NextValue
()
/
Environment
.
ProcessorCount
);
LogUtil
.
info
(
sbResult
.
ToString
());
LogUtil
.
info
(
sbResult
.
ToString
());
}
}
}
}
...
...
RC1266-AutoCountMachine/source/Common/util/LogUtil.cs
查看文件 @
8dbedc7
...
@@ -6,6 +6,7 @@ using log4net;
...
@@ -6,6 +6,7 @@ using log4net;
using
System.Reflection
;
using
System.Reflection
;
using
System.Drawing
;
using
System.Drawing
;
using
System.Runtime.ExceptionServices
;
using
System.Runtime.ExceptionServices
;
using
System.Collections.Concurrent
;
namespace
OnlineStore.Common
namespace
OnlineStore.Common
{
{
...
@@ -16,7 +17,7 @@ namespace OnlineStore.Common
...
@@ -16,7 +17,7 @@ namespace OnlineStore.Common
public
delegate
void
ShowLog
(
string
msg
,
Color
color
);
public
delegate
void
ShowLog
(
string
msg
,
Color
color
);
public
static
readonly
ILog
LOGGER
=
LogManager
.
GetLogger
(
"RollingLogFileAppender"
);
public
static
readonly
ILog
LOGGER
=
LogManager
.
GetLogger
(
"RollingLogFileAppender"
);
public
static
readonly
ILog
rfidLog
=
LogManager
.
GetLogger
(
"RfidLog"
);
public
static
readonly
ILog
rfidLog
=
LogManager
.
GetLogger
(
"RfidLog"
);
public
static
Dictionary
<
int
,
DateTime
>
lastErrorLogTime
=
new
Dictionary
<
int
,
DateTime
>();
public
static
ConcurrentDictionary
<
int
,
DateTime
>
lastErrorLogTime
=
new
Concurrent
Dictionary
<
int
,
DateTime
>();
public
static
System
.
Windows
.
Forms
.
RichTextBox
logBox
=
null
;
public
static
System
.
Windows
.
Forms
.
RichTextBox
logBox
=
null
;
...
@@ -61,6 +62,7 @@ namespace OnlineStore.Common
...
@@ -61,6 +62,7 @@ namespace OnlineStore.Common
{
{
rfidLog
.
Debug
(
msg
);
rfidLog
.
Debug
(
msg
);
}
}
public
static
void
error
(
string
errorMsg
,
int
type
,
int
seconds
=
10
)
public
static
void
error
(
string
errorMsg
,
int
type
,
int
seconds
=
10
)
{
{
try
try
...
@@ -70,14 +72,13 @@ namespace OnlineStore.Common
...
@@ -70,14 +72,13 @@ namespace OnlineStore.Common
TimeSpan
span
=
DateTime
.
Now
-
lastErrorLogTime
[
type
];
TimeSpan
span
=
DateTime
.
Now
-
lastErrorLogTime
[
type
];
if
(
span
.
TotalSeconds
>
seconds
)
if
(
span
.
TotalSeconds
>
seconds
)
{
{
lastErrorLogTime
.
Remove
(
type
);
lastErrorLogTime
[
type
]
=
DateTime
.
Now
;
lastErrorLogTime
.
Add
(
type
,
DateTime
.
Now
);
error
(
LOGGER
,
errorMsg
);
error
(
LOGGER
,
errorMsg
);
}
}
}
}
else
else
{
{
lastErrorLogTime
.
Add
(
type
,
DateTime
.
Now
);
lastErrorLogTime
.
Try
Add
(
type
,
DateTime
.
Now
);
error
(
LOGGER
,
errorMsg
);
error
(
LOGGER
,
errorMsg
);
}
}
}
}
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/BatchMoveBean_Partial.cs
查看文件 @
8dbedc7
...
@@ -209,6 +209,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -209,6 +209,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB22_LocationDown
))
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB22_LocationDown
))
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB23_ShelfOut
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB23_ShelfOut
);
MoveInfo
.
TimeOutSeconds
=
30
;
WorkLog
(
"上料完成 :通知agv来取料串,等待料串离开"
);
WorkLog
(
"上料完成 :通知agv来取料串,等待料串离开"
);
AgvClient
.
NeedLeave
(
AgvName
,
CurrShelfId
,
ClientLevel
.
High
);
AgvClient
.
NeedLeave
(
AgvName
,
CurrShelfId
,
ClientLevel
.
High
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_LineIn_Check
,
IO_VALUE
.
LOW
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_LineIn_Check
,
IO_VALUE
.
LOW
));
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论