public void Enable_AccessSpec() { MSG_ERROR_MESSAGE msg_err; MSG_ENABLE_ACCESSSPEC msg = new MSG_ENABLE_ACCESSSPEC(); msg.AccessSpecID = 456; MSG_ENABLE_ACCESSSPEC_RESPONSE rsp = reader.ENABLE_ACCESSSPEC(msg, out msg_err, 2000); if (rsp != null) { // Success Console.WriteLine(rsp.ToString()); } else if (msg_err != null) { // Error Console.WriteLine(msg_err.ToString()); } else { // Timeout Console.WriteLine("Timeout Error."); } }
private void ENABLE_ACCESSSPEC() { MSG_ENABLE_ACCESSSPEC msg = new MSG_ENABLE_ACCESSSPEC(); msg.AccessSpecID = 1001; MSG_ENABLE_ACCESSSPEC_RESPONSE rsp = reader.ENABLE_ACCESSSPEC(msg, out msg_err, 3000); if (rsp != null) { textBox2.Text = rsp.ToString(); } else if (msg_err != null) { textBox2.Text = msg_err.ToString(); } else { textBox2.Text = "Command time out!"; } }
public void ENABLE_ACCESSSPEC() { MSG_ENABLE_ACCESSSPEC msg = new MSG_ENABLE_ACCESSSPEC(); msg.AccessSpecID = 1001; MSG_ENABLE_ACCESSSPEC_RESPONSE rsp = client.ENABLE_ACCESSSPEC(msg, out msg_err, 3000); if (rsp != null) { //textBox2.Text = rsp.ToString() + "\n"; WriteMessage(rsp.ToString(), "ENABLE_ACCESSSPEC"); } else if (msg_err != null) { readerMgr.AppendToDebugTextBox("ENABLE_ACCESSSPEC " + msg_err.ToString() + "\n"); } else { readerMgr.AppendToDebugTextBox("ENABLE_ACCESSSPEC Command time out!" + "\n"); } }