示例#1
0
        public SFDump(SFDumpRaw raw)
        {
            var builder = new StringBuilder();

            for (int i = 0; i < raw.IDm.Length; i++)
            {
                builder.Append($"{raw.IDm[i]:X02}");
            }
            IDm    = builder.ToString();
            Blocks = new byte[raw.cnt][];
            for (int i = 0; i < raw.cnt; i++)
            {
                var len = raw.blocks[i].data.Length;
                Blocks[i] = new byte[len];
                Array.Copy(raw.blocks[i].data, Blocks[i], len);
            }
        }
示例#2
0
文件: Program.cs 项目: muojp/pafenet
        static void Main(string[] args)
        {
            var dump = SFDumpRaw.DumpISFBytes(0x0003, 0x090f);

            if (dump == null)
            {
                Console.WriteLine($"Error ocurred.");
                return;
            }

            Console.WriteLine($"IDm: {dump.IDm}");
            foreach (var block in dump.Blocks)
            {
                for (int i = 0; i < block.Length; i++)
                {
                    Console.Write($"{block[i]:X02}");
                }
                Console.Write("\n");
            }
            Console.WriteLine(JsonConvert.SerializeObject(dump));
        }
示例#3
0
 static extern int DumpSFBytes(out SFDumpRaw dest, int systemCode, int serviceCode, int retry);