diff options
Diffstat (limited to 'device.h')
-rw-r--r-- | device.h | 25 |
1 files changed, 24 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.h 4.7 2017/04/15 09:41:34 kls Exp $ + * $Id: device.h 4.8 2017/04/17 14:46:57 kls Exp $ */ #ifndef __DEVICE_H @@ -106,6 +106,13 @@ public: /// The cDevice class is the base from which actual devices can be derived. +#define DTV_STAT_VALID_NONE 0x0000 +#define DTV_STAT_VALID_STRENGTH 0x0001 +#define DTV_STAT_VALID_CNR 0x0002 +#define DTV_STAT_VALID_BERPRE 0x0004 +#define DTV_STAT_VALID_BERPOST 0x0008 +#define DTV_STAT_VALID_PER 0x0010 + class cDevice : public cThread { friend class cLiveSubtitle; friend class cDeviceHook; @@ -284,6 +291,22 @@ public: ///< move the satellite dish to the requested position (only applies to DVB-S ///< devices). If no positioner is involved, or this is not a DVB-S device, ///< NULL will be returned. + virtual bool SignalStats(int &Valid, double *Strength = NULL, double *Cnr = NULL, double *BerPre = NULL, double *BerPost = NULL, double *Per = NULL) const; + ///< Returns statistics about the currently received signal (if available). + ///< Strength is the signal strength in dBm (typical range -100dBm...0dBm). + ///< Cnr is the carrier to noise ratio in dB (typical range 0dB...40dB). + ///< BerPre is the bit error rate before the forward error correction (FEC). + ///< BerPost is the bit error rate after the forward error correction (FEC). + ///< Per is the block error rate after the forward error correction (FEC). + ///< Typical range for BerPre, BerPost and Per is 0...1. + ///< If any of the given pointers is not NULL, the value of the respective signal + ///< statistic is returned in it. Upon return, Valid holds a combination of + ///< DTV_STAT_VALID_* flags, indicating which of the returned values are actually + ///< valid. If the flag for a particular parameter in Valid is 0, the returned + ///< value is undefined. It depends on the device which of these parameters + ///< (if any) are available. + ///< Returns true if any of the requested parameters is valid. + ///< If false is returned, the value in Valid is undefined. virtual int SignalStrength(void) const; ///< Returns the "strength" of the currently received signal. ///< This is a value in the range 0 (no signal at all) through |