MythTV
master
|
#include <signalmonitorvalue.h>
Public Member Functions | |
SignalMonitorValue (QString _name, QString _noSpaceName, int _threshold, bool _high_threshold, int _min, int _max, std::chrono::milliseconds _timeout) | |
virtual | ~SignalMonitorValue () |
QString | GetName (void) const |
Returns the long name of this value. More... | |
QString | GetShortName (void) const |
Returns a space free name of the value. Used by GetStatus(). More... | |
QString | GetStatus () const |
Returns a signal monitor value as one long string. More... | |
int | GetValue () const |
Returns the value. More... | |
int | GetMin () const |
Returns smallest value possible, used for signal monitor bars. More... | |
int | GetMax () const |
Returns greatest value possible, used for signal monitor bars. More... | |
int | GetThreshold () const |
Returns the threshold at which the value is considered "good". More... | |
bool | IsHighThreshold () const |
Returns true if values greater than the threshold are considered good, false otherwise. More... | |
std::chrono::milliseconds | GetTimeout () const |
Returns how long to wait for a good value in milliseconds. More... | |
bool | IsGood () const |
Returns true if the value is equal to the threshold, or on the right side of the threshold (depends on IsHighThreashold()). More... | |
int | GetNormalizedValue (int newmin, int newmax) const |
Returns the value normalized to the [newmin, newmax] range. More... | |
void | SetValue (int _value) |
void | SetMin (int _min) |
void | SetMax (int _max) |
void | SetThreshold (int _threshold) |
void | SetThreshold (int _threshold, bool _high_threshold) |
void | SetRange (int _min, int _max) |
Sets the minimum and maximum values. More... | |
void | SetTimeout (std::chrono::milliseconds _timeout) |
QString | toString () const |
Static Public Member Functions | |
static void | Init () |
Initializes the some static constants needed by SignalMonitorValue. More... | |
static SignalMonitorValue * | Create (const QString &_name, const QString &_longString) |
static SignalMonitorList | Parse (const QStringList &slist) |
Converts a list of strings to SignalMonitorValue classes. More... | |
static bool | AllGood (const SignalMonitorList &slist) |
Returns true if all the values in the list return true on IsGood(). More... | |
static std::chrono::milliseconds | MaxWait (const SignalMonitorList &slist) |
Returns the maximum timeout value in the signal monitor list. More... | |
Static Public Attributes | |
static QStringList | ERROR_NO_CHANNEL |
static QStringList | ERROR_NO_LINK |
static QStringList | SIGNAL_LOCK |
static bool | run_static_init = true |
Private Types | |
using | SignalMonitorList = std::vector< SignalMonitorValue > |
Private Member Functions | |
SignalMonitorValue ()=default | |
SignalMonitorValue (QString _name, QString _noSpaceName, int _value, int _threshold, bool _high_threshold, int _min, int _max, std::chrono::milliseconds _timeout, bool _set) | |
bool | Set (const QString &_name, const QString &_longString) |
Private Attributes | |
QString | m_name |
QString | m_noSpaceName |
int | m_value {-1} |
int | m_threshold {-1} |
int | m_minVal {-1} |
int | m_maxVal {-1} |
std::chrono::milliseconds | m_timeout {-1ms} |
bool | m_highThreshold {true} |
bool | m_set {false} |
Definition at line 13 of file signalmonitorvalue.h.
|
private |
Definition at line 17 of file signalmonitorvalue.h.
SignalMonitorValue::SignalMonitorValue | ( | QString | _name, |
QString | _noSpaceName, | ||
int | _threshold, | ||
bool | _high_threshold, | ||
int | _min, | ||
int | _max, | ||
std::chrono::milliseconds | _timeout | ||
) |
Definition at line 36 of file signalmonitorvalue.cpp.
|
inlinevirtual |
Definition at line 22 of file signalmonitorvalue.h.
|
privatedefault |
Referenced by Create().
|
private |
Definition at line 59 of file signalmonitorvalue.cpp.
QString SignalMonitorValue::GetName | ( | void | ) | const |
Returns the long name of this value.
Definition at line 83 of file signalmonitorvalue.cpp.
Referenced by DTVSignalMonitor::GetStatusList(), DVBSignalMonitor::GetStatusList(), SignalMonitor::GetStatusList(), and Init().
QString SignalMonitorValue::GetShortName | ( | void | ) | const |
Returns a space free name of the value. Used by GetStatus().
Definition at line 91 of file signalmonitorvalue.cpp.
|
inline |
Returns a signal monitor value as one long string.
Definition at line 32 of file signalmonitorvalue.h.
Referenced by DTVSignalMonitor::GetStatusList(), DVBSignalMonitor::GetStatusList(), SignalMonitor::GetStatusList(), and Init().
|
inline |
Returns the value.
Definition at line 40 of file signalmonitorvalue.h.
Referenced by GetNormalizedValue(), DVBSignalMonitor::GetRotorStatus(), ScanMonitor::StatusChannelTuned(), ScanMonitor::StatusSignalLock(), ExternalSignalMonitor::UpdateValues(), and SignalMonitor::UpdateValues().
|
inline |
Returns smallest value possible, used for signal monitor bars.
Definition at line 42 of file signalmonitorvalue.h.
Referenced by GetNormalizedValue().
|
inline |
Returns greatest value possible, used for signal monitor bars.
Definition at line 44 of file signalmonitorvalue.h.
Referenced by GetNormalizedValue().
|
inline |
Returns the threshold at which the value is considered "good".
Definition at line 47 of file signalmonitorvalue.h.
|
inline |
Returns true if values greater than the threshold are considered good, false otherwise.
Definition at line 50 of file signalmonitorvalue.h.
|
inline |
Returns how long to wait for a good value in milliseconds.
Definition at line 52 of file signalmonitorvalue.h.
|
inline |
Returns true if the value is equal to the threshold, or on the right side of the threshold (depends on IsHighThreashold()).
Definition at line 56 of file signalmonitorvalue.h.
Referenced by DTVSignalMonitor::GetStatusList(), SignalMonitor::HasSignalLock(), DTVSignalMonitor::IsAllGood(), toString(), AnalogSignalMonitor::UpdateValues(), SatIPSignalMonitor::UpdateValues(), HDHRSignalMonitor::UpdateValues(), V4L2encSignalMonitor::UpdateValues(), CetonSignalMonitor::UpdateValues(), ExternalSignalMonitor::UpdateValues(), FirewireSignalMonitor::UpdateValues(), and DVBSignalMonitor::UpdateValues().
|
inline |
Returns the value normalized to the [newmin, newmax] range.
newmin | New minimum value. |
newmax | New maximum value. |
Definition at line 63 of file signalmonitorvalue.h.
Referenced by SignalMonitor::GetSignalStrength(), ScanMonitor::StatusRotorPosition(), ScanMonitor::StatusSignalStrength(), and ScanMonitor::StatusSignalToNoise().
|
inline |
Definition at line 74 of file signalmonitorvalue.h.
Referenced by ExternalSignalMonitor::ExternalSignalMonitor(), DVBSignalMonitor::GetRotorStatus(), AnalogSignalMonitor::handleHDPVR(), Init(), IPTVSignalMonitor::IPTVSignalMonitor(), ScriptSignalMonitor::ScriptSignalMonitor(), Set(), DVBSignalMonitor::SetRotorValue(), SignalMonitor::SignalMonitor(), DTVSignalMonitor::UpdateMonitorValues(), AnalogSignalMonitor::UpdateValues(), SatIPSignalMonitor::UpdateValues(), ASISignalMonitor::UpdateValues(), HDHRSignalMonitor::UpdateValues(), V4L2encSignalMonitor::UpdateValues(), CetonSignalMonitor::UpdateValues(), IPTVSignalMonitor::UpdateValues(), ExternalSignalMonitor::UpdateValues(), FirewireSignalMonitor::UpdateValues(), DVBSignalMonitor::UpdateValues(), and SignalMonitor::UpdateValues().
|
inline |
Definition at line 80 of file signalmonitorvalue.h.
|
inline |
Definition at line 82 of file signalmonitorvalue.h.
|
inline |
Definition at line 84 of file signalmonitorvalue.h.
Referenced by CetonSignalMonitor::CetonSignalMonitor(), DVBSignalMonitor::DVBSignalMonitor(), FirewireSignalMonitor::FirewireSignalMonitor(), HDHRSignalMonitor::HDHRSignalMonitor(), SatIPSignalMonitor::SatIPSignalMonitor(), Set(), and DVBSignalMonitor::SetRotorTarget().
|
inline |
Definition at line 86 of file signalmonitorvalue.h.
|
inline |
Sets the minimum and maximum values.
Definition at line 93 of file signalmonitorvalue.h.
Referenced by DVBSignalMonitor::DVBSignalMonitor(), SatIPSignalMonitor::SatIPSignalMonitor(), Set(), and V4L2encSignalMonitor::V4L2encSignalMonitor().
|
inline |
Definition at line 98 of file signalmonitorvalue.h.
Referenced by DVBSignalMonitor::DVBSignalMonitor(), SatIPSignalMonitor::SatIPSignalMonitor(), and Set().
|
static |
Initializes the some static constants needed by SignalMonitorValue.
This isn't done automatically because we need to translate the messages.
Definition at line 20 of file signalmonitorvalue.cpp.
Referenced by TVRec::SetupSignalMonitor(), and SignalMonitorValue().
|
static |
Definition at line 138 of file signalmonitorvalue.cpp.
|
static |
Converts a list of strings to SignalMonitorValue classes.
slist | List of strings to convert. |
Definition at line 154 of file signalmonitorvalue.cpp.
Referenced by TV::UpdateOSDSignal().
|
static |
Returns true if all the values in the list return true on IsGood().
slist | List of SignalMonitorValue classes to check. |
Definition at line 181 of file signalmonitorvalue.cpp.
Referenced by TV::UpdateOSDSignal().
|
static |
Returns the maximum timeout value in the signal monitor list.
slist | List of SignalMonitorValue classes to check. |
Definition at line 210 of file signalmonitorvalue.cpp.
|
inline |
Definition at line 120 of file signalmonitorvalue.h.
|
private |
Definition at line 99 of file signalmonitorvalue.cpp.
Referenced by Parse().
|
static |
Definition at line 114 of file signalmonitorvalue.h.
Referenced by Init().
|
static |
Definition at line 115 of file signalmonitorvalue.h.
Referenced by Init().
|
static |
Definition at line 116 of file signalmonitorvalue.h.
Referenced by Init().
Definition at line 118 of file signalmonitorvalue.h.
Referenced by Init().
|
private |
Definition at line 138 of file signalmonitorvalue.h.
Referenced by GetName(), Set(), and SignalMonitorValue().
|
private |
Definition at line 139 of file signalmonitorvalue.h.
Referenced by GetShortName(), GetStatus(), Set(), SignalMonitorValue(), and toString().
|
private |
Definition at line 140 of file signalmonitorvalue.h.
Referenced by GetStatus(), GetValue(), IsGood(), SetValue(), SignalMonitorValue(), and toString().
|
private |
Definition at line 141 of file signalmonitorvalue.h.
Referenced by GetStatus(), GetThreshold(), IsGood(), SetThreshold(), SignalMonitorValue(), and toString().
|
private |
Definition at line 142 of file signalmonitorvalue.h.
Referenced by GetMin(), GetStatus(), SetMin(), SetRange(), SetValue(), SignalMonitorValue(), and toString().
|
private |
Definition at line 143 of file signalmonitorvalue.h.
Referenced by GetMax(), GetStatus(), SetMax(), SetRange(), SetValue(), SignalMonitorValue(), and toString().
|
private |
Definition at line 144 of file signalmonitorvalue.h.
Referenced by GetStatus(), GetTimeout(), SetTimeout(), SignalMonitorValue(), and toString().
Definition at line 145 of file signalmonitorvalue.h.
Referenced by GetStatus(), IsGood(), IsHighThreshold(), SetThreshold(), SignalMonitorValue(), and toString().
Definition at line 146 of file signalmonitorvalue.h.
Referenced by GetStatus(), Set(), SetValue(), SignalMonitorValue(), and toString().