using BatCharging.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BatCharging.Service
{
///
/// 解析监控网关上送尖峰平谷设置
///
public class MsgSdUpPkFtValSetDecoder
{
///
/// 解析监控网关上送尖峰平谷设置
///
///
///
public SdUpPkFtValSet GetMsgSdUpPkFtValSet(byte[] data)
{
SdUpPkFtValSet sdUpPkFtValSet = null;
if (data.Count() >= 50)
{
sdUpPkFtValSet = new SdUpPkFtValSet();
sdUpPkFtValSet.NumberTime = data[25];
sdUpPkFtValSet.StartHH1 = data[26];
sdUpPkFtValSet.StartMM1 = data[27];
sdUpPkFtValSet.StartTime1 = sdUpPkFtValSet.StartHH1.ToString() + ":" + sdUpPkFtValSet.StartMM1.ToString();
sdUpPkFtValSet.TimePeak1 = data[28];
sdUpPkFtValSet.StartHH2 = data[29];
sdUpPkFtValSet.StartMM2 = data[30];
sdUpPkFtValSet.StartTime2 = sdUpPkFtValSet.StartHH2.ToString() + ":" + sdUpPkFtValSet.StartMM2.ToString();
sdUpPkFtValSet.TimePeak2 = data[31];
sdUpPkFtValSet.StartHH3 = data[32];
sdUpPkFtValSet.StartMM3 = data[33];
sdUpPkFtValSet.StartTime3 = sdUpPkFtValSet.StartHH3.ToString() + ":" + sdUpPkFtValSet.StartMM3.ToString();
sdUpPkFtValSet.TimePeak3 = data[34];
sdUpPkFtValSet.StartHH4 = data[35];
sdUpPkFtValSet.StartMM4 = data[36];
sdUpPkFtValSet.StartTime4 = sdUpPkFtValSet.StartHH4.ToString() + ":" + sdUpPkFtValSet.StartMM4.ToString();
sdUpPkFtValSet.TimePeak4 = data[37];
sdUpPkFtValSet.StartHH5 = data[38];
sdUpPkFtValSet.StartMM5 = data[39];
sdUpPkFtValSet.StartTime5 = sdUpPkFtValSet.StartHH5.ToString() + ":" + sdUpPkFtValSet.StartMM5.ToString();
sdUpPkFtValSet.TimePeak5 = data[40];
sdUpPkFtValSet.StartHH6 = data[41];
sdUpPkFtValSet.StartMM6 = data[42];
sdUpPkFtValSet.StartTime6 = sdUpPkFtValSet.StartHH6.ToString() + ":" + sdUpPkFtValSet.StartMM6.ToString();
sdUpPkFtValSet.TimePeak6 = data[43];
sdUpPkFtValSet.StartHH7 = data[44];
sdUpPkFtValSet.StartMM7 = data[45];
sdUpPkFtValSet.StartTime7 = sdUpPkFtValSet.StartHH7.ToString() + ":" + sdUpPkFtValSet.StartMM7.ToString();
sdUpPkFtValSet.TimePeak7 = data[46];
sdUpPkFtValSet.StartHH8 = data[47];
sdUpPkFtValSet.StartMM8 = data[48];
sdUpPkFtValSet.StartTime8 = sdUpPkFtValSet.StartHH8.ToString() + ":" + sdUpPkFtValSet.StartMM8.ToString();
sdUpPkFtValSet.TimePeak8 = data[49];
sdUpPkFtValSet.StartHH9 = data[50];
sdUpPkFtValSet.StartMM9 = data[51];
sdUpPkFtValSet.StartTime9 = sdUpPkFtValSet.StartHH9.ToString() + ":" + sdUpPkFtValSet.StartMM9.ToString();
sdUpPkFtValSet.TimePeak9 = data[52];
sdUpPkFtValSet.StartHH10 = data[53];
sdUpPkFtValSet.StartMM10 = data[54];
sdUpPkFtValSet.StartTime10 = sdUpPkFtValSet.StartHH10.ToString() + ":" + sdUpPkFtValSet.StartMM10.ToString();
sdUpPkFtValSet.TimePeak10 = data[55];
sdUpPkFtValSet.StartHH11 = data[56];
sdUpPkFtValSet.StartMM11 = data[57];
sdUpPkFtValSet.StartTime11 = sdUpPkFtValSet.StartHH11.ToString() + ":" + sdUpPkFtValSet.StartMM11.ToString();
sdUpPkFtValSet.TimePeak11 = data[58];
sdUpPkFtValSet.StartHH12 = data[59];
sdUpPkFtValSet.StartMM12 = data[60];
sdUpPkFtValSet.StartTime12 = sdUpPkFtValSet.StartHH12.ToString() + ":" + sdUpPkFtValSet.StartMM12.ToString();
sdUpPkFtValSet.TimePeak12 = data[61];
sdUpPkFtValSet.StartHH13 = data[62];
sdUpPkFtValSet.StartMM13 = data[63];
sdUpPkFtValSet.StartTime13 = sdUpPkFtValSet.StartHH13.ToString() + ":" + sdUpPkFtValSet.StartMM13.ToString();
sdUpPkFtValSet.TimePeak13 = data[64];
sdUpPkFtValSet.StartHH14 = data[65];
sdUpPkFtValSet.StartMM14 = data[66];
sdUpPkFtValSet.StartTime14 = sdUpPkFtValSet.StartHH14.ToString() + ":" + sdUpPkFtValSet.StartMM14.ToString();
sdUpPkFtValSet.TimePeak14 = data[67];
sdUpPkFtValSet.StartHH15 = data[68];
sdUpPkFtValSet.StartMM15 = data[69];
sdUpPkFtValSet.StartTime15 = sdUpPkFtValSet.StartHH15.ToString() + ":" + sdUpPkFtValSet.StartMM15.ToString();
sdUpPkFtValSet.TimePeak15 = data[70];
sdUpPkFtValSet.StartHH16 = data[71];
sdUpPkFtValSet.StartMM16 = data[72];
sdUpPkFtValSet.StartTime16 = sdUpPkFtValSet.StartHH16.ToString() + ":" + sdUpPkFtValSet.StartMM16.ToString();
sdUpPkFtValSet.TimePeak16 = data[73];
sdUpPkFtValSet.StartHH17 = data[74];
sdUpPkFtValSet.StartMM17 = data[75];
sdUpPkFtValSet.StartTime17 = sdUpPkFtValSet.StartHH17.ToString() + ":" + sdUpPkFtValSet.StartMM17.ToString();
sdUpPkFtValSet.TimePeak17 = data[76];
sdUpPkFtValSet.StartHH18 = data[77];
sdUpPkFtValSet.StartMM18 = data[78];
sdUpPkFtValSet.StartTime18 = sdUpPkFtValSet.StartHH18.ToString() + ":" + sdUpPkFtValSet.StartMM18.ToString();
sdUpPkFtValSet.TimePeak18 = data[79];
sdUpPkFtValSet.StartHH19 = data[80];
sdUpPkFtValSet.StartMM19 = data[81];
sdUpPkFtValSet.StartTime19 = sdUpPkFtValSet.StartHH19.ToString() + ":" + sdUpPkFtValSet.StartMM19.ToString();
sdUpPkFtValSet.TimePeak19 = data[82];
sdUpPkFtValSet.StartHH20 = data[83];
sdUpPkFtValSet.StartMM20 = data[84];
sdUpPkFtValSet.StartTime20 = sdUpPkFtValSet.StartHH20.ToString() + ":" + sdUpPkFtValSet.StartMM20.ToString();
sdUpPkFtValSet.TimePeak20 = data[85];
sdUpPkFtValSet.StartHH21 = data[86];
sdUpPkFtValSet.StartMM21 = data[87];
sdUpPkFtValSet.StartTime21 = sdUpPkFtValSet.StartHH21.ToString() + ":" + sdUpPkFtValSet.StartMM21.ToString();
sdUpPkFtValSet.TimePeak21 = data[88];
sdUpPkFtValSet.StartHH22 = data[89];
sdUpPkFtValSet.StartMM22 = data[90];
sdUpPkFtValSet.StartTime22 = sdUpPkFtValSet.StartHH22.ToString() + ":" + sdUpPkFtValSet.StartMM22.ToString();
sdUpPkFtValSet.TimePeak22 = data[91];
sdUpPkFtValSet.StartHH23 = data[92];
sdUpPkFtValSet.StartMM23 = data[93];
sdUpPkFtValSet.StartTime23 = sdUpPkFtValSet.StartHH23.ToString() + ":" + sdUpPkFtValSet.StartMM23.ToString();
sdUpPkFtValSet.TimePeak23 = data[94];
sdUpPkFtValSet.StartHH24 = data[95];
sdUpPkFtValSet.StartMM24 = data[96];
sdUpPkFtValSet.StartTime24 = sdUpPkFtValSet.StartHH24.ToString() + ":" + sdUpPkFtValSet.StartMM24.ToString();
sdUpPkFtValSet.TimePeak24 = data[97];
}
return sdUpPkFtValSet;
}
}
}