Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
GC_Branch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周磊
GC_Branch
Commits
771e403f
Commit
771e403f
authored
Oct 20, 2022
by
周磊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
一对多修改前提交
parent
6a89d9ad
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
48 deletions
+11
-48
AppInit.cs
GcDevicePc/AppInit.cs
+3
-0
ListViewTest.cs
GcDevicePc/ListViewTest.cs
+3
-37
HMISearch.cs
GcDevicePc/ProThread/HMISearch.cs
+4
-11
UserConfig.cs
GcDevicePc/UserConfig.cs
+1
-0
GcDevicePc.resources.dll
VocsSetup/GC_Control/byn/GcDevicePc.resources.dll
+0
-0
GcDevicePc.resources.dll
VocsSetup/GC_Control/en/GcDevicePc.resources.dll
+0
-0
No files found.
GcDevicePc/AppInit.cs
View file @
771e403f
...
...
@@ -565,6 +565,9 @@ namespace GcDevicePc
}
private
string
strMACAddress
;
/// <summary>
/// 上次绑定仪器?展示没发现作用
/// </summary>
public
void
LocalNetworkCheck
()
{
String
localip
=
""
;
...
...
GcDevicePc/ListViewTest.cs
View file @
771e403f
...
...
@@ -79,7 +79,9 @@ namespace GcDevicePc
th
.
IsBackground
=
true
;
th
.
Start
();
}
/// <summary>
/// 模拟测试搜索HMI
/// </summary>
private
void
ThreadMethod
()
{
byte
[]
sendBytes
=
new
byte
[]{
0x57
,
0x54
,
0x04
,
0x00
,
0x00
,
0x00
,
0x03
,
0x00
,
0x00
,
0x00
,
0x55
,
0xAA
};
...
...
@@ -133,14 +135,6 @@ namespace GcDevicePc
if
((
iDataLength
>=
4
)
&&
(
iRecvLength
==
8
+
iDataLength
))
{
// 获取模块名称
//StringBuilder sb=new StringBuilder();
//sb.Append(Convert.ToChar(pBuf[6]));
//sb.Append(Convert.ToChar(pBuf[7]));
//sb.Append(Convert.ToChar(pBuf[8]));
//sb.Append(Convert.ToChar(pBuf[9]));
//wtModuleName = sb.ToString();
//sb.Length = 0; //清空
System
.
Text
.
ASCIIEncoding
asciiEncoding
=
new
System
.
Text
.
ASCIIEncoding
();
globaldata
.
m_DeviceInfo
.
bActive
=
false
;
...
...
@@ -153,33 +147,6 @@ namespace GcDevicePc
globaldata
.
m_DeviceInfo
.
Netmask
=
String
.
Format
(
"{0}.{1}.{2}.{3}"
,
pBuf
[
20
],
pBuf
[
21
],
pBuf
[
22
],
pBuf
[
23
]);
globaldata
.
m_DeviceInfo
.
Gateway
=
String
.
Format
(
"{0}.{1}.{2}.{3}"
,
pBuf
[
24
],
pBuf
[
25
],
pBuf
[
26
],
pBuf
[
27
]);
// 新建一个以太网设备信息
//m_pWUEthInfo.bActive = false;
//m_pWUEthInfo.byteMacAddr[0] = pBuf[10];
//m_pWUEthInfo.byteMacAddr[1] = pBuf[11];
//m_pWUEthInfo.byteMacAddr[2] = pBuf[12];
//m_pWUEthInfo.byteMacAddr[3] = pBuf[13];
//m_pWUEthInfo.byteMacAddr[4] = pBuf[14];
//m_pWUEthInfo.byteMacAddr[5] = pBuf[15];
//m_pWUEthInfo.byteIpAddr[0] = pBuf[16];
//m_pWUEthInfo.byteIpAddr[1] = pBuf[17];
//m_pWUEthInfo.byteIpAddr[2] = pBuf[18];
//m_pWUEthInfo.byteIpAddr[3] = pBuf[19];
//m_pWUEthInfo.byteNetmask[0] = pBuf[20];
//m_pWUEthInfo.byteNetmask[1] = pBuf[21];
//m_pWUEthInfo.byteNetmask[2] = pBuf[22];
//m_pWUEthInfo.byteNetmask[3] = pBuf[23];
//m_pWUEthInfo.byteGateway[0] = pBuf[24];
//m_pWUEthInfo.byteGateway[1] = pBuf[25];
//m_pWUEthInfo.byteGateway[2] = pBuf[26];
//m_pWUEthInfo.byteGateway[3] = pBuf[27];
// globaldata.DeviceList.Add(globaldata.m_DeviceInfo);
int
onenode
=
treeView1
.
Nodes
[
0
].
GetNodeCount
(
false
);
Console
.
WriteLine
(
"onenode is"
+
onenode
.
ToString
());
...
...
@@ -239,7 +206,6 @@ namespace GcDevicePc
//这里由于只有一类设备,存储按相关顺序!!!!!!!!!!!!
// gcList.Add(m_pWUEthInfo);
globaldata
.
DeviceList
.
Add
(
globaldata
.
m_DeviceInfo
);
// Console.WriteLine("nodes is " + gcList.Count.ToString());
return
true
;
}
}
...
...
GcDevicePc/ProThread/HMISearch.cs
View file @
771e403f
...
...
@@ -266,6 +266,10 @@ namespace GcDevicePc.ProThread
}
}
/// <summary>
/// HMI搜索
/// </summary>
/// <param name="b"></param>
private
void
ThreadMethod
(
bool
b
)
{
//byte[] sendBytes = new byte[] { 0x57, 0x54, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x55, 0xAA };
...
...
@@ -282,12 +286,9 @@ namespace GcDevicePc.ProThread
for
(
int
i
=
0
;
i
<
_localip
.
Count
;
i
++)
{
sLocalIPIndex
=
i
;
// client = new UdpClient(new IPEndPoint(IPAddress.Any, 0));
client
=
new
UdpClient
(
new
IPEndPoint
(
IPAddress
.
Parse
(
this
.
_localip
[
i
]),
0
));
if
(
bWetherSearchOnline
==
false
)
{
// endpoint = new IPEndPoint(IPAddress.Parse(GetBroadcast(this._localip[i], this._localmask[i])), 233);
//
endpoint
=
new
IPEndPoint
(
IPAddress
.
Parse
(
"255.255.255.255"
),
233
);
}
else
...
...
@@ -454,14 +455,6 @@ namespace GcDevicePc.ProThread
globaldata
.
DeviceList
.
Add
(
m_DeviceInfo
);
myHMIList
.
Add
(
m_DeviceInfo
);
}
//if (FMAC == tmpmac && globaldata.DeviceList.Contains(m_DeviceInfo) == false)
//{
// if (m_DeviceInfo.IpAddr != "0.0.0.0")
// {
// globaldata.DeviceList.Add(m_DeviceInfo);
// myHMIList.Add(m_DeviceInfo);
// }
//}
}
else
{
...
...
GcDevicePc/UserConfig.cs
View file @
771e403f
...
...
@@ -326,6 +326,7 @@ namespace GcDevicePc
endBytes
.
CopyTo
(
sendBytes
,
headBytes
.
Length
+
sMac
.
Length
+
update
.
Length
);
client
.
Send
(
sendBytes
,
sendBytes
.
Length
,
endpoint
);
this
.
hminm
.
ReadOnly
=
true
;
this
.
hmiip
.
ReadOnly
=
true
;
this
.
hmigw
.
ReadOnly
=
true
;
...
...
VocsSetup/GC_Control/byn/GcDevicePc.resources.dll
View file @
771e403f
No preview for this file type
VocsSetup/GC_Control/en/GcDevicePc.resources.dll
View file @
771e403f
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment