|
|
@ -9,6 +9,7 @@ using System.Text;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using CommonExtend;
|
|
|
|
using CommonExtend;
|
|
|
|
using CommonModel;
|
|
|
|
using CommonModel;
|
|
|
|
|
|
|
|
using static Google.Rpc.Context.AttributeContext.Types;
|
|
|
|
|
|
|
|
|
|
|
|
namespace LanShengService.Tcp
|
|
|
|
namespace LanShengService.Tcp
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -68,93 +69,34 @@ namespace LanShengService.Tcp
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case "1001":
|
|
|
|
case "1001":
|
|
|
|
case "9104":
|
|
|
|
case "9104":
|
|
|
|
request.Content.AgreementVersion = Content.ReadInt(1);
|
|
|
|
if (request.Content.Id.StartsWith("QC") || request.Content.Id.StartsWith("ZK"))
|
|
|
|
request.Content.DataTick = Content.ReadInt(2);
|
|
|
|
{
|
|
|
|
request.Content.ICCID = Content.ReadString(20, Encoding.ASCII);
|
|
|
|
Decode1001ZK(request.Content, Content);
|
|
|
|
Content.SkipBytes(4);
|
|
|
|
}
|
|
|
|
request.Content.Longitude = Content.ReadString(9, Encoding.ASCII);
|
|
|
|
else
|
|
|
|
request.Content.Latitude = Content.ReadString(8, Encoding.ASCII);
|
|
|
|
{
|
|
|
|
request.Content.ConnectStrLength = Content.ReadInt(1);
|
|
|
|
Decode1001RY(request.Content, Content);
|
|
|
|
request.Content.ConnectString = Content.ReadString((int)request.Content.ConnectStrLength, Encoding.ASCII);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case "1103":
|
|
|
|
case "1103":
|
|
|
|
request.Content.Version = Content.ReadInt(1);
|
|
|
|
if (request.Content.Id.StartsWith("QC") || request.Content.Id.StartsWith("ZK"))
|
|
|
|
var Data2 = Content.ReadBitArray();
|
|
|
|
{
|
|
|
|
request.Content.Data2_B7 = Data2[0];
|
|
|
|
Decode1103ZK(request.Content, Content);
|
|
|
|
request.Content.Data2_B6 = Data2[1];
|
|
|
|
}
|
|
|
|
request.Content.Data2_B5 = Data2[2];
|
|
|
|
else
|
|
|
|
request.Content.Data2_B4 = Data2[3];
|
|
|
|
{
|
|
|
|
request.Content.Data2_B3 = Data2[4];
|
|
|
|
Decode1103RY(request.Content, Content);
|
|
|
|
request.Content.Data2_B2 = Data2[5];
|
|
|
|
}
|
|
|
|
request.Content.Data2_B1 = Data2[6];
|
|
|
|
break;
|
|
|
|
request.Content.Data2_B0 = Data2[7];
|
|
|
|
case "2001":
|
|
|
|
var Data3 = Content.ReadBitArray();
|
|
|
|
Decode2001ZK(request.Content, Content);
|
|
|
|
request.Content.Data3_B7 = Data3[0];
|
|
|
|
break;
|
|
|
|
request.Content.Data3_B6 = Data3[1];
|
|
|
|
case "2103":
|
|
|
|
request.Content.Data3_B5 = Data3[2];
|
|
|
|
Decode2103ZK(request.Content, Content);
|
|
|
|
request.Content.Data3_B4 = Data3[3];
|
|
|
|
|
|
|
|
request.Content.Data3_B3 = Data3[4];
|
|
|
|
|
|
|
|
request.Content.Data3_B2 = Data3[5];
|
|
|
|
|
|
|
|
request.Content.Data3_B1 = Data3[6];
|
|
|
|
|
|
|
|
request.Content.Data3_B0 = Data3[7];
|
|
|
|
|
|
|
|
request.Content.Data4 = Content.ReadInt(1);
|
|
|
|
|
|
|
|
request.Content.Data5 = Content.ReadInt(1);
|
|
|
|
|
|
|
|
request.Content.Data6 = Content.ReadInt(1);
|
|
|
|
|
|
|
|
request.Content.Data7 = Content.ReadInt(1);
|
|
|
|
|
|
|
|
request.Content.Data8 = Content.ReadInt(2);
|
|
|
|
|
|
|
|
request.Content.Data10 = Content.ReadInt(1);
|
|
|
|
|
|
|
|
request.Content.Data11 = Content.ReadInt(1);
|
|
|
|
|
|
|
|
request.Content.Data12 = Content.ReadInt(1);
|
|
|
|
|
|
|
|
request.Content.Data13 = Content.ReadInt(1);
|
|
|
|
|
|
|
|
var Data14 = Content.ReadBitArray();
|
|
|
|
|
|
|
|
request.Content.Data14_B6 = Convert.ToInt32($"{Data14[1]}{Data14[0]}", 2);
|
|
|
|
|
|
|
|
request.Content.Data14_B5 = Data14[2];
|
|
|
|
|
|
|
|
request.Content.Data14_B4 = Data14[3];
|
|
|
|
|
|
|
|
request.Content.Data14_B3 = Data14[4];
|
|
|
|
|
|
|
|
request.Content.Data14_B2 = Data14[5];
|
|
|
|
|
|
|
|
request.Content.Data14_B1 = Data14[6];
|
|
|
|
|
|
|
|
request.Content.Data14_B0 = Data14[7];
|
|
|
|
|
|
|
|
var Data15 = Content.ReadBitArray();
|
|
|
|
|
|
|
|
request.Content.Data15_B6 = Convert.ToInt32($"{Data15[1]}{Data15[0]}", 2);
|
|
|
|
|
|
|
|
request.Content.Data15_B4 = Convert.ToInt32($"{Data15[3]}{Data15[2]}", 2);
|
|
|
|
|
|
|
|
request.Content.Data15_B3 = Data15[4];
|
|
|
|
|
|
|
|
request.Content.Data15_B2 = Data15[5];
|
|
|
|
|
|
|
|
request.Content.Data15_B1 = Data15[6];
|
|
|
|
|
|
|
|
request.Content.Data15_B0 = Data15[7];
|
|
|
|
|
|
|
|
var Data16 = Content.ReadBitArray();
|
|
|
|
|
|
|
|
request.Content.Data16_B7 = Data16[0];
|
|
|
|
|
|
|
|
request.Content.Data16_B6 = Data16[1];
|
|
|
|
|
|
|
|
request.Content.Data16_B5 = Data16[2];
|
|
|
|
|
|
|
|
request.Content.Data16_B4 = Data16[3];
|
|
|
|
|
|
|
|
request.Content.Data16_B2 = Convert.ToInt32($"{Data16[5]}{Data16[4]}", 2);
|
|
|
|
|
|
|
|
request.Content.Data16_B1 = Data16[6];
|
|
|
|
|
|
|
|
request.Content.Data16_B0 = Data16[7];
|
|
|
|
|
|
|
|
request.Content.Data17 = Content.ReadInt(1);
|
|
|
|
|
|
|
|
request.Content.Data18 = Content.ReadInt(1);
|
|
|
|
|
|
|
|
request.Content.Data19 = Content.ReadInt(1);
|
|
|
|
|
|
|
|
request.Content.Data20 = Content.ReadInt(1);
|
|
|
|
|
|
|
|
request.Content.Data21 = Content.ReadInt(1);
|
|
|
|
|
|
|
|
request.Content.Data22 = Content.ReadInt(1);
|
|
|
|
|
|
|
|
request.Content.Data23 = Content.ReadInt(1);
|
|
|
|
|
|
|
|
request.Content.Data24 = Content.ReadInt(1);
|
|
|
|
|
|
|
|
var Data25 = Content.ReadBitArray();
|
|
|
|
|
|
|
|
request.Content.Data25_B4 = Convert.ToInt32($"{Data25[3]}{Data25[2]}{Data25[1]}{Data25[0]}", 2);
|
|
|
|
|
|
|
|
request.Content.Data25_B0 = Convert.ToInt32($"{Data25[7]}{Data25[6]}{Data25[5]}{Data25[4]}", 2);
|
|
|
|
|
|
|
|
var Data26 = Content.ReadBitArray();
|
|
|
|
|
|
|
|
request.Content.Data26_B4 = Convert.ToInt32($"{Data26[3]}{Data26[2]}{Data26[1]}{Data26[0]}", 2);
|
|
|
|
|
|
|
|
request.Content.Data26_B0 = Convert.ToInt32($"{Data26[7]}{Data26[6]}{Data26[5]}{Data26[4]}", 2);
|
|
|
|
|
|
|
|
var Data27 = Content.ReadBitArray();
|
|
|
|
|
|
|
|
request.Content.Data27_B7 = Data27[0];
|
|
|
|
|
|
|
|
request.Content.Data27_B6 = Data27[1];
|
|
|
|
|
|
|
|
request.Content.Data27_B5 = Data27[2];
|
|
|
|
|
|
|
|
request.Content.Data27_B4 = Data27[3];
|
|
|
|
|
|
|
|
request.Content.Data27_B3 = Data27[4];
|
|
|
|
|
|
|
|
request.Content.Data27_B0 = Data27[7];
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
request.Content = request.Content;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch
|
|
|
|
catch
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -174,5 +116,298 @@ namespace LanShengService.Tcp
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void Decode1103RY(DeviceData device, IByteBuffer content)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
device.Version = content.ReadInt(1);
|
|
|
|
|
|
|
|
var Data2 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data2_B7 = Data2[0];
|
|
|
|
|
|
|
|
device.Data2_B6 = Data2[1];
|
|
|
|
|
|
|
|
device.Data2_B5 = Data2[2];
|
|
|
|
|
|
|
|
device.Data2_B4 = Data2[3];
|
|
|
|
|
|
|
|
device.Data2_B3 = Data2[4];
|
|
|
|
|
|
|
|
device.Data2_B2 = Data2[5];
|
|
|
|
|
|
|
|
device.Data2_B1 = Data2[6];
|
|
|
|
|
|
|
|
device.Data2_B0 = Data2[7];
|
|
|
|
|
|
|
|
var Data3 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data3_B7 = Data3[0];
|
|
|
|
|
|
|
|
device.Data3_B6 = Data3[1];
|
|
|
|
|
|
|
|
device.Data3_B5 = Data3[2];
|
|
|
|
|
|
|
|
device.Data3_B4 = Data3[3];
|
|
|
|
|
|
|
|
device.Data3_B3 = Data3[4];
|
|
|
|
|
|
|
|
device.Data3_B2 = Data3[5];
|
|
|
|
|
|
|
|
device.Data3_B1 = Data3[6];
|
|
|
|
|
|
|
|
device.Data3_B0 = Data3[7];
|
|
|
|
|
|
|
|
device.Data4 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data5 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data6 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data7 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data8 = content.ReadInt(2);
|
|
|
|
|
|
|
|
device.Data10 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data11 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data12 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data13 = content.ReadInt(1);
|
|
|
|
|
|
|
|
var Data14 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data14_B6 = Convert.ToInt32($"{Data14[1]}{Data14[0]}", 2);
|
|
|
|
|
|
|
|
device.Data14_B5 = Data14[2];
|
|
|
|
|
|
|
|
device.Data14_B4 = Data14[3];
|
|
|
|
|
|
|
|
device.Data14_B3 = Data14[4];
|
|
|
|
|
|
|
|
device.Data14_B2 = Data14[5];
|
|
|
|
|
|
|
|
device.Data14_B1 = Data14[6];
|
|
|
|
|
|
|
|
device.Data14_B0 = Data14[7];
|
|
|
|
|
|
|
|
var Data15 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data15_B6 = Convert.ToInt32($"{Data15[1]}{Data15[0]}", 2);
|
|
|
|
|
|
|
|
device.Data15_B4 = Convert.ToInt32($"{Data15[3]}{Data15[2]}", 2);
|
|
|
|
|
|
|
|
device.Data15_B3 = Data15[4];
|
|
|
|
|
|
|
|
device.Data15_B2 = Data15[5];
|
|
|
|
|
|
|
|
device.Data15_B1 = Data15[6];
|
|
|
|
|
|
|
|
device.Data15_B0 = Data15[7];
|
|
|
|
|
|
|
|
var Data16 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data16_B7 = Data16[0];
|
|
|
|
|
|
|
|
device.Data16_B6 = Data16[1];
|
|
|
|
|
|
|
|
device.Data16_B5 = Data16[2];
|
|
|
|
|
|
|
|
device.Data16_B4 = Data16[3];
|
|
|
|
|
|
|
|
device.Data16_B2 = Convert.ToInt32($"{Data16[5]}{Data16[4]}", 2);
|
|
|
|
|
|
|
|
device.Data16_B1 = Data16[6];
|
|
|
|
|
|
|
|
device.Data16_B0 = Data16[7];
|
|
|
|
|
|
|
|
device.Data17 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data18 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data19 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data20 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data21 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data22 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data23 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data24 = content.ReadInt(1);
|
|
|
|
|
|
|
|
var Data25 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data25_B4 = Convert.ToInt32($"{Data25[3]}{Data25[2]}{Data25[1]}{Data25[0]}", 2);
|
|
|
|
|
|
|
|
device.Data25_B0 = Convert.ToInt32($"{Data25[7]}{Data25[6]}{Data25[5]}{Data25[4]}", 2);
|
|
|
|
|
|
|
|
var Data26 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data26_B4 = Convert.ToInt32($"{Data26[3]}{Data26[2]}{Data26[1]}{Data26[0]}", 2);
|
|
|
|
|
|
|
|
device.Data26_B0 = Convert.ToInt32($"{Data26[7]}{Data26[6]}{Data26[5]}{Data26[4]}", 2);
|
|
|
|
|
|
|
|
var Data27 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data27_B7 = Data27[0];
|
|
|
|
|
|
|
|
device.Data27_B6 = Data27[1];
|
|
|
|
|
|
|
|
device.Data27_B5 = Data27[2];
|
|
|
|
|
|
|
|
device.Data27_B4 = Data27[3];
|
|
|
|
|
|
|
|
device.Data27_B3 = Data27[4];
|
|
|
|
|
|
|
|
device.Data27_B0 = Data27[7];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void Decode1103ZK(DeviceData device, IByteBuffer content)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
device.Version = content.ReadInt(1);
|
|
|
|
|
|
|
|
var Data2 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data2_B7 = Data2[0];
|
|
|
|
|
|
|
|
device.Data2_B6 = Data2[1];
|
|
|
|
|
|
|
|
device.Data2_B5 = Data2[2];
|
|
|
|
|
|
|
|
device.Data2_B4 = Data2[3];
|
|
|
|
|
|
|
|
device.Data2_B3 = Data2[4];
|
|
|
|
|
|
|
|
device.Data2_B2 = Data2[5];
|
|
|
|
|
|
|
|
device.Data2_B1 = Data2[6];
|
|
|
|
|
|
|
|
device.Data2_B0 = Data2[7];
|
|
|
|
|
|
|
|
var Data3 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data3_B7 = Data3[0];
|
|
|
|
|
|
|
|
device.Data3_B6 = Data3[1];
|
|
|
|
|
|
|
|
device.Data3_B5 = Data3[2];
|
|
|
|
|
|
|
|
device.Data3_B4 = Data3[3];
|
|
|
|
|
|
|
|
device.Data3_B3 = Data3[4];
|
|
|
|
|
|
|
|
device.Data3_B2 = Data3[5];
|
|
|
|
|
|
|
|
device.Data3_B1 = Data3[6];
|
|
|
|
|
|
|
|
device.Data3_B0 = Data3[7];
|
|
|
|
|
|
|
|
device.Data4 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data5 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data6 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data7 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data8 = content.ReadInt(2);
|
|
|
|
|
|
|
|
device.Data10 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data11 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data12 = content.ReadInt(1);
|
|
|
|
|
|
|
|
var Data13 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data13_B7 = Data13[0];
|
|
|
|
|
|
|
|
device.Data13_B6 = Data13[1];
|
|
|
|
|
|
|
|
var Data14 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data14_B6 = Convert.ToInt32($"{Data14[1]}{Data14[0]}", 2);
|
|
|
|
|
|
|
|
device.Data14_B5 = Data14[2];
|
|
|
|
|
|
|
|
device.Data14_B4 = Data14[3];
|
|
|
|
|
|
|
|
device.Data14_B3 = Data14[4];
|
|
|
|
|
|
|
|
device.Data14_B2 = Data14[5];
|
|
|
|
|
|
|
|
device.Data14_B1 = Data14[6];
|
|
|
|
|
|
|
|
device.Data14_B0 = Data14[7];
|
|
|
|
|
|
|
|
var Data15 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data15_B6 = Convert.ToInt32($"{Data15[1]}{Data15[0]}", 2);
|
|
|
|
|
|
|
|
device.Data15_B4 = Convert.ToInt32($"{Data15[3]}{Data15[2]}", 2);
|
|
|
|
|
|
|
|
device.Data15_B3 = Data15[4];
|
|
|
|
|
|
|
|
device.Data15_B2 = Data15[5];
|
|
|
|
|
|
|
|
device.Data15_B1 = Data15[6];
|
|
|
|
|
|
|
|
device.Data15_B0 = Data15[7];
|
|
|
|
|
|
|
|
var Data16 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data16_B7 = Data16[0];
|
|
|
|
|
|
|
|
device.Data16_B6 = Data16[1];
|
|
|
|
|
|
|
|
device.Data16_B5_N = Data16[2];
|
|
|
|
|
|
|
|
device.Data16_B4 = Data16[3];
|
|
|
|
|
|
|
|
device.Data16_B2 = Convert.ToInt32($"{Data16[5]}{Data16[4]}", 2);
|
|
|
|
|
|
|
|
device.Data16_B1 = Data16[6];
|
|
|
|
|
|
|
|
device.Data16_B0 = Data16[7];
|
|
|
|
|
|
|
|
device.Data17 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data18 = content.ReadInt(1);
|
|
|
|
|
|
|
|
var Data19 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data19_B7 = Data19[0];
|
|
|
|
|
|
|
|
device.Data19_B6 = Data19[1];
|
|
|
|
|
|
|
|
device.Data19_B5 = Data19[2];
|
|
|
|
|
|
|
|
device.Data19_B4 = Data19[3];
|
|
|
|
|
|
|
|
device.Data19_B3 = Data19[4];
|
|
|
|
|
|
|
|
device.Data19_B2 = Data19[5];
|
|
|
|
|
|
|
|
device.Data19_B1 = Data19[6];
|
|
|
|
|
|
|
|
device.Data20 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data21 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data22 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data23 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data24 = content.ReadInt(1);
|
|
|
|
|
|
|
|
var Data25 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data25_B4 = Convert.ToInt32($"{Data25[3]}{Data25[2]}{Data25[1]}{Data25[0]}", 2);
|
|
|
|
|
|
|
|
device.Data25_B0 = Convert.ToInt32($"{Data25[7]}{Data25[6]}{Data25[5]}{Data25[4]}", 2);
|
|
|
|
|
|
|
|
var Data26 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data26_B4 = Convert.ToInt32($"{Data26[3]}{Data26[2]}{Data26[1]}{Data26[0]}", 2);
|
|
|
|
|
|
|
|
device.Data26_B0 = Convert.ToInt32($"{Data26[7]}{Data26[6]}{Data26[5]}{Data26[4]}", 2);
|
|
|
|
|
|
|
|
var Data27 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data27_B7 = Data27[0];
|
|
|
|
|
|
|
|
device.Data27_B6 = Data27[1];
|
|
|
|
|
|
|
|
device.Data27_B5 = Data27[2];
|
|
|
|
|
|
|
|
device.Data27_B4 = Data27[3];
|
|
|
|
|
|
|
|
device.Data27_B3 = Data27[4];
|
|
|
|
|
|
|
|
var Data28 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data28_B7 = Data28[0];
|
|
|
|
|
|
|
|
device.Data28_B6 = Data28[1];
|
|
|
|
|
|
|
|
device.Data28_B5 = Data28[2];
|
|
|
|
|
|
|
|
device.Data28_B4 = Data28[3];
|
|
|
|
|
|
|
|
device.Data28_B3 = Data28[4];
|
|
|
|
|
|
|
|
device.Data28_B2 = Data28[5];
|
|
|
|
|
|
|
|
device.Data28_B1 = Data28[6];
|
|
|
|
|
|
|
|
device.Data28_B0 = Data28[7];
|
|
|
|
|
|
|
|
var Data29 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data29_B6 = Data29[1];
|
|
|
|
|
|
|
|
device.Data29_B5 = Data29[2];
|
|
|
|
|
|
|
|
device.Data29_B4 = Data29[3];
|
|
|
|
|
|
|
|
device.Data29_B3 = Data29[4];
|
|
|
|
|
|
|
|
device.Data30 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data31 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data32_33 = content.ReadInt(2);
|
|
|
|
|
|
|
|
device.Data34 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data35 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data36 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data37 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data38_39 = content.ReadInt(2);
|
|
|
|
|
|
|
|
device.Data40 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data41 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data42_43 = content.ReadInt(2);
|
|
|
|
|
|
|
|
device.Data44 = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.Data45_46 = content.ReadInt(2);
|
|
|
|
|
|
|
|
device.Data47_48 = content.ReadInt(2);
|
|
|
|
|
|
|
|
device.Data49_50 = content.ReadInt(2);
|
|
|
|
|
|
|
|
device.Data51_52 = content.ReadInt(2);
|
|
|
|
|
|
|
|
device.Data53_54 = content.ReadInt(2);
|
|
|
|
|
|
|
|
device.Data55_56 = content.ReadInt(2);
|
|
|
|
|
|
|
|
device.Data57_58 = content.ReadInt(2);
|
|
|
|
|
|
|
|
device.Data59_60 = content.ReadInt(2);
|
|
|
|
|
|
|
|
device.Data61_62 = content.ReadInt(2);
|
|
|
|
|
|
|
|
device.Data63_64 = content.ReadInt(2);
|
|
|
|
|
|
|
|
device.Data65_66 = content.ReadInt(2);
|
|
|
|
|
|
|
|
var Data67 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data67_B7 = Data67[0];
|
|
|
|
|
|
|
|
device.Data67_B6 = Data67[1];
|
|
|
|
|
|
|
|
device.Data67_B5 = Data67[2];
|
|
|
|
|
|
|
|
device.Data67_B4 = Data67[3];
|
|
|
|
|
|
|
|
device.Data67_B3 = Data67[4];
|
|
|
|
|
|
|
|
device.Data67_B2 = Data67[5];
|
|
|
|
|
|
|
|
device.Data67_B1 = Data67[6];
|
|
|
|
|
|
|
|
device.Data67_B0 = Data67[7];
|
|
|
|
|
|
|
|
var Data68 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data68_B7 = Data68[0];
|
|
|
|
|
|
|
|
device.Data68_B6 = Data68[1];
|
|
|
|
|
|
|
|
device.Data68_B5 = Data68[2];
|
|
|
|
|
|
|
|
device.Data68_B4 = Data68[3];
|
|
|
|
|
|
|
|
device.Data68_B3 = Data68[4];
|
|
|
|
|
|
|
|
device.Data68_B2 = Data68[5];
|
|
|
|
|
|
|
|
device.Data68_B1 = Data68[6];
|
|
|
|
|
|
|
|
device.Data68_B0 = Data68[7];
|
|
|
|
|
|
|
|
var Data69 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data69_B7 = Data69[0];
|
|
|
|
|
|
|
|
device.Data69_B6 = Data69[1];
|
|
|
|
|
|
|
|
device.Data69_B5 = Data69[2];
|
|
|
|
|
|
|
|
device.Data69_B4 = Data69[3];
|
|
|
|
|
|
|
|
device.Data69_B3 = Data69[4];
|
|
|
|
|
|
|
|
device.Data69_B2 = Data69[5];
|
|
|
|
|
|
|
|
device.Data69_B1 = Data69[6];
|
|
|
|
|
|
|
|
device.Data69_B0 = Data69[7];
|
|
|
|
|
|
|
|
var Data70 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data70_B7 = Data70[0];
|
|
|
|
|
|
|
|
device.Data70_B6 = Data70[1];
|
|
|
|
|
|
|
|
device.Data70_B5 = Data70[2];
|
|
|
|
|
|
|
|
device.Data70_B4 = Data70[3];
|
|
|
|
|
|
|
|
device.Data70_B3 = Data70[4];
|
|
|
|
|
|
|
|
device.Data70_B2 = Data70[5];
|
|
|
|
|
|
|
|
device.Data70_B1 = Data70[6];
|
|
|
|
|
|
|
|
device.Data70_B0 = Data70[7];
|
|
|
|
|
|
|
|
var Data71 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data71_B7 = Data71[0];
|
|
|
|
|
|
|
|
device.Data71_B6 = Data71[1];
|
|
|
|
|
|
|
|
device.Data71_B5 = Data71[2];
|
|
|
|
|
|
|
|
device.Data71_B4 = Data71[3];
|
|
|
|
|
|
|
|
device.Data71_B3 = Data71[4];
|
|
|
|
|
|
|
|
device.Data71_B2 = Data71[5];
|
|
|
|
|
|
|
|
device.Data71_B1 = Data71[6];
|
|
|
|
|
|
|
|
device.Data71_B0 = Data71[7];
|
|
|
|
|
|
|
|
var Data72 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data72_B7 = Data72[0];
|
|
|
|
|
|
|
|
device.Data72_B6 = Data72[1];
|
|
|
|
|
|
|
|
device.Data72_B5 = Data72[2];
|
|
|
|
|
|
|
|
device.Data72_B4 = Data72[3];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void Decode1001RY(DeviceData device, IByteBuffer content)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
device.AgreementVersion = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.DataTick = content.ReadInt(2);
|
|
|
|
|
|
|
|
device.ICCID = content.ReadString(20, Encoding.ASCII);
|
|
|
|
|
|
|
|
content.SkipBytes(4);
|
|
|
|
|
|
|
|
device.Longitude = content.ReadString(9, Encoding.ASCII);
|
|
|
|
|
|
|
|
device.Latitude = content.ReadString(8, Encoding.ASCII);
|
|
|
|
|
|
|
|
device.ConnectStrLength = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.ConnectString = content.ReadString((int)device.ConnectStrLength, Encoding.ASCII);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void Decode1001ZK(DeviceData device, IByteBuffer content)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
device.AgreementVersion = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.DataTick = content.ReadInt(2);
|
|
|
|
|
|
|
|
device.ICCID = content.ReadString(20, Encoding.ASCII);
|
|
|
|
|
|
|
|
device.WZGPS = content.ReadString(17, Encoding.ASCII);
|
|
|
|
|
|
|
|
content.SkipBytes(4);
|
|
|
|
|
|
|
|
device.Longitude = content.ReadString(9, Encoding.ASCII);
|
|
|
|
|
|
|
|
device.Latitude = content.ReadString(8, Encoding.ASCII);
|
|
|
|
|
|
|
|
device.ConnectStrLength = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.ConnectString = content.ReadString((int)device.ConnectStrLength, Encoding.ASCII);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void Decode2001ZK(DeviceData device,IByteBuffer content)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
device.AgreementVersion = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.DataTick = content.ReadInt(2);
|
|
|
|
|
|
|
|
device.ICCID = content.ReadString(20, Encoding.ASCII);
|
|
|
|
|
|
|
|
device.WZGPS = content.ReadString(17, Encoding.ASCII);
|
|
|
|
|
|
|
|
content.SkipBytes(4);
|
|
|
|
|
|
|
|
device.Longitude = content.ReadString(9, Encoding.ASCII);
|
|
|
|
|
|
|
|
device.Latitude = content.ReadString(8, Encoding.ASCII);
|
|
|
|
|
|
|
|
device.ConnectStrLength = content.ReadInt(1);
|
|
|
|
|
|
|
|
device.ConnectString = content.ReadString((int)device.ConnectStrLength, Encoding.ASCII);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void Decode2103ZK(DeviceData device,IByteBuffer content)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
device.AgreementVersion = content.ReadInt(1);
|
|
|
|
|
|
|
|
var Data2 = content.ReadBitArray();
|
|
|
|
|
|
|
|
device.Data2_B7_2103 = Data2[0];
|
|
|
|
|
|
|
|
device.Data2_B6_2103 = Data2[1];
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|