Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit f4632008
由
LN
编写于
2019-10-25 11:30:19 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
d3f82a30
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
35 行增加
和
27 行删除
dll/RFID/Asa.RFID.dll
dll/RFID/Asa.RFID.xml
source/DeviceLibrary/deviceLibrary/RFID/RFIDManager.cs
source/LoadCVSLibrary/storeConfig/ConfigItemBase.cs
source/LoadCVSLibrary/storeConfig/config/DeviceConfig.cs
dll/RFID/Asa.RFID.dll
查看文件 @
f463200
此文件类型无法预览
dll/RFID/Asa.RFID.xml
查看文件 @
f463200
...
@@ -44,11 +44,6 @@
...
@@ -44,11 +44,6 @@
是否存在ID卡
是否存在ID卡
</summary>
</summary>
</member>
</member>
<member
name=
"P:Asa.RFID.Reader.ID"
>
<summary>
ID号码
</summary>
</member>
<member
name=
"M:Asa.RFID.Reader.Connect"
>
<member
name=
"M:Asa.RFID.Reader.Connect"
>
<summary>
<summary>
连接
连接
...
@@ -68,16 +63,16 @@
...
@@ -68,16 +63,16 @@
</member>
</member>
<member
name=
"M:Asa.RFID.Reader.AutoScan(System.Boolean,System.Int32)"
>
<member
name=
"M:Asa.RFID.Reader.AutoScan(System.Boolean,System.Int32)"
>
<summary>
<summary>
自动读取扫描
自动读取扫描
,使用查找模式
</summary>
</summary>
<param
name=
"
mode"
>
扫描模式
,true扫描
</param>
<param
name=
"
open"
>
扫描模式开启
,true扫描
</param>
<param
name=
"time"
>
间隔时间
</param>
<param
name=
"time"
>
间隔时间
</param>
</member>
</member>
<member
name=
"M:Asa.RFID.Reader.AutoScan
2
(System.Boolean)"
>
<member
name=
"M:Asa.RFID.Reader.AutoScan(System.Boolean)"
>
<summary>
<summary>
自动
扫描,正在测试,不要使用
自动
读取扫描,使用扫描模式,扫描模式只读
</summary>
</summary>
<param
name=
"
mode"
>
</param>
<param
name=
"
open"
>
扫描模式开启,true扫描
</param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Asa.RFID.Reader.Read"
>
<member
name=
"M:Asa.RFID.Reader.Read"
>
...
...
source/DeviceLibrary/deviceLibrary/RFID/RFIDManager.cs
查看文件 @
f463200
...
@@ -96,6 +96,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -96,6 +96,7 @@ namespace OnlineStore.DeviceLibrary
bool
result
=
rfidReader
.
Connect
();
bool
result
=
rfidReader
.
Connect
();
if
(
result
)
if
(
result
)
{
{
rfidReader
.
AutoScan
(
true
);
LogUtil
.
info
(
"第【"
+
i
+
"】次连接 "
+
logName
+
" 成功:"
);
LogUtil
.
info
(
"第【"
+
i
+
"】次连接 "
+
logName
+
" 成功:"
);
Thread
.
Sleep
(
10
);
Thread
.
Sleep
(
10
);
...
...
source/LoadCVSLibrary/storeConfig/ConfigItemBase.cs
查看文件 @
f463200
...
@@ -32,7 +32,7 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -32,7 +32,7 @@ namespace OnlineStore.LoadCSVLibrary
/// 属性值
/// 属性值
/// </summary>
/// </summary>
[
CSVAttribute
(
"属性值"
)]
[
CSVAttribute
(
"属性值"
)]
public
string
ProVale
{
get
;
set
;
}
public
string
ProVal
u
e
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 分类编号
/// 分类编号
/// </summary>
/// </summary>
...
@@ -49,7 +49,7 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -49,7 +49,7 @@ namespace OnlineStore.LoadCSVLibrary
}
}
try
try
{
{
value
=
(
ushort
)
Convert
.
ToInt32
(
ProVale
);
value
=
(
ushort
)
Convert
.
ToInt32
(
ProVal
u
e
);
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
@@ -59,11 +59,11 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -59,11 +59,11 @@ namespace OnlineStore.LoadCSVLibrary
}
}
public
virtual
int
GetValue
()
public
virtual
int
GetValue
()
{
{
if
(
ProVale
.
Equals
(
""
))
if
(
ProVal
u
e
.
Equals
(
""
))
{
{
return
-
1
;
return
-
1
;
}
}
return
Convert
.
ToInt32
(
ProVale
);
return
Convert
.
ToInt32
(
ProVal
u
e
);
}
}
public
override
string
ToString
()
public
override
string
ToString
()
{
{
...
@@ -73,9 +73,9 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -73,9 +73,9 @@ namespace OnlineStore.LoadCSVLibrary
public
virtual
void
CheckField
()
public
virtual
void
CheckField
()
{
{
if
(
String
.
IsNullOrEmpty
(
ProType
)
||
String
.
IsNullOrEmpty
(
ProName
)
||
String
.
IsNullOrEmpty
(
ProVale
))
if
(
String
.
IsNullOrEmpty
(
ProType
)
||
String
.
IsNullOrEmpty
(
ProName
)
||
String
.
IsNullOrEmpty
(
ProVal
u
e
))
{
{
throw
new
CVSFieldNotMatchingExection
(
ToString
()
+
",【类型:"
+
ProType
+
"】【名称:"
+
ProName
+
"】【属性值:"
+
ProVale
+
"】必须配置值!"
);
throw
new
CVSFieldNotMatchingExection
(
ToString
()
+
",【类型:"
+
ProType
+
"】【名称:"
+
ProName
+
"】【属性值:"
+
ProVal
u
e
+
"】必须配置值!"
);
}
}
}
}
}
}
...
@@ -187,11 +187,11 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -187,11 +187,11 @@ namespace OnlineStore.LoadCSVLibrary
/// <returns></returns>
/// <returns></returns>
public
short
GetAxisValue
()
public
short
GetAxisValue
()
{
{
if
(
ProVal
e
.
Equals
(
""
)
||
ProVal
e
.
Equals
(
"-1"
))
if
(
ProVal
ue
.
Equals
(
""
)
||
ProValu
e
.
Equals
(
"-1"
))
{
{
return
-
1
;
return
-
1
;
}
}
return
(
short
)
Convert
.
ToInt32
(
ProVale
);
return
(
short
)
Convert
.
ToInt32
(
ProVal
u
e
);
}
}
//public override string ToString()
//public override string ToString()
...
@@ -200,7 +200,7 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -200,7 +200,7 @@ namespace OnlineStore.LoadCSVLibrary
//}
//}
public
override
void
CheckField
()
public
override
void
CheckField
()
{
{
if
(
String
.
IsNullOrEmpty
(
ProType
)
||
String
.
IsNullOrEmpty
(
ProName
)
||
String
.
IsNullOrEmpty
(
DeviceName
)
||
String
.
IsNullOrEmpty
(
ProVale
))
if
(
String
.
IsNullOrEmpty
(
ProType
)
||
String
.
IsNullOrEmpty
(
ProName
)
||
String
.
IsNullOrEmpty
(
DeviceName
)
||
String
.
IsNullOrEmpty
(
ProVal
u
e
))
{
{
throw
new
CVSFieldNotMatchingExection
(
ToString
()
+
",【类型:ProType】【名称:ProName】【属性值:ProVale】【设备名称:DeviceName】必须配置值!"
);
throw
new
CVSFieldNotMatchingExection
(
ToString
()
+
",【类型:ProType】【名称:ProName】【属性值:ProVale】【设备名称:DeviceName】必须配置值!"
);
}
}
...
@@ -227,18 +227,26 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -227,18 +227,26 @@ namespace OnlineStore.LoadCSVLibrary
{
{
SlaveID
=
0
;
SlaveID
=
0
;
}
}
private
string
IP
=
""
;
/// <summary>
/// <summary>
/// 设备IP
/// 设备IP
/// </summary>
/// </summary>
public
string
IO_IP
public
string
IO_IP
{
{
get
get
{
{
if
(
DeviceConfig
.
ProIOIpMap
!=
null
&&
DeviceConfig
.
ProIOIpMap
.
ContainsKey
(
DeviceName
))
if
(
String
.
IsNullOrEmpty
(
IP
))
{
{
return
DeviceConfig
.
ProIOIpMap
[
DeviceName
];
if
(
DeviceConfig
.
ProIOIpMap
!=
null
&&
DeviceConfig
.
ProIOIpMap
.
ContainsKey
(
DeviceName
))
{
IP
=
DeviceConfig
.
ProIOIpMap
[
DeviceName
];
}
else
{
IP
=
DeviceName
;
}
}
}
return
DeviceName
;
return
IP
;
}
}
}
}
/// <summary>
/// <summary>
...
@@ -288,7 +296,7 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -288,7 +296,7 @@ namespace OnlineStore.LoadCSVLibrary
//}
//}
public
override
void
CheckField
()
public
override
void
CheckField
()
{
{
if
(
String
.
IsNullOrEmpty
(
ProType
)
||
String
.
IsNullOrEmpty
(
ProName
)
||
String
.
IsNullOrEmpty
(
DeviceName
)
||
String
.
IsNullOrEmpty
(
ProVale
))
if
(
String
.
IsNullOrEmpty
(
ProType
)
||
String
.
IsNullOrEmpty
(
ProName
)
||
String
.
IsNullOrEmpty
(
DeviceName
)
||
String
.
IsNullOrEmpty
(
ProVal
u
e
))
{
{
throw
new
CVSFieldNotMatchingExection
(
ToString
()
+
",【类型:ProType】【名称:ProName】【属性值:ProVale】【设备名称:DeviceName】必须配置值!"
);
throw
new
CVSFieldNotMatchingExection
(
ToString
()
+
",【类型:ProType】【名称:ProName】【属性值:ProVale】【设备名称:DeviceName】必须配置值!"
);
}
}
...
...
source/LoadCVSLibrary/storeConfig/config/DeviceConfig.cs
查看文件 @
f463200
...
@@ -115,7 +115,7 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -115,7 +115,7 @@ namespace OnlineStore.LoadCSVLibrary
}
}
else
if
(
con
.
ProType
==
ConfigItemType
.
PRO
)
else
if
(
con
.
ProType
==
ConfigItemType
.
PRO
)
{
{
prop
.
SetValue
(
this
,
Convert
.
ChangeType
(
con
.
ProVale
,
prop
.
PropertyType
),
null
);
//赋值
prop
.
SetValue
(
this
,
Convert
.
ChangeType
(
con
.
ProVal
u
e
,
prop
.
PropertyType
),
null
);
//赋值
}
}
}
}
else
else
...
@@ -125,10 +125,14 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -125,10 +125,14 @@ namespace OnlineStore.LoadCSVLibrary
}
}
else
if
(!
ProIOIpMap
.
ContainsKey
(
con
.
ProName
)
&&
con
.
ProName
.
ToUpper
().
Contains
(
IOIP_Str
))
else
if
(!
ProIOIpMap
.
ContainsKey
(
con
.
ProName
)
&&
con
.
ProName
.
ToUpper
().
Contains
(
IOIP_Str
))
{
{
ProIOIpMap
.
Add
(
con
.
ProName
,
con
.
ProVale
);
ProIOIpMap
.
Add
(
con
.
ProName
,
con
.
ProVal
u
e
);
}
else
if
(!
ProRFIpMap
.
ContainsKey
(
con
.
ProName
)
&&
con
.
ProName
.
ToUpper
().
Contains
(
RFIP_Str
))
}
else
if
(!
ProRFIpMap
.
ContainsKey
(
con
.
ProName
)
&&
con
.
ProName
.
ToUpper
().
Contains
(
RFIP_Str
))
{
{
ProRFIpMap
.
Add
(
con
.
ProName
,
con
.
ProVale
);
ProRFIpMap
.
Add
(
con
.
ProName
,
con
.
ProValue
);
}
else
{
LOGGER
.
Error
(
"配置文件:"
+
this
.
ConfigFilePath
+
",属性名="
+
con
.
ProName
+
"的属性未找到匹配字段!"
);
}
}
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论