There are two methods by which WAP content modules may be identified:
1. By a plug-in module, declared as class WAPHANDLER in an existing page module. This will make the page name a valid target for a WAP URL.
The WAP handler module must also be declared in AppMod.src. Note that this does not turn a VTS page into a WAP page – all output must be generated by the WAP handler module.
For example: Given a WAP handler module named WAPlevels.src, which displays a list of tank levels. For the WAP menu to display a link to this module you would first add the following line to the application’s AppMod.src file:
[ (PLUGINS) {===== Modules added to other base system modules =====}
WAPlevels Module "WAPlevels.src";
]
Then, you would modify the variables section of a page that you want to use as the link to the handler:
[
Title = "Tank Monitor";
PageToolTipLabel;
Color;
Bitmap;
SecBit;
WinFlag;
[(WAPHANDLER)
Shared WAPlevels;
]
]
2. By a module, of class WAPHANDLER, declared in AppMod.SRC within the LIBRARIES class. Each such module in the library is a valid target for a WAP URL. The targets have the names of the individual module, but will not show up in the menu.
For example, the VTScada WAP handler begins with the following declarations:
{======================= VTScadaWAP ==========================}
{ Implements a WAP interface to VTScada alarms and controls }
{=============================================================}
[ (WAPHANDLER)
StationList Module { Writes a WML Station List page };
Station Module { Writes a WML Station page };
StationAnlgsOfType Module { Writes a WML Analogs of certain type page };
StationDgtlsOfType Module { Writes a WML Digitals of certain type page };
OperateAnalog Module { Writes a WML Operate page for an Analog Tag };
OperateDigital Module { Writes a WML Operate page for a Digital Tag};
DoDigitalOutput Module { Performs a set on VTS Output tag };
DoAnalogOutput Module { Performs a set on an Analog tag };
]
The VTScadaWAP handler module itself is declared in AppMod as:
[ (LIBRARIES) {=== Modules that contain library objects ====}
VTScadaWAP Module "VTScadaWAP.src";
]
Navigation between the various modules must be taken care of by the handler. All that remains is to provide an initial link to the first module. This is commonly done with the WAPMenu.txt file.
Between them, these two mechanisms allow WAP content to be served, both from pages and from a library of WAP modules. If there is a conflict between the names used for method #1 and #2, then #1 will win.