All pastes #988117 Raw Edit

Someone

public text v1 · immutable
#988117 ·published 2008-04-17 08:03 UTC
rendered paste body
public class modemclass extends Thread implements SerialPortEventListener  {

	private int waitForOutput = 0;
	
	// 0 None
	// 1 OK
	// 2 No dialtone
	// 3 No carrier
	// 4 Busy
	// 5 Timeout

    javax.swing.Timer writeOutTimer = new javax.swing.Timer(10000, new ActionListener() {
        public void actionPerformed(ActionEvent e) {
        	print("Timer triggerd");
            waitForOutput = 5;
        }
     });
    

	public modemclass(String portName, String tempMode, String tempNumber, String name) {
		super(name);

		mode = tempMode;
		numberToCall = tempNumber;
		initSerial(portName);
		initModem();
		setupFiles(mode);
	}


	
	
	public void run()
	{
		while(running)
		{
			print("" +  waitForOutput + " == 5");
			if(waitForOutput == 5)
                        {
                            Never reach here
                        }

.
.
.
.