iface-modem-signal: polling and thresholds only in effect if modem enabled

If the modem is disabled:
 * Polling is completely halted.
 * Thresholds are disabled.
 * The user is allowed to call Setup() or SetupThresholds() to change
   the settings, even if the actual polling or thresholds setup isn't
   in effect.

When the modem is enabled:
 * Polling will be started if there is a existing polling rate.
 * Thresholds will be setup based on the existing threshold settings.

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/504
This commit is contained in:
Aleksander Morgado
2022-02-11 23:35:48 +01:00
parent 5d953bbe8d
commit 45102fcd60
2 changed files with 186 additions and 111 deletions

View File

@@ -15,7 +15,7 @@
This interface provides access to extended signal quality information.
This interface will only be available once the modem is ready to be
This interface will only be functional once the modem is ready to be
registered in the cellular network. 3GPP devices will require a valid
unlocked SIM card before any of the features in the interface can be
used.
@@ -27,6 +27,10 @@
Both Setup() and SetupThresholds() can also be used at the same time if
required, e.g. if they report different signal quality measurement types.
The thresholds and polling setup will only be in effect if the modem is
in enabled state. Changing the settings with Setup() or SetupThresholds()
is also possible while in disabled state, though.
-->
<interface name="org.freedesktop.ModemManager1.Modem.Signal">