rendered paste bodypublic 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
}
.
.
.
.