Go to the documentation of this file.
12 #define LOC QString("SatIPSigMon[%1]: ").arg(m_inputid)
20 LOG(VB_CHANNEL, LOG_INFO,
LOC +
"ctor");
23 std::chrono::milliseconds
wait = 3s;
24 std::chrono::milliseconds signal_timeout = 0ms;
25 std::chrono::milliseconds tuning_timeout = 0ms;
27 if (tuning_timeout <
wait)
29 LOG(VB_CHANNEL, LOG_INFO,
LOC +
30 QString(
"Tuning timeout from database: %1 ms is too small, using %2 ms")
31 .arg(tuning_timeout.count()).arg(
wait.count()));
35 wait = tuning_timeout;
36 LOG(VB_CHANNEL, LOG_INFO,
LOC +
37 QString(
"Tuning timeout: %1 ms").arg(
wait.count()));
51 LOG(VB_CHANNEL, LOG_INFO,
LOC +
"dtor");
58 LOG(VB_CHANNEL, LOG_INFO,
LOC +
"Stop() -- begin");
66 LOG(VB_CHANNEL, LOG_INFO,
LOC +
"Stop() -- end");
83 m_error = tr(
"Error: stream handler died");
103 bool wasLocked =
false;
104 bool isLocked =
false;
116 if (wasLocked != isLocked)
118 LOG(VB_CHANNEL, LOG_INFO,
LOC +
"UpdateValues -- Signal " +
119 (isLocked ?
"Locked" :
"Lost"));
void AddFlags(uint64_t _flags) override
void SetValue(int _value)
void SetThreshold(int _threshold)
bool wait(std::chrono::milliseconds time=std::chrono::milliseconds::max())
Wait for the MThread to exit, with a maximum timeout.
static const uint64_t kDTVSigMon_WaitForMGT
MPEGStreamData * GetStreamData()
Returns the MPEG stream data if it exists.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
bool HasAnyFlag(uint64_t _flags) const
bool m_streamHandlerStarted
static const uint64_t kSigMon_WaitForSig
virtual void RemoveListener(MPEGStreamData *data)
QRecursiveMutex m_statusLock
SatIPStreamHandler * m_streamHandler
void SetTimeout(std::chrono::milliseconds _timeout)
SignalMonitorValue m_signalStrength
static void Return(SatIPStreamHandler *&ref, int inputid)
SignalMonitorValue m_signalLock
void SendMessageAllGood(void)
static const uint64_t kDTVSigMon_WaitForPMT
static const uint64_t kDTVSigMon_WaitForPAT
static const uint64_t kDTVSigMon_WaitForNIT
virtual void EmitStatus(void)
static const uint64_t kDTVSigMon_WaitForSDT
SatIPChannel * GetSatIPChannel(void)
void UpdateValues(void) override
This should be overridden to actually do signal monitoring.
void SetRange(int _min, int _max)
Sets the minimum and maximum values.
static bool GetTimeouts(uint inputid, std::chrono::milliseconds &signal_timeout, std::chrono::milliseconds &channel_timeout)
void Stop(void) override
Stop signal monitoring thread.
bool IsGood() const
Returns true if the value is equal to the threshold, or on the right side of the threshold (depends o...
void AddListener(MPEGStreamData *data, bool=false, bool=false, const QString &output_file=QString()) override
SatIPSignalMonitor(int db_cardnum, SatIPChannel *channel, bool release_stream, uint64_t flags=0)
~SatIPSignalMonitor() override
This class is intended to detect the presence of needed tables.
QString GetDevice(void) const override
Returns String representing device, useful for debugging.
static SatIPStreamHandler * Get(const QString &devname, int inputid)
bool IsRunning(void) const
virtual void Stop()
Stop signal monitoring thread.
bool IsAllGood(void) const override
static const uint64_t kDTVSigMon_WaitForVCT