summaryrefslogtreecommitdiff
path: root/sources.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2013-08-21 11:02:52 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2013-08-21 11:02:52 +0200
commitcd10b439d0465afa6bce38188a4e9d8a5e74d859 (patch)
tree54480623232fb0e8e94fd37a5c9e31603301dd35 /sources.h
parent5b76eec1afbe435b5d1dfabaaa9546f8e400cba7 (diff)
downloadvdr-cd10b439d0465afa6bce38188a4e9d8a5e74d859.tar.gz
vdr-cd10b439d0465afa6bce38188a4e9d8a5e74d859.tar.bz2
Added basic support for positioners to control steerable satellite dishes
Diffstat (limited to 'sources.h')
-rw-r--r--sources.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/sources.h b/sources.h
index e40b2b1d..8c2fdfb8 100644
--- a/sources.h
+++ b/sources.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: sources.h 3.1 2013/04/11 10:23:16 kls Exp $
+ * $Id: sources.h 3.2 2013/08/21 10:27:32 kls Exp $
*/
#ifndef __SOURCES_H
@@ -22,6 +22,7 @@ public:
stTerr = ('T' << 24),
st_Mask = 0xFF000000,
st_Pos = 0x0000FFFF,
+ st_Any = 0x00000E10, // 3600 - special value indicating "any position"
};
private:
int code;
@@ -33,12 +34,19 @@ public:
int Code(void) const { return code; }
int Position(void) { return Position(code); }
///< Returns the orbital position of the satellite in case this is a DVB-S
- ///< source (zero otherwise). The returned value is in the range -1800...+1800.
+ ///< source (zero otherwise). The returned value is in the range -1800...+1800,
+ ///< except for the special value 3600, which indicates "any position". This is
+ ///< used with positioners that can move the dish to any requested satellite
+ ///< within their range.
///< A positive sign indicates a position east of Greenwich, while western
///< positions have a negative sign. The absolute value is in "degrees * 10",
///< which allows for a resolution of 1/10 of a degree.
const char *Description(void) const { return description; }
bool Parse(const char *s);
+ static bool Matches(int Code1, int Code2);
+ ///< Returns true if Code2 matches Code1. This is simply a check whether the
+ ///< two codes are equal, except for the special case that Code1 is stSat|st_Any,
+ ///< in which case it matches any Code2 that is stSat.
static int Position(int Code);
static char ToChar(int Code) { return (Code & st_Mask) >> 24; }
static cString ToString(int Code);