You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.9 KiB
56 lines
1.9 KiB
using Guidaoji; |
|
using Guidaoji.Common; |
|
using System; |
|
using System.Collections.Generic; |
|
using System.Linq; |
|
using System.Text; |
|
using System.Threading; |
|
using System.Threading.Tasks; |
|
|
|
namespace Emergency_platform |
|
{ |
|
public class Track |
|
{ |
|
public void DS() |
|
{ |
|
Timer timer = new Timer(TimerCallback, null, 0, 2000); |
|
} |
|
public void TimerCallback(object state) |
|
{ |
|
for (int i = 0; i <TcpClientWrapper.uploadRet.data.alarm.Length; i++) |
|
{ |
|
if (TcpClientWrapper.uploadRet.data.alarm[i] == 1) |
|
{ |
|
switch (i) |
|
{ |
|
case 0: |
|
TcpClientWrapper.SendDataAlarm("总故障"); |
|
break; |
|
case 1: |
|
TcpClientWrapper.SendDataAlarm("电压过高或过低报警"); |
|
break; |
|
case 2: |
|
TcpClientWrapper.SendDataAlarm("过载报警"); |
|
break; |
|
case 3: |
|
TcpClientWrapper.SendDataAlarm("行走电机故障"); |
|
break; |
|
case 4: |
|
TcpClientWrapper.SendDataAlarm("伸缩电机故障"); |
|
break; |
|
case 5: |
|
TcpClientWrapper.SendDataAlarm("打滑报警"); |
|
break; |
|
case 6: |
|
TcpClientWrapper.SendDataAlarm("坐标故障报警"); |
|
break; |
|
case 7: |
|
TcpClientWrapper.SendDataAlarm("预留"); |
|
break; |
|
} |
|
} |
|
} |
|
} |
|
} |
|
|
|
}
|
|
|