using BatCharging.Model; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BatCharging.Service { public static class PublicProgram { public static string failName01 = null; public static string failName02 = null; public static string failName03 = null; public static string failName04 = null; public static List APCI(APDUModel baseApci) { List lstResult = null; if (baseApci != null) { lstResult = new List(); //起始域 lstResult.Add(baseApci.OriginDomain1); lstResult.Add(baseApci.OriginDomain2); //长度域 byte[] packLens = BitConverter.GetBytes(baseApci.LengthDomain); lstResult.AddRange(packLens); //信息域 lstResult.Add(baseApci.infoDomain); //序列号域 lstResult.Add(baseApci.SerialNumberDomain); //源地址 byte[] packSrcs = BitConverter.GetBytes(baseApci.CMD); lstResult.AddRange(packSrcs); //数据域 lstResult.AddRange(baseApci.dataDomain); //校验和域 lstResult.Add(baseApci.checksumDomain); } return lstResult; } } }