Download  Print this page

Atevents; Implementation - Siemens TC65 JAVA User Manual

Cellular.
Hide thumbs

Advertisement

TC65 JAVA User's Guide
Strictly confidential / Draft
13.1.3.1

ATEvents

An ATEvent or a URC is a report message sent from the module to the application. An
unsolicited result code can either be delivered automatically when an event occurs or as a
result of a query the module received before. However, a URC is not issued as a direct
response to an executed AT command. Some URCs must be activated with an AT
command.
Typical URCs may be information about incoming calls, received SM, changing temperature,
status of the battery etc. A summary of URCs is listed in the AT Command Set document [4].
13.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) {}
}
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 */
}
public void DCDChanged(boolean SignalState) {
/* 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 */
}
}
TC65 JAVA User's Guide_V01
Page 59 of 69
s
11.03.2005

Advertisement

   Also See for Siemens TC65 JAVA

   Related Manuals for Siemens TC65 JAVA

Comments to this Manuals

Symbols: 0
Latest comments: