[PATCH 4/8] api: let SignalQuality say if the given value was recently taken



Modems which only expose a single port will not be able to update the signal
quality value while in connected mode. The signal quality value reported in this
case, while the modem is connected, will be the last signal quality value read
before the connection.

The additional boolean value proposed here in the SignalQuality property will
just say if the given signal quality was recently taken (if TRUE) or cached
some time ago (if FALSE). The time to assume the value was recently taken or not
could depend on different things, for example:

 * If the modem always has an AT port, even if connected, we could directly
   query the current signal quality and report the value as being fresh.

 * If the modem has a single port, we could report the value as not being fresh
   as soon as the modem gets in connected state.

 * For modems which report the signal quality updates in unsolicited messages,
   we could report the value as being fresh if the update was received in the
   last minute or so.
---
 new/org.freedesktop.ModemManager1.Modem.xml |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/new/org.freedesktop.ModemManager1.Modem.xml b/new/org.freedesktop.ModemManager1.Modem.xml
index f2a8d00..450a7a7 100644
--- a/new/org.freedesktop.ModemManager1.Modem.xml
+++ b/new/org.freedesktop.ModemManager1.Modem.xml
@@ -251,11 +251,12 @@
       </tp:docstring>
     </property>
 
-    <property name="SignalQuality" type="u" access="read">
+    <property name="SignalQuality" type="ub" access="read">
       <tp:docstring>
         Signal quality in percent (0 - 100) of the dominant access technology
         the device is using to communicate with the network.  Always 0 for POTS
-        devices.
+        devices. The additional boolean value indicates if the quality value
+        given was recently taken.
       </tp:docstring>
     </property>
 
-- 
1.7.4.1



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]