次の方法で共有


WAP Wakeup (Windows Embedded CE 6.0)

1/6/2010

Wireless Application Protocol (WAP) Wakeup is a feature that provides the benefit of conserving application memory.

Usually, an application is able to receive WAP datagrams only while it is running and resident in memory. In terms of resources, this is impractical for asynchronous applications, which perform work only when processing incoming messages (which arrive at any time — sometimes infrequently). While waiting, this type of application does nothing. Except for the fact that the application still consumes resources (valuable application memory), it is as if it were hibernating. An example is a chess program that processes chess moves sent to it as Wireless Datagram Protocol (WDP) binary datagrams over the Short Message Service (SMS).

Using the WAP Wakeup feature, an asynchronous application can be available to process incoming messages, yet be neither running nor loaded in memory. When a WDP port receives a WDP Short Message Service (SMS) message, and the port has not been "opened" by an application (that is, registered with the WDP layer), the WDP provider searches the registry for the WAP Wakeup registered application associated with that port and automatically starts it. The application opens an Application Listener Window Class, which receives a message from the WDP provider (the DWORD value "WDP Port. Interpreting this message as a signal that a WDP message is waiting for it on the port, the application opens that port on the WDP layer. The application then receives and processes the WDP Short Message Service (SMS) message.

Ee498286.collapse(en-US,WinEmbedded.60).gifRemarks

WDP provides port-based addressing. The port number is used by the wakeup mechanism to route datagrams to the correct higher-layer entity (such as a protocol or application) above the WDP layer. The wakeup mechanism allows applications to register for messages on a particular port by including the port number in the event name. You must provide a unique key for each WDP port you want to register with your application. The wakeup mechanism is for WAP datagrams over Short Message Service (SMS) only. Only applications can be triggered by the Wakeup feature (for example, you cannot use the feature as a paging mechanism).

You cannot register your application for a WDP port range; you must register for each port individually. To avoid collisions, you must ensure that multiple applications do not register for the same port. When you register a port for you application, you must determine whether another application already "owns" the port. When choosing a WDP port number, be sure to keep the number of ports to a minimum, and follow the guidelines on WDP port usage. For more information, see "Wireless Datagram Protocol (WDP) Specification" at this OMA Web site.

WAP Wakeup Using a Generic Application Wakeup API allows applications to shutdown and then resume or launch when a WAP packet (binary datagrams) arrive over Short Message Service (SMS).

To use WAP Wakeup with your application, you need to add a key like the following one to the system registry:

HKEY_LOCAL_MACHINE\System\Notifications\appname

The key must contain several values, which are detailed in the following table.

Key name Key value Value type Description

"Application"

Client application path

String

(Required) Specifies the fully qualified path to the application to launch, along with optional command line parameters. For example, “\\windows\\wapwakeup.exe arg1 arg2”.

"Conditional Target"

Port value

String

(Required) Specifies the WDP port number associated with this application. This must be formatted as “port=<port_number>”. For example, “port=1234”.

"Class Name"

class string

String

(Optional) Specifies the destination window to which the WDP/Short Message Service (SMS) message will be posted. This is also known as the Application Listener Window Class.

"Message"

dword:5678

DWORD

(Optional) The message to post to the window.

"HKEY"

dword:80000002

DWORD

(Required) This must be set to dword:80000002.

"Key"

Comm\\Cellular\\Wap\\WapImpl

String

(Required) This must be set to “Comm\\Cellular\\Wap\\WapImpl”.

"Value Name"

WAP Wakeup

String

(Required) This must be set to “WAP Wakeup”.

"Conditional Comparison"

dword:9

DWORD

(Required) This must be set to dword:9.

"Conditional Mask

dword:0

DWORD

(Required) This must be set to dword:0.

"Flags"

dword:1

DWORD

(Required) This must be set to dword:1.

Requirements

Windows Embedded CE Windows CE .NET 4.2 and later

See Also

Concepts

Wireless Application Protocol (WAP) API
Short Message Service (SMS) API