Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
SmartShelf
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 71e8ac1d
由
LN
编写于
2020-09-25 08:58:53 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
bug修改
1 个父辈
1e8ce892
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
30 行增加
和
10 行删除
Common/util/ConfigAppSettings.cs
Common/util/HttpServer.cs
DeviceLibrary/DeviceLibrary/led/LEDColorArtNet.cs
SmartShelf/App.config
SmartShelf/FrmConfig.cs
Common/util/ConfigAppSettings.cs
查看文件 @
71e8ac1
...
@@ -133,10 +133,10 @@ namespace SmartShelf.Common
...
@@ -133,10 +133,10 @@ namespace SmartShelf.Common
{
{
try
try
{
{
if
(
key
.
Equals
(
""
)
||
value
.
Equals
(
""
))
//
if (key.Equals("") || value.Equals(""))
{
//
{
return
;
//
return;
}
//
}
//增加的内容写在appSettings段下 <add key="RegCode" value="0"/>
//增加的内容写在appSettings段下 <add key="RegCode" value="0"/>
System
.
Configuration
.
Configuration
config
=
ConfigurationManager
.
OpenExeConfiguration
(
ConfigurationUserLevel
.
None
);
System
.
Configuration
.
Configuration
config
=
ConfigurationManager
.
OpenExeConfiguration
(
ConfigurationUserLevel
.
None
);
if
(
config
.
AppSettings
.
Settings
[
key
]
==
null
)
if
(
config
.
AppSettings
.
Settings
[
key
]
==
null
)
...
...
Common/util/HttpServer.cs
查看文件 @
71e8ac1
...
@@ -91,6 +91,24 @@ namespace SmartShelf.Common
...
@@ -91,6 +91,24 @@ namespace SmartShelf.Common
if
(
count
>
0
)
if
(
count
>
0
)
{
{
string
content
=
Encoding
.
UTF8
.
GetString
(
buffer
,
0
,
count
);
string
content
=
Encoding
.
UTF8
.
GetString
(
buffer
,
0
,
count
);
// GET / rest / api / v1 / shelf / posOn ? posId = 1_3_1@green; 1_3_2@green; 1_3_7@red HTTP/ 1.1
//Accept: text / html,application / xhtml + xml,application / xml; q = 0.9,*/*;q=0.8
//Accept-Language: zh-Hans-CN,zh-Hans;q=0.5
//Upgrade-Insecure-Requests: 1
//User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18362
//Accept-Encoding: gzip, deflate
//Host: localhost
//Connection: Keep-Alive
//POST / rest / api / v1 / shelf / posOn HTTP / 1.1
//Content - Type: application / x - www - form - urlencoded; charset = UTF - 8
//Host: localhost
//Content - Length: 39
//Connection: Keep - Alive
//posId = 1_3_1@green; 1_3_2@green; 1_3_7@red
LogUtil
.
debug
(
content
+
"\n"
);
LogUtil
.
debug
(
content
+
"\n"
);
// 解析 content
// 解析 content
...
...
DeviceLibrary/DeviceLibrary/led/LEDColorArtNet.cs
查看文件 @
71e8ac1
...
@@ -25,6 +25,8 @@ namespace SmartShelf.DeviceLibrary
...
@@ -25,6 +25,8 @@ namespace SmartShelf.DeviceLibrary
internal
LEDColorArtNet
(
string
ip
)
:
base
(
ip
)
internal
LEDColorArtNet
(
string
ip
)
:
base
(
ip
)
{
{
this
.
phyIP
=
ip
;
this
.
phyIP
=
ip
;
phyAddr
=
"00"
;
if
(!
String
.
IsNullOrEmpty
(
LEDManager
.
DefaultIP
)
||
LEDManager
.
ConnectionMode
.
Equals
(
1
))
if
(!
String
.
IsNullOrEmpty
(
LEDManager
.
DefaultIP
)
||
LEDManager
.
ConnectionMode
.
Equals
(
1
))
{
{
try
try
...
@@ -42,15 +44,15 @@ namespace SmartShelf.DeviceLibrary
...
@@ -42,15 +44,15 @@ namespace SmartShelf.DeviceLibrary
LogUtil
.
error
(
"IP【"
+
ip
+
"】解析phyAddr出错:"
+
ex
.
ToString
());
LogUtil
.
error
(
"IP【"
+
ip
+
"】解析phyAddr出错:"
+
ex
.
ToString
());
}
}
}
}
if
(!
String
.
IsNullOrEmpty
(
LEDManager
.
DefaultIP
))
if
(!
String
.
IsNullOrEmpty
(
LEDManager
.
DefaultIP
)
&&
LEDManager
.
ConnectionMode
.
Equals
(
0
)
)
{
{
iep
=
new
IPEndPoint
(
IPAddress
.
Parse
(
LEDManager
.
DefaultIP
),
6454
);
iep
=
new
IPEndPoint
(
IPAddress
.
Parse
(
LEDManager
.
DefaultIP
),
6454
);
}
}
else
else
{
{
phyAddr
=
"00"
;
iep
=
new
IPEndPoint
(
IPAddress
.
Parse
(
ip
),
6454
);
iep
=
new
IPEndPoint
(
IPAddress
.
Parse
(
ip
),
6454
);
}
}
LogUtil
.
info
(
" LEDColorArtNet 初始化 IP ["
+
phyIP
+
"] phyAddr["
+
phyAddr
+
"] iep.Address ["
+
iep
.
Address
+
"]"
);
Max_Light
=
170
;
Max_Light
=
170
;
Max_DMX
=
16
;
Max_DMX
=
16
;
datalength
=
512
;
datalength
=
512
;
...
...
SmartShelf/App.config
查看文件 @
71e8ac1
...
@@ -9,9 +9,9 @@
...
@@ -9,9 +9,9 @@
<
add
key
=
"App_AutoRun"
value
=
"0"
/>
<
add
key
=
"App_AutoRun"
value
=
"0"
/>
<
add
key
=
"App_Title"
value
=
"料架"
/>
<
add
key
=
"App_Title"
value
=
"料架"
/>
<!--服务器端口号-->
<!--服务器端口号-->
<
add
key
=
"ServerPort"
value
=
""
/>
<
add
key
=
"ServerPort"
value
=
"
80
"
/>
<!--服务器地址-->
<!--服务器地址-->
<
add
key
=
"HttpServerAddr"
value
=
"http://192.168.8.101:8080/"
/
>
<
!--<
add
key
=
"HttpServerAddr"
value
=
"http://192.168.8.101:8080/"
/>--
>
<!--料架灯类型,
0
=单色灯料架,
1
=三色灯料架,
2
=
art
-
net
-->
<!--料架灯类型,
0
=单色灯料架,
1
=三色灯料架,
2
=
art
-
net
-->
<
add
key
=
"DeviceLedType"
value
=
"2"
/>
<
add
key
=
"DeviceLedType"
value
=
"2"
/>
<!--料仓库位配置文件-->
<!--料仓库位配置文件-->
...
...
SmartShelf/FrmConfig.cs
查看文件 @
71e8ac1
...
@@ -44,10 +44,10 @@ namespace SmartShelf
...
@@ -44,10 +44,10 @@ namespace SmartShelf
}
}
i
++;
i
++;
}
}
c
mbConMode
.
SelectedIndex
=
0
;
c
omBoxColor
.
SelectedIndex
=
0
;
if
(
LEDManager
.
ConnectionMode
.
Equals
(
0
))
if
(
LEDManager
.
ConnectionMode
.
Equals
(
0
))
{
{
c
omBoxColor
.
SelectedIndex
=
0
;
c
mbConMode
.
SelectedIndex
=
0
;
}
}
else
else
{
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论