Timex M851 Watch User Manual


 
M851 WristApp Design Guide Rev 1.2
Timex Corporation 30
4.4.11 Popup State Handler
The popup state handler is executed whenever a resource requests for a popup session. The kernel will call
the interrupted application’s Task Exit handler, stores the data in CORECurrentMode and
CORECurrentState into COREPopupMode and COREPopupState. CORECurrentState is not
saved if the state handler specified a different popdown state.
When a popup is complete, it must be terminated with a popdown request using the macro below. This will
alert the kernel that a popup session is complete. The stored COREPopupMode and COREPopupState
becomes the new foreground application unless the kernel detects that there are pending popups to be
processed.
CORE_REQ_POPDOWN;
4.4.11.1 Special Time Zone Check Popup Processing
Normally, when the popup state handler has processed the record that generated the popup through the
Time Zone Check Popup, the state handler can request a popdown immediately.
There are some cases wherein there are more then one entry that matches the record that was entered into
the Time Zone Check resource for checking. Since there is only one TZC Resource allocated to an
application, there is no way to store the entries in individual TZC resources.
When the popup state handler completes processing (melody generation, melody cancellation or
completion, 4 second timeout after scrolling, etc.), it could check for its database for any other record aside
form the one already displayed. If there are no more entries, then it could then request a popdown. If there
is another entry, then the popup state handler can re-execute the code stored in state entry event processing
section to generate the new melody, etc. and proceed with processing the “new” popup.
It is up to the application on how many entries it wants to popup for the same time. The current UI
specifies only one queued popup when the current one is active.
4.4.12 Password Entry State Handler
Some applications are required to check if a password is required to access the data stored in the database.
If a password is required, it will request a state change to the application’s password entry and verification
state.
The kernel provides a generic password entry and verfication state handler. The state handler
name is corePasswordDefaultStateHandler(),
corePasswordSetBannerStateHandler() and
corePasswordSetStateHandler().
The application is required to allocate index 5, 6 and 7 in the Application State Manager. When the
password is entered and verified, it will request a state change to the application’s default state.
During execution of password handler states, all popups are suspended.
4.5 Built-in State Handlers
The system provides a number of state handlers that a wristapp can use that are already stored in ROM.
This will speed up loading the code from EEPROM as well as minimize the total EEPROM usage of a
WristApp.