org.freesmartphone.GSM.Network Signal Strength Signal
Thomas Seiler
thseiler at gmail.com
Wed Jun 25 02:48:03 CEST 2008
Hi,
Lets assume that the phone has a standby-screen application that will
be separate from the signal strength indicator widget, so both will
have their own connection to DBUS, and both might have their separate
event loop.
The provider name is not something that changes a lot, but might
change occationally, i.e. when you cross a border, or live somewhere
nearby a border and get coverage from the other side.
The signal strength on the other hand is a volatile information, that
might change quite fast under certain situations (i.e. driving on a
highway), which leads to a lot of messages.
I my opinion, it would make sense to decouple these signals, i.e:
<signal name="SignalStrengthChanged">
<arg type="i" name="strength"/>
</signal>
and
<signal name="NetworkStatusChanged">
<arg type="s" name="provider_name"/>
<arg type="s" name="status"/>
</signal>
In that way, the standby screen application can filter for
NetworkStatusChanged signals and will not be woken up for every signal
strength update.
A kind of subscription mechanism would be ideal for the signal
strength signal, so that the signal is only generated, when an
application actually listens for it.
(i.e. avoiding loosing CPU Cycles and context switches during full
screen video playback...)
Unfortunately, I do not know enough of DBUS introspection magic to
understand if the phone daemon can learn if some applications are
currently listening for a signal.
If introspection is a possible way to learn about listening processes,
a similar signal could then be used for CellIDChanged. ophoned would
even be in a position to switch on and off the generation of netreg
unsolicited events from the modem.
Any comments welcome : )
Cheers,
Thomas
--
Excercise 17:
If the human brain was simple enough for us to understand we'd be so
simple we couldn't understand.
Prove this by induction.
More information about the smartphones-standards
mailing list