Cep Terminals GSM/GPRS TERMINAL CT63 JAVA 6203 Manuale Utente
Codici prodotto
6203
Java User’s Guide
12.1 Using the AT Command API
109
wm_java_usersguide_v19
Page 106 of 109
2012-01-27
Confidential / Released
12.1.3.2
Implementation
class ATListenerA implements ATCommandListener {
public void ATEvent(String Event) {
if (Event.indexOf("+CALA: Reminder 1") >= 0) {
/* take desired action after receiving the reminder */
} else if (Event.indexOf("+CALA: Reminder 2") >= 0) {
/* take desired action after receiving the reminder */
} else if (Event.indexOf("+CALA: Reminder 3") >= 0) {
/* take desired action after receiving the reminder */
}
/* No action taken for these events */
public void RINGChanged(boolean SignalState) {}
public void DCDChanged(boolean SignalState) {}
public void DSRChanged(boolean SignalState) {}
}
if (Event.indexOf("+CALA: Reminder 1") >= 0) {
/* take desired action after receiving the reminder */
} else if (Event.indexOf("+CALA: Reminder 2") >= 0) {
/* take desired action after receiving the reminder */
} else if (Event.indexOf("+CALA: Reminder 3") >= 0) {
/* take desired action after receiving the reminder */
}
/* No action taken for these events */
public void RINGChanged(boolean SignalState) {}
public void DCDChanged(boolean SignalState) {}
public void DSRChanged(boolean SignalState) {}
}
class ATListenerB implements ATCommandListener {
public void ATEvent(String Event) {
if (Event.indexOf("+SCKS: 0") >= 0) {
System.out.println("SIM Card is not inserted.");
/* perform other actions */
} else if (Event.indexOf("+SCKS: 1") >= 0) {
System.out.println("SIM Card is inserted.");
/* perform other actions */
}
}
public void RINGChanged(boolean SignalState) {
/* take some action when the RING signal changes if you want to */
}
if (Event.indexOf("+SCKS: 0") >= 0) {
System.out.println("SIM Card is not inserted.");
/* perform other actions */
} else if (Event.indexOf("+SCKS: 1") >= 0) {
System.out.println("SIM Card is inserted.");
/* perform other actions */
}
}
public void RINGChanged(boolean SignalState) {
/* take some action when the RING signal changes if you want to */
}
public void DCDChanged(boolean SignalState) {
/* take some action when the DCD signal changes if you want to */
}
/* take some action when the DCD signal changes if you want to */
}
public void DSRChanged(boolean SignalState {}
/* take some action when the DSR signal changes if you want to */
}
/* take some action when the DSR signal changes if you want to */
}
public void CONNChanged(boolean SignalState {}
/* take some action when the state of a connection changes if you want
to */
}
}
/* take some action when the state of a connection changes if you want
to */
}
}