Developers guide

Chapter 22: Wireless Wide-Area Networking
Controlling The Interaction With The Control Panel
Psion Teklogix Mobile Devices SDK Developers Guide 213
22.7.1 Controlling The Interaction With The Control Panel
The following code samples show how the access flags are manipulated using the Mobile
Devices SDK. The process is as follows:
1. Save the current access flag settings
2. Change the access flag settings
22.8 RSSI (Received Signal Strength Indicator)
The RSSI status of the radio changes continuously, due to various environmental factors. There is
no get function for RSSI in the Mobile Devices SDK. The signal strength can only be obtained by
registering a callback function. A SetSignalSuggestion feature is implemented which indicates to
the driver how often the signal strength should be measured. Often signal strength is reported
using a bar graph. A callback is only necessary when the increment to the next graphed level is
reached. Callbacks prevent excessive activity on the processor and the modem.
The signal strength can only be obtained by registering a callback function, OnSignalStrength in
the IndicationsListener class, as shown here:
Example 22.9 Suppressing Voice Notifications in C++
DWORD currentAccessFlags = 0;
WirelessWAN::GetCurrentAccessFlags(currentAccessFlags);
currentAccessFlags |= AccessFlags_SuppressCallNotifications;
WirelessWAN::SetCurrentAccessFlags(currentAccessFlags);
Example 22.10 Suppressing Voice Notifications in C#
AccessFlags accessFlags = 0;
if (WirelessWAN.GetCurrentAccessFlags(ref accessFlags) == WwanRequestStatus.Success)
{
accessFlags |= AccessFlags.SuppressCallNotifications;
if (WirelessWAN.SetCurrentAccessFlags(accessFlags) != WwanRequestStatus.Success)
{
// Failure!
}
}
Warning: Before the application closes, control of the access flags must be returned to the
WWAN Control Panel program.
Example 22.11 Returning Control Of The Access Flags To The Control Panel in C++
// Re-enable the Control Panel notifications:
DWORD currentAccessFlags = 0;
WirelessWAN::GetCurrentAccessFlags(currentAccessFlags);
currentAccessFlags &= ~AccessFlags_SuppressCallNotifications;
WirelessWAN::SetCurrentAccessFlags(currentAccessFlags);
Example 22.12 Getting The signal Strength in C++
class MyRssiListener : public PsionTeklogix::WWAN::IndicationsListener
{
public:
MyRssiListener()
{
}