#include <signalmonitorvalue.h>
Definition at line 8 of file signalmonitorvalue.h.
Public Member Functions | |
| SignalMonitorValue (const QString &_name, const QString &_noSpaceName, int _threshold, bool _high_threshold, int _min, int _max, int _timeout) | |
| virtual | ~SignalMonitorValue () |
| QString | GetName (void) const |
| Returns the long name of this value. | |
| QString | GetShortName (void) const |
| Returns a space free name of the value. Used by GetStatus(). | |
| QString | GetStatus () const |
| Returns a signal monitor value as one long string. | |
| int | GetValue () const |
| Returns the value. | |
| int | GetMin () const |
| Returns smallest value possible, used for signal monitor bars. | |
| int | GetMax () const |
| Returns greatest value possible, used for signal monitor bars. | |
| int | GetThreshold () const |
| Returns the threshold at which the value is considered "good". | |
| bool | IsHighThreshold () const |
| Returns true if values greater than the threshold are considered good, false otherwise. | |
| int | GetTimeout () const |
| Returns how long to wait for a good value in milliseconds. | |
| bool | IsGood () const |
| Returns true if the value is equal to the threshold, or on the right side of the threshold (depends on IsHighThreashold()). | |
| int | GetNormalizedValue (int newmin, int newmax) const |
| Returns the value normalized to the [newmin, newmax] range. | |
| 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. | |
| void | SetTimeout (int _timeout) |
| QString | toString () const |
Static Public Member Functions | |
| static void | Init () |
| Initializes the some static constants needed by SignalMonitorValue. | |
| static SignalMonitorValue * | Create (const QString &_name, const QString &_longString) |
| static SignalMonitorList | Parse (const QStringList &list) |
| Converts a list of strings to SignalMonitorValue classes. | |
| static bool | AllGood (const SignalMonitorList &slist) |
| Returns true if all the values in the list return true on IsGood(). | |
| static int | MaxWait (const SignalMonitorList &slist) |
| Returns the maximum timeout value in the signal monitor list. | |
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 | |
| typedef vector < SignalMonitorValue > | SignalMonitorList |
Private Member Functions | |
| SignalMonitorValue () | |
| SignalMonitorValue (const QString &_name, const QString &_noSpaceName, int _value, int _threshold, bool _high_threshold, int _min, int _max, int _timeout, bool _set) | |
| bool | Set (const QString &_name, const QString &_longString) |
Private Attributes | |
| QString | name |
| QString | noSpaceName |
| int | value |
| int | threshold |
| int | minval |
| int | maxval |
| int | timeout |
| bool | high_threshold |
| bool | set |
typedef vector<SignalMonitorValue> SignalMonitorValue::SignalMonitorList [private] |
Definition at line 10 of file signalmonitorvalue.h.
| SignalMonitorValue::SignalMonitorValue | ( | const QString & | _name, | |
| const QString & | _noSpaceName, | |||
| int | _threshold, | |||
| bool | _high_threshold, | |||
| int | _min, | |||
| int | _max, | |||
| int | _timeout | |||
| ) |
Definition at line 32 of file signalmonitorvalue.cpp.
| virtual SignalMonitorValue::~SignalMonitorValue | ( | ) | [inline, virtual] |
Definition at line 15 of file signalmonitorvalue.h.
| SignalMonitorValue::SignalMonitorValue | ( | ) | [inline, private] |
| SignalMonitorValue::SignalMonitorValue | ( | const QString & | _name, | |
| const QString & | _noSpaceName, | |||
| int | _value, | |||
| int | _threshold, | |||
| bool | _high_threshold, | |||
| int | _min, | |||
| int | _max, | |||
| int | _timeout, | |||
| bool | _set | |||
| ) | [private] |
Definition at line 53 of file signalmonitorvalue.cpp.
| QString SignalMonitorValue::GetName | ( | void | ) | const |
Returns the long name of this value.
Definition at line 74 of file signalmonitorvalue.cpp.
Referenced by SignalMonitor::GetStatusList(), DVBSignalMonitor::GetStatusList(), DTVSignalMonitor::GetStatusList(), and Init().
| QString SignalMonitorValue::GetShortName | ( | void | ) | const |
Returns a space free name of the value. Used by GetStatus().
Definition at line 82 of file signalmonitorvalue.cpp.
| QString SignalMonitorValue::GetStatus | ( | ) | const [inline] |
Returns a signal monitor value as one long string.
Definition at line 25 of file signalmonitorvalue.h.
Referenced by SignalMonitor::GetStatusList(), DVBSignalMonitor::GetStatusList(), DTVSignalMonitor::GetStatusList(), and Init().
| int SignalMonitorValue::GetValue | ( | ) | const [inline] |
Returns the value.
Definition at line 33 of file signalmonitorvalue.h.
Referenced by ScanWizardScanner::dvbLock(), GetNormalizedValue(), and DVBSignalMonitor::GetRotorStatus().
| int SignalMonitorValue::GetMin | ( | ) | const [inline] |
Returns smallest value possible, used for signal monitor bars.
Definition at line 35 of file signalmonitorvalue.h.
Referenced by GetNormalizedValue().
| int SignalMonitorValue::GetMax | ( | ) | const [inline] |
Returns greatest value possible, used for signal monitor bars.
Definition at line 37 of file signalmonitorvalue.h.
Referenced by GetNormalizedValue().
| int SignalMonitorValue::GetThreshold | ( | ) | const [inline] |
Returns the threshold at which the value is considered "good".
Definition at line 40 of file signalmonitorvalue.h.
| bool SignalMonitorValue::IsHighThreshold | ( | ) | const [inline] |
Returns true if values greater than the threshold are considered good, false otherwise.
Definition at line 43 of file signalmonitorvalue.h.
| int SignalMonitorValue::GetTimeout | ( | ) | const [inline] |
Returns how long to wait for a good value in milliseconds.
Definition at line 45 of file signalmonitorvalue.h.
Referenced by SignalMonitor::WaitForLock(), and DTVSignalMonitor::WaitForLock().
| bool SignalMonitorValue::IsGood | ( | ) | const [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 49 of file signalmonitorvalue.h.
Referenced by DTVSignalMonitor::GetStatusList(), SignalMonitor::HasSignalLock(), DTVSignalMonitor::IsAllGood(), toString(), IPTVSignalMonitor::UpdateValues(), HDHRSignalMonitor::UpdateValues(), DVBSignalMonitor::UpdateValues(), and SignalMonitor::WaitForLock().
| int SignalMonitorValue::GetNormalizedValue | ( | int | newmin, | |
| int | newmax | |||
| ) | const [inline] |
Returns the value normalized to the [newmin, newmax] range.
| newmin | New minimum value. | |
| newmax | New maximum value. |
Definition at line 56 of file signalmonitorvalue.h.
Referenced by ScanWizardScanner::dvbSignalStrength(), and ScanWizardScanner::dvbSNR().
| void SignalMonitorValue::SetValue | ( | int | _value | ) | [inline] |
Definition at line 67 of file signalmonitorvalue.h.
Referenced by DVBSignalMonitor::GetRotorStatus(), Init(), IPTVSignalMonitor::IPTVSignalMonitor(), Set(), DVBSignalMonitor::SetRotorValue(), DTVSignalMonitor::UpdateMonitorValues(), HDHRSignalMonitor::UpdateValues(), FirewireSignalMonitor::UpdateValues(), DVBSignalMonitor::UpdateValues(), and AnalogSignalMonitor::UpdateValues().
| void SignalMonitorValue::SetMin | ( | int | _min | ) | [inline] |
Definition at line 73 of file signalmonitorvalue.h.
| void SignalMonitorValue::SetMax | ( | int | _max | ) | [inline] |
Definition at line 75 of file signalmonitorvalue.h.
| void SignalMonitorValue::SetThreshold | ( | int | _threshold | ) | [inline] |
Definition at line 77 of file signalmonitorvalue.h.
Referenced by DVBSignalMonitor::DVBSignalMonitor(), FirewireSignalMonitor::FirewireSignalMonitor(), HDHRSignalMonitor::HDHRSignalMonitor(), Set(), and DVBSignalMonitor::SetRotorTarget().
| void SignalMonitorValue::SetThreshold | ( | int | _threshold, | |
| bool | _high_threshold | |||
| ) | [inline] |
Definition at line 79 of file signalmonitorvalue.h.
| void SignalMonitorValue::SetRange | ( | int | _min, | |
| int | _max | |||
| ) | [inline] |
Sets the minimum and maximum values.
Definition at line 86 of file signalmonitorvalue.h.
Referenced by DVBSignalMonitor::DVBSignalMonitor(), and Set().
| void SignalMonitorValue::SetTimeout | ( | int | _timeout | ) | [inline] |
Definition at line 91 of file signalmonitorvalue.h.
Referenced by DVBSignalMonitor::DVBSignalMonitor(), and Set().
| void SignalMonitorValue::Init | ( | void | ) | [static] |
Initializes the some static constants needed by SignalMonitorValue.
This isn't done automatically because we need to translate the messages.
Definition at line 17 of file signalmonitorvalue.cpp.
Referenced by TVRec::SetupSignalMonitor(), and SignalMonitorValue().
| SignalMonitorValue * SignalMonitorValue::Create | ( | const QString & | _name, | |
| const QString & | _longString | |||
| ) | [static] |
Definition at line 126 of file signalmonitorvalue.cpp.
| SignalMonitorList SignalMonitorValue::Parse | ( | const QStringList & | list | ) | [static] |
Converts a list of strings to SignalMonitorValue classes.
| slist | List of strings to convert. |
Definition at line 142 of file signalmonitorvalue.cpp.
Referenced by TV::UpdateOSDSignal(), and DTVSignalMonitor::WaitForLock().
| bool SignalMonitorValue::AllGood | ( | const SignalMonitorList & | slist | ) | [static] |
Returns true if all the values in the list return true on IsGood().
| slist | List of SignalMonitorValue classes to check. |
Definition at line 168 of file signalmonitorvalue.cpp.
Referenced by TV::UpdateOSDSignal(), and DTVSignalMonitor::WaitForLock().
| int SignalMonitorValue::MaxWait | ( | const SignalMonitorList & | slist | ) | [static] |
Returns the maximum timeout value in the signal monitor list.
| slist | List of SignalMonitorValue classes to check. |
Definition at line 196 of file signalmonitorvalue.cpp.
| QString SignalMonitorValue::toString | ( | void | ) | const [inline] |
Definition at line 113 of file signalmonitorvalue.h.
| bool SignalMonitorValue::Set | ( | const QString & | _name, | |
| const QString & | _longString | |||
| ) | [private] |
QStringList SignalMonitorValue::ERROR_NO_CHANNEL [static] |
QStringList SignalMonitorValue::ERROR_NO_LINK [static] |
QStringList SignalMonitorValue::SIGNAL_LOCK [static] |
bool SignalMonitorValue::run_static_init = true [static] |
QString SignalMonitorValue::name [private] |
Definition at line 130 of file signalmonitorvalue.h.
Referenced by GetName(), Set(), and SignalMonitorValue().
QString SignalMonitorValue::noSpaceName [private] |
Definition at line 131 of file signalmonitorvalue.h.
Referenced by GetShortName(), GetStatus(), Set(), SignalMonitorValue(), and toString().
int SignalMonitorValue::value [private] |
Definition at line 132 of file signalmonitorvalue.h.
Referenced by GetStatus(), GetValue(), IsGood(), SetValue(), SignalMonitorValue(), and toString().
int SignalMonitorValue::threshold [private] |
Definition at line 133 of file signalmonitorvalue.h.
Referenced by GetStatus(), GetThreshold(), IsGood(), SetThreshold(), SignalMonitorValue(), and toString().
int SignalMonitorValue::minval [private] |
Definition at line 134 of file signalmonitorvalue.h.
Referenced by GetMin(), GetStatus(), SetMin(), SetRange(), SetValue(), SignalMonitorValue(), and toString().
int SignalMonitorValue::maxval [private] |
Definition at line 135 of file signalmonitorvalue.h.
Referenced by GetMax(), GetStatus(), SetMax(), SetRange(), SetValue(), SignalMonitorValue(), and toString().
int SignalMonitorValue::timeout [private] |
Definition at line 136 of file signalmonitorvalue.h.
Referenced by GetStatus(), GetTimeout(), SetTimeout(), SignalMonitorValue(), and toString().
bool SignalMonitorValue::high_threshold [private] |
Definition at line 137 of file signalmonitorvalue.h.
Referenced by GetStatus(), IsGood(), IsHighThreshold(), SetThreshold(), SignalMonitorValue(), and toString().
bool SignalMonitorValue::set [private] |
Definition at line 138 of file signalmonitorvalue.h.
1.5.5