# Conflicts:
#	WCS.BLL/Tool/Helper.cs
#	WCS.WebApi/Program.cs
This commit is contained in:
陶坤
2024-06-25 13:46:57 +08:00
176 changed files with 9769 additions and 1826 deletions

View File

@ -83,6 +83,30 @@ namespace WCS.BLL.Tool
return data.ToArray();
}
public static byte[] Query()
{
byte[] data2 = new byte[4];
data2[0] = 0xff;
data2[1] = 0x03;
data2[2] = 0x00;
data2[3] = 0x06;
byte[] senddata2 = Tool.Helper.Crc16(data2, data2.Length, true);
return senddata2;
}
public static byte[] SetId()
{
byte[] data2 = new byte[6];
data2[0] = 0xff;
data2[1] = 0x04;
data2[2] = 0x00;
data2[3] = 0x08;
data2[4] = 0x03;
data2[5] = 0x01;
byte[] senddata2 = Tool.Helper.Crc16(data2, data2.Length, true);
return senddata2;
}
//出库库位灯亮灯
public static byte[] OutstoreLight(List<int> board_id, string lightcolor,int status)
{
@ -200,11 +224,15 @@ namespace WCS.BLL.Tool
//入库警示灯短亮(绿色),蜂鸣器鸣叫一次
public static byte[] InstoreWarnLight(int lightid)
{
byte[] data1 = new byte[8];
byte[] data1 = new byte[8 + 3 * 6];
data1[0] = 0xff;
data1[1] = 0x02;
data1[2] = 0x00;
data1[3] = 0x0a;
data1[4] = (byte)lightid;
data1[5] = 0x03;
data1[6] = 0x02;
for (int i = 0; i < 7; i++)
{
data1[4 + i * 3] = (byte)(lightid + i);
@ -214,7 +242,8 @@ namespace WCS.BLL.Tool
//data1[4] = (byte)lightid;
//data1[5] = 0x03;
//data1[6] = 0x02;
data1[7] = 0x02;
//data1[7] = 0x02;
data1[7] = 0x00;
byte[] senddata1 = Tool.Helper.Crc16(data1, data1.Length, true);
return senddata1;
}