private void ReceivedFunc(XmReceiveData data) { switch (data.BlockName) { case "t1102OutBlock": t1102OutBlock(data); break; } }
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); }
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); } }
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); }
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); }
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); } }
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); } } }
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); } }