summaryrefslogtreecommitdiff
path: root/diseqc.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-10-06 10:25:42 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2002-10-06 10:25:42 +0200
commit962596f4abc3790ac0f3f317079a3362210fff8f (patch)
treeb9428aea092f90731b389604fcc8540070dbf556 /diseqc.h
parentb7615a7ae144789da14d32019b2f86fc4bf6dcef (diff)
downloadvdr-962596f4abc3790ac0f3f317079a3362210fff8f.tar.gz
vdr-962596f4abc3790ac0f3f317079a3362210fff8f.tar.bz2
Modified channel handling; full DiSEqC support
Diffstat (limited to 'diseqc.h')
-rw-r--r--diseqc.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/diseqc.h b/diseqc.h
new file mode 100644
index 00000000..f2b0e99c
--- /dev/null
+++ b/diseqc.h
@@ -0,0 +1,60 @@
+/*
+ * diseqc.h: DiSEqC handling
+ *
+ * See the main source file 'vdr.c' for copyright information and
+ * how to reach the author.
+ *
+ * $Id: diseqc.h 1.1 2002/10/05 13:02:52 kls Exp $
+ */
+
+#ifndef __DISEQC_H
+#define __DISEQC_H
+
+#include "config.h"
+
+class cDiseqc : public cListObject {
+public:
+ enum eDiseqcActions {
+ daNone,
+ daToneOff,
+ daToneOn,
+ daVoltage13,
+ daVoltage18,
+ daMiniA,
+ daMiniB,
+ daCodes,
+ };
+ enum { MaxDiseqcCodes = 6 };
+private:
+ int source;
+ int slof;
+ char polarization;
+ int lof;
+ char *commands;
+ char *currentAction;
+ bool parsing;
+ uchar codes[MaxDiseqcCodes];
+ int numCodes;
+ char *Wait(char *s);
+ char *Codes(char *s);
+public:
+ cDiseqc(void);
+ ~cDiseqc();
+ bool Parse(const char *s);
+ eDiseqcActions Execute(bool Start = false);
+ int Source(void) const { return source; }
+ int Slof(void) const { return slof; }
+ char Polarization(void) const { return polarization; }
+ int Lof(void) const { return lof; }
+ const char *Commands(void) const { return commands; }
+ uchar *Codes(int &NumCodes) { NumCodes = numCodes; return numCodes ? codes : NULL; }
+ };
+
+class cDiseqcs : public cConfig<cDiseqc> {
+public:
+ cDiseqc *Get(int Source, int Frequency, char Polarization);
+ };
+
+extern cDiseqcs Diseqcs;
+
+#endif //__DISEQC_H