private void button_read_short_Click(object sender, EventArgs e) { // 读取short变量 DemoUtils.ReadResultRender(busTcpClient.ReadInt16(textBox3.Text), textBox3.Text, textBox4); // 这一行是测试读取short数组的代码,忽略就行 // short[] values = busTcpClient.ReadInt16( "100", 2 ).Content; }
private void thread_test2( ) { int count = 500; while (count > 0) { if (!busTcpClient.Write("100", (short)1234).IsSuccess) { failed++; } if (!busTcpClient.ReadInt16("100").IsSuccess) { failed++; } count--; } thread_end( ); }