#include <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 |
Definition at line 12 of file signalmonitorvalue.h.
typedef vector<SignalMonitorValue> SignalMonitorValue::SignalMonitorList [private] |
Definition at line 14 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 34 of file signalmonitorvalue.cpp.
| virtual SignalMonitorValue::~SignalMonitorValue | ( | ) | [inline, virtual] |
Definition at line 19 of file signalmonitorvalue.h.
| SignalMonitorValue::SignalMonitorValue | ( | ) | [inline, private] |
Definition at line 128 of file signalmonitorvalue.h.
Referenced by Create().
| 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 60 of file signalmonitorvalue.cpp.
| QString SignalMonitorValue::GetName | ( | void | ) | const |
Returns the long name of this value.
Definition at line 86 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 96 of file signalmonitorvalue.cpp.
| QString SignalMonitorValue::GetStatus | ( | void | ) | const [inline] |
Returns a signal monitor value as one long string.
Definition at line 29 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 37 of file signalmonitorvalue.h.
Referenced by GetNormalizedValue(), DVBSignalMonitor::GetRotorStatus(), ScanMonitor::StatusChannelTuned(), ScanMonitor::StatusSignalLock(), and SignalMonitor::UpdateValues().
| int SignalMonitorValue::GetMin | ( | ) | const [inline] |
Returns smallest value possible, used for signal monitor bars.
Definition at line 39 of file signalmonitorvalue.h.
Referenced by GetNormalizedValue().
| int SignalMonitorValue::GetMax | ( | ) | const [inline] |
Returns greatest value possible, used for signal monitor bars.
Definition at line 41 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 44 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 47 of file signalmonitorvalue.h.
| int SignalMonitorValue::GetTimeout | ( | ) | const [inline] |
Returns how long to wait for a good value in milliseconds.
Definition at line 49 of file signalmonitorvalue.h.
| 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 53 of file signalmonitorvalue.h.
Referenced by DTVSignalMonitor::GetStatusList(), SignalMonitor::HasSignalLock(), DTVSignalMonitor::IsAllGood(), toString(), IPTVSignalMonitor::UpdateValues(), HDHRSignalMonitor::UpdateValues(), FirewireSignalMonitor::UpdateValues(), DVBSignalMonitor::UpdateValues(), CetonSignalMonitor::UpdateValues(), and AnalogSignalMonitor::UpdateValues().
| 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 60 of file signalmonitorvalue.h.
Referenced by ScanMonitor::StatusRotorPosition(), ScanMonitor::StatusSignalStrength(), and ScanMonitor::StatusSignalToNoise().
| void SignalMonitorValue::SetValue | ( | int | _value | ) | [inline] |
Definition at line 71 of file signalmonitorvalue.h.
Referenced by DVBSignalMonitor::GetRotorStatus(), AnalogSignalMonitor::handleHDPVR(), Init(), IPTVSignalMonitor::IPTVSignalMonitor(), ScriptSignalMonitor::ScriptSignalMonitor(), Set(), DVBSignalMonitor::SetRotorValue(), SignalMonitor::SignalMonitor(), DTVSignalMonitor::UpdateMonitorValues(), SignalMonitor::UpdateValues(), HDHRSignalMonitor::UpdateValues(), FirewireSignalMonitor::UpdateValues(), DVBSignalMonitor::UpdateValues(), CetonSignalMonitor::UpdateValues(), ASISignalMonitor::UpdateValues(), and AnalogSignalMonitor::UpdateValues().
| void SignalMonitorValue::SetMin | ( | int | _min | ) | [inline] |
Definition at line 77 of file signalmonitorvalue.h.
| void SignalMonitorValue::SetMax | ( | int | _max | ) | [inline] |
Definition at line 79 of file signalmonitorvalue.h.
| void SignalMonitorValue::SetThreshold | ( | int | _threshold | ) | [inline] |
Definition at line 81 of file signalmonitorvalue.h.
Referenced by CetonSignalMonitor::CetonSignalMonitor(), DVBSignalMonitor::DVBSignalMonitor(), FirewireSignalMonitor::FirewireSignalMonitor(), HDHRSignalMonitor::HDHRSignalMonitor(), Set(), and DVBSignalMonitor::SetRotorTarget().
| void SignalMonitorValue::SetThreshold | ( | int | _threshold, | |
| bool | _high_threshold | |||
| ) | [inline] |
Definition at line 83 of file signalmonitorvalue.h.
| void SignalMonitorValue::SetRange | ( | int | _min, | |
| int | _max | |||
| ) | [inline] |
Sets the minimum and maximum values.
Definition at line 90 of file signalmonitorvalue.h.
Referenced by DVBSignalMonitor::DVBSignalMonitor(), and Set().
| void SignalMonitorValue::SetTimeout | ( | int | _timeout | ) | [inline] |
Definition at line 95 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 19 of file signalmonitorvalue.cpp.
Referenced by SignalMonitorValue().
| SignalMonitorValue * SignalMonitorValue::Create | ( | const QString & | _name, | |
| const QString & | _longString | |||
| ) | [static] |
Definition at line 145 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 161 of file signalmonitorvalue.cpp.
Referenced by TV::UpdateOSDSignal().
| 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 188 of file signalmonitorvalue.cpp.
Referenced by TV::UpdateOSDSignal().
| 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 218 of file signalmonitorvalue.cpp.
| QString SignalMonitorValue::toString | ( | void | ) | const [inline] |
Definition at line 117 of file signalmonitorvalue.h.
| bool SignalMonitorValue::Set | ( | const QString & | _name, | |
| const QString & | _longString | |||
| ) | [private] |
Definition at line 106 of file signalmonitorvalue.cpp.
QStringList SignalMonitorValue::ERROR_NO_CHANNEL [static] |
Definition at line 111 of file signalmonitorvalue.h.
Referenced by Init().
QStringList SignalMonitorValue::ERROR_NO_LINK [static] |
Definition at line 112 of file signalmonitorvalue.h.
Referenced by Init().
QStringList SignalMonitorValue::SIGNAL_LOCK [static] |
Definition at line 113 of file signalmonitorvalue.h.
Referenced by Init().
bool SignalMonitorValue::run_static_init = true [static] |
Definition at line 115 of file signalmonitorvalue.h.
Referenced by Init().
QString SignalMonitorValue::name [private] |
Definition at line 136 of file signalmonitorvalue.h.
Referenced by GetName(), Set(), and SignalMonitorValue().
QString SignalMonitorValue::noSpaceName [private] |
Definition at line 137 of file signalmonitorvalue.h.
Referenced by GetShortName(), GetStatus(), Set(), SignalMonitorValue(), and toString().
int SignalMonitorValue::value [private] |
Definition at line 138 of file signalmonitorvalue.h.
Referenced by GetStatus(), GetValue(), IsGood(), SetValue(), SignalMonitorValue(), and toString().
int SignalMonitorValue::threshold [private] |
Definition at line 139 of file signalmonitorvalue.h.
Referenced by GetStatus(), GetThreshold(), IsGood(), SetThreshold(), SignalMonitorValue(), and toString().
int SignalMonitorValue::minval [private] |
Definition at line 140 of file signalmonitorvalue.h.
Referenced by GetMin(), GetStatus(), SetMin(), SetRange(), SetValue(), SignalMonitorValue(), and toString().
int SignalMonitorValue::maxval [private] |
Definition at line 141 of file signalmonitorvalue.h.
Referenced by GetMax(), GetStatus(), SetMax(), SetRange(), SetValue(), SignalMonitorValue(), and toString().
int SignalMonitorValue::timeout [private] |
Definition at line 142 of file signalmonitorvalue.h.
Referenced by GetStatus(), GetTimeout(), SetTimeout(), SignalMonitorValue(), and toString().
bool SignalMonitorValue::high_threshold [private] |
Definition at line 143 of file signalmonitorvalue.h.
Referenced by GetStatus(), IsGood(), IsHighThreshold(), SetThreshold(), SignalMonitorValue(), and toString().
bool SignalMonitorValue::set [private] |
Definition at line 144 of file signalmonitorvalue.h.
1.6.3