示例#1
0
 private void ReceivedFunc(XmReceiveData data)
 {
     switch (data.BlockName)
     {
         case "t1102OutBlock": t1102OutBlock(data); break;
     }
 }
示例#2
0
        private void ReceivedFunc(XmReceiveData data)
        {
            TRResult tr_res = new TRResult();

            IntPtr cur_ptr = data.Data;

            t0424._t0424OutBlock out_block = (t0424._t0424OutBlock)Marshal.PtrToStructure(cur_ptr, typeof(t0424._t0424OutBlock));
            PushResult<t0424._t0424OutBlock>(out_block, "out_block", ref tr_res);
            cur_ptr = IntPtr.Add(cur_ptr, Marshal.SizeOf(out_block));

            //Extract occur count
            t0424.BlockCount block_count = (t0424.BlockCount)Marshal.PtrToStructure(cur_ptr, typeof(t0424.BlockCount));
            int count = Int32.Parse(Encoding.ASCII.GetString(block_count.count_).TrimStart('0'));
            cur_ptr = IntPtr.Add(cur_ptr, Marshal.SizeOf(block_count));

            //OutBlock1
            for (int i = 0; i < count; i++)
            {
                t0424._t0424OutBlock1 out_block1 = (t0424._t0424OutBlock1)Marshal.PtrToStructure(cur_ptr, typeof(t0424._t0424OutBlock1));
                PushResult<t0424._t0424OutBlock1>(out_block1, "out_block1", ref tr_res);
                cur_ptr = IntPtr.Add(cur_ptr, Marshal.SizeOf(out_block1));
            }

            if (CompleteCB != null) CompleteCB(ep_, tr_res);
        }
示例#3
0
        private void ReceivedFunc(XmReceiveData data)
        {
            TRResult tr_res = new TRResult();

            IntPtr cur_ptr = data.Data;

            t0424._t0424OutBlock out_block = (t0424._t0424OutBlock)Marshal.PtrToStructure(cur_ptr, typeof(t0424._t0424OutBlock));
            PushResult <t0424._t0424OutBlock>(out_block, "out_block", ref tr_res);
            cur_ptr = IntPtr.Add(cur_ptr, Marshal.SizeOf(out_block));

            //Extract occur count
            t0424.BlockCount block_count = (t0424.BlockCount)Marshal.PtrToStructure(cur_ptr, typeof(t0424.BlockCount));
            int count = Int32.Parse(Encoding.ASCII.GetString(block_count.count_).TrimStart('0'));

            cur_ptr = IntPtr.Add(cur_ptr, Marshal.SizeOf(block_count));

            //OutBlock1
            for (int i = 0; i < count; i++)
            {
                t0424._t0424OutBlock1 out_block1 = (t0424._t0424OutBlock1)Marshal.PtrToStructure(cur_ptr, typeof(t0424._t0424OutBlock1));
                PushResult <t0424._t0424OutBlock1>(out_block1, "out_block1", ref tr_res);
                cur_ptr = IntPtr.Add(cur_ptr, Marshal.SizeOf(out_block1));
            }

            if (CompleteCB != null)
            {
                CompleteCB(ep_, tr_res);
            }
        }
示例#4
0
 private void ReceivedFunc(XmReceiveData data)
 {
     switch (data.BlockName)
     {
     case "t1102OutBlock": t1102OutBlock(data); break;
     }
 }
示例#5
0
        private void t1102OutBlock(XmReceiveData data)
        {
            TRResult tr_res = new TRResult();

            t1102._t1102OutBlock out_block = (t1102._t1102OutBlock)Marshal.PtrToStructure(data.Data, typeof(t1102._t1102OutBlock));
            PushResult<t1102._t1102OutBlock>(out_block, "out_block", ref tr_res);

            if (CompleteCB != null) CompleteCB(ep_, tr_res);
        }
示例#6
0
        private void ReceivedFunc(XmReceiveData data)
        {
            TRResult tr_res = new TRResult();

            CSPAQ12200._CSPAQ12200OutBlock1 out_block1 = (CSPAQ12200._CSPAQ12200OutBlock1)Marshal.PtrToStructure(data.Data, typeof(CSPAQ12200._CSPAQ12200OutBlock1));
            PushResult<CSPAQ12200._CSPAQ12200OutBlock1>(out_block1, "out_block1", ref tr_res);

            CSPAQ12200._CSPAQ12200OutBlock2 out_block2 = (CSPAQ12200._CSPAQ12200OutBlock2)Marshal.PtrToStructure(IntPtr.Add(data.Data, Marshal.SizeOf(out_block1)), typeof(CSPAQ12200._CSPAQ12200OutBlock2));
            PushResult<CSPAQ12200._CSPAQ12200OutBlock2>(out_block2, "out_block2", ref tr_res);

            if (CompleteCB != null) CompleteCB(ep_, tr_res);
        }
示例#7
0
        private void t1102OutBlock(XmReceiveData data)
        {
            TRResult tr_res = new TRResult();

            t1102._t1102OutBlock out_block = (t1102._t1102OutBlock)Marshal.PtrToStructure(data.Data, typeof(t1102._t1102OutBlock));
            PushResult <t1102._t1102OutBlock>(out_block, "out_block", ref tr_res);

            if (CompleteCB != null)
            {
                CompleteCB(ep_, tr_res);
            }
        }
示例#8
0
        private void RecvData(ref Message m)
        {
            XmReceiveData hts_recv_pkt = new XmReceiveData();

            Marshal.PtrToStructure(m.LParam, hts_recv_pkt);

            if (query_ != null && hts_recv_pkt.DataLength > 0)
            {
                if (query_.ReceivedCB != null)
                {
                    query_.ReceivedCB(hts_recv_pkt);
                }
            }
        }
示例#9
0
        private void ReceivedFunc(XmReceiveData data)
        {
            TRResult tr_res = new TRResult();

            CSPAQ12200._CSPAQ12200OutBlock1 out_block1 = (CSPAQ12200._CSPAQ12200OutBlock1)Marshal.PtrToStructure(data.Data, typeof(CSPAQ12200._CSPAQ12200OutBlock1));
            PushResult <CSPAQ12200._CSPAQ12200OutBlock1>(out_block1, "out_block1", ref tr_res);

            CSPAQ12200._CSPAQ12200OutBlock2 out_block2 = (CSPAQ12200._CSPAQ12200OutBlock2)Marshal.PtrToStructure(IntPtr.Add(data.Data, Marshal.SizeOf(out_block1)), typeof(CSPAQ12200._CSPAQ12200OutBlock2));
            PushResult <CSPAQ12200._CSPAQ12200OutBlock2>(out_block2, "out_block2", ref tr_res);

            if (CompleteCB != null)
            {
                CompleteCB(ep_, tr_res);
            }
        }