Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 867e2376
由
刘韬
编写于
2025-12-23 14:24:51 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
添加温湿度更新显示
1 个父辈
3d549ae0
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
33 行增加
和
19 行删除
source/ACSingleStore/Properties/AssemblyInfo.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/ACSingleStore/Properties/AssemblyInfo.cs
查看文件 @
867e237
...
@@ -9,7 +9,7 @@ using System.Runtime.InteropServices;
...
@@ -9,7 +9,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyDescription("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SO951-HC-ACSingleStore
1c16320299ab1b63176199afd21d9905bd56f930
")]
[assembly: AssemblyProduct("SO951-HC-ACSingleStore
3d549ae0c7c9724db465741a9e9d5c941cd6b733
")]
[assembly: AssemblyCopyright("Copyright ? 2017")]
[assembly: AssemblyCopyright("Copyright ? 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyCulture("")]
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
867e237
...
@@ -49,6 +49,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -49,6 +49,7 @@ namespace OnlineStore.DeviceLibrary
public
int
CurrScanCount
=
1
;
public
int
CurrScanCount
=
1
;
//public ScanSocket scanSocket = new ScanSocket();
//public ScanSocket scanSocket = new ScanSocket();
private
System
.
Timers
.
Timer
serverConnectTimer
=
new
System
.
Timers
.
Timer
();
private
System
.
Timers
.
Timer
serverConnectTimer
=
new
System
.
Timers
.
Timer
();
private
System
.
Timers
.
Timer
HumiCheckTimer
=
new
System
.
Timers
.
Timer
();
private
System
.
Timers
.
Timer
IoCheckTimer
=
new
System
.
Timers
.
Timer
();
private
System
.
Timers
.
Timer
IoCheckTimer
=
new
System
.
Timers
.
Timer
();
private
int
OutStoreWaitSeconds
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
OutStoreWaitSeconds
);
private
int
OutStoreWaitSeconds
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
OutStoreWaitSeconds
);
...
@@ -69,11 +70,19 @@ namespace OnlineStore.DeviceLibrary
...
@@ -69,11 +70,19 @@ namespace OnlineStore.DeviceLibrary
serverConnectTimer
.
AutoReset
=
true
;
serverConnectTimer
.
AutoReset
=
true
;
serverConnectTimer
.
Enabled
=
false
;
serverConnectTimer
.
Enabled
=
false
;
serverConnectTimer
.
Elapsed
+=
server_connect_timer_Tick
;
serverConnectTimer
.
Elapsed
+=
server_connect_timer_Tick
;
HumiCheckTimer
=
new
System
.
Timers
.
Timer
();
HumiCheckTimer
.
Interval
=
5000
;
HumiCheckTimer
.
AutoReset
=
true
;
HumiCheckTimer
.
Enabled
=
false
;
HumiCheckTimer
.
Elapsed
+=
HumiCheckTimer_timer_Tick
;
IoCheckTimer
=
new
System
.
Timers
.
Timer
();
IoCheckTimer
=
new
System
.
Timers
.
Timer
();
IoCheckTimer
.
Interval
=
400
;
IoCheckTimer
.
Interval
=
400
;
IoCheckTimer
.
AutoReset
=
true
;
IoCheckTimer
.
AutoReset
=
true
;
IoCheckTimer
.
Enabled
=
false
;
IoCheckTimer
.
Enabled
=
false
;
IoCheckTimer
.
Elapsed
+=
IoCheckTimer_Elapsed
;
IoCheckTimer
.
Elapsed
+=
IoCheckTimer_Elapsed
;
GC
.
KeepAlive
(
serverConnectTimer
);
GC
.
KeepAlive
(
HumiCheckTimer
);
GC
.
KeepAlive
(
IoCheckTimer
);
//添加调试
//添加调试
if
(
config
.
IsInDebug
==
1
)
if
(
config
.
IsInDebug
==
1
)
{
{
...
@@ -2108,34 +2117,38 @@ namespace OnlineStore.DeviceLibrary
...
@@ -2108,34 +2117,38 @@ namespace OnlineStore.DeviceLibrary
private
string
CodeMsg
=
""
;
private
string
CodeMsg
=
""
;
private
string
CodeMsgEn
=
""
;
private
string
CodeMsgEn
=
""
;
private
string
CodeMsgJp
=
""
;
private
string
CodeMsgJp
=
""
;
private
bool
isInProcess
=
false
;
private
object
isInProcess
=
new
object
()
;
public
void
server_connect_timer_Tick
(
object
sender
,
EventArgs
e
)
public
void
server_connect_timer_Tick
(
object
sender
,
EventArgs
e
)
{
{
if
(
isInProcess
)
if
(
Monitor
.
TryEnter
(
isInProcess
))
{
return
;
}
//HumitureServer.RandomData(Config.GetTempAddrList());
isInProcess
=
true
;
if
(
StoreManager
.
IsConnectServer
)
{
{
try
try
{
{
SendLineStatus
();
if
(
StoreManager
.
IsConnectServer
)
{
try
{
SendLineStatus
();
}
catch
(
Exception
ex
)
{
LOGGER
.
Error
(
"定时给服务器发送消息出错:"
,
ex
);
}
// dlScanSocket.TimerCheck();
}
LedProcess
();
}
}
catch
(
Exception
ex
)
finally
{
{
Monitor
.
Exit
(
isInProcess
);
LOGGER
.
Error
(
"定时给服务器发送消息出错:"
,
ex
);
}
}
// dlScanSocket.TimerCheck();
}
}
}
public
void
HumiCheckTimer_timer_Tick
(
object
sender
,
EventArgs
e
)
{
HumitureController
.
QueryData
();
HumitureController
.
QueryData
();
HumidityProcess
();
HumidityProcess
();
LedProcess
();
isInProcess
=
false
;
}
}
string
lastwatnmsg
=
""
;
/// <summary>
/// <summary>
/// 获取整个料仓的状态
/// 获取整个料仓的状态
/// </summary>
/// </summary>
...
@@ -2148,9 +2161,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -2148,9 +2161,10 @@ namespace OnlineStore.DeviceLibrary
lineOperation
.
cid
=
CID
;
lineOperation
.
cid
=
CID
;
lineOperation
.
seq
=
ConfigAppSettings
.
nextSeq
();
lineOperation
.
seq
=
ConfigAppSettings
.
nextSeq
();
lineOperation
.
status
=
1
;
lineOperation
.
status
=
1
;
if
(
WarnObj
.
WarnMsg
!=
""
)
if
(
WarnObj
.
WarnMsg
!=
""
&&
lastwatnmsg
!=
WarnObj
.
WarnMsg
||
lastwatnmsg
==
""
)
{
{
//lineOperation.status = (int)StoreStatus.Warning;
//lineOperation.status = (int)StoreStatus.Warning;
lastwatnmsg
=
WarnObj
.
WarnMsg
;
lineOperation
.
msg
=
WarnObj
.
WarnMsg
;
lineOperation
.
msg
=
WarnObj
.
WarnMsg
;
lineOperation
.
msgEn
=
WarnObj
.
WarnMsgEn
;
lineOperation
.
msgEn
=
WarnObj
.
WarnMsgEn
;
lineOperation
.
msgJp
=
WarnObj
.
WarnMsgJp
;
lineOperation
.
msgJp
=
WarnObj
.
WarnMsgJp
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论