For the most part, developing WaveLink wireless applications is no different than developing any other conventional application. Certain programming considerations must be kept in mind, though, to gain maximum performance from any WaveLink applications.
The first programming consideration that must be taken into account is the limited and various display sizes of devices. Any information, either input or output, placed outside of these display limitations will not appear. Therefore, you must always keep in mind the display limitations of the devices that will be using your application when designing application screens. You may use the RFTerminal object to obtain display characteristics of the device. If the devices on your network use different screen sizes, you may want to use the RFTerminal object to dynamically position screen output. For example, you can program screen output one row from the bottom of the screen in lieu of setting a static row number.
The second programming consideration of WaveLink application development concerns function error checking.
You can check for returned error values when calling a WaveLink Development Library method within your application. To make your application function properly, you must check for returned error values after making an input call such as RFInput or GetEvent.
For example, on a disconnect command from the WaveLink Administrator a specific error message is returned to your application. This error message is returned to the first WaveLink function that communicates with the mobile device (for example, an RFIO method) before the device is physically disconnected from the network. Every subsequent WaveLink function following disconnect will then return the error message. Upon receiving this error message, you must instruct the application to exit. If this error message is not trapped at this time, the application can get caught in a loop and consume remaining system resources while waiting for further user input from a disconnected device.
Certain WaveLink objects will save files to RF devices using the following extensions. The extensions and their associated objects are listed below:
RFIO Object . .SCR
RFMenu Object . .MNU
RFTone Object . .TON
RFBarcode Object . .BAR
RFAuxPort Object . .CFG
When using these specified objects, it is not necessary to include these extensions when referencing files of the object types. If you reference these files using the RFFile object, though, it will be necessary to include the appropriate file extension (or ".*" for all file extensions).
The fourth and final programming consideration that must be taken into account when developing WaveLink applications concerns user environment variables. The WaveLink Server creates a set of environment variables for each connecting RF user. These WaveLink Server environment variables contain the same information about the RF user's device as that within the RFTerminal object. Since much of the information within these environment variables will remain static during a user session, it is possible to use certain device values without making a RF call as would be the case if you were to request the same information using one of the RFTerminal methods.
For example, the WaveLink Server creates a user environment variable that contains the device display width. Since a device's maximum display width will not change you can limit network traffic by using the width value from the WaveLink Server environment variable rather than making an RF call during the creation of an RFTerminal Object.
The Wavelink Server environment variables and their possible return values are listed below:
|
Variable Name |
Type |
Return Values |
|
TERMTYPE |
int |
Raw terminal type. |
|
TERMWIDTH |
int |
Terminal screen width in characters |
|
TERMHEIGHT |
int |
Terminal screen height in characters |
|
*TERMMAIN |
int |
Main battery state |
|
*TERMLITHIUM |
int |
Lithium battery state |
|
*TERMKEYSTATE |
int |
Terminal keyboard state |
|
*TERMTIMEOUT |
int |
Keyboard timeout in seconds |
|
*TERMBACKLIGHT |
int |
Backlight timeout in seconds |
|
*TERMCURSORMODE |
int |
Hardware or software cursor status |
|
*TERMCURSORSTART |
int |
Cursor start line |
|
*TERMCURSOREND |
int |
Cursor end line |
|
TERMID |
string |
Terminal ID |
|
TERMVERSION |
string |
WaveLink Studio Client version installed on RF device |
|
TERMDISK |
long |
Total device disk space capacity |
|
TERMMEMORY |
long |
Total device memory capacity |
*Use the RFTerminal methods to return the most current values for variables that may not remain static, such as a device's key state.
Additionally, the WaveLink Program Manager will also create two environment variables for each spawned application.
These environment variables are only available if your users logged in using the WaveLink Program Manager. These variables will not be available for your own custom applications.
The values for the WaveLink Program Manager environment variables are listed below:
|
Variable Name |
Type |
Return Values |
|
USERNAME |
string |
The current user's name |
|
USERSIGNON |
string |
The current user's sign on |
You may add or remove additional environment variables to the WaveLink Program Manager at will. A recompile of the application WaveLinkPM.exe is all that is required.
Was this article useful?
The topic was:
Inaccurate
Incomplete
Not what I expected
Other