summaryrefslogtreecommitdiff
path: root/diseqc.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2011-09-10 13:55:08 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2011-09-10 13:55:08 +0200
commit78e89efee8a54d4343183fc98a34d13f9e0ef478 (patch)
tree6b582833e0699e0e08abc97e3445d7b5a81e6746 /diseqc.h
parent873b14ac0c5e6ee53c61f3e08df2ce2ee7d9268f (diff)
downloadvdr-78e89efee8a54d4343183fc98a34d13f9e0ef478.tar.gz
vdr-78e89efee8a54d4343183fc98a34d13f9e0ef478.tar.bz2
The DiSEqC codes are now copied in the call to cDiseqc::Execute()
Diffstat (limited to 'diseqc.h')
-rw-r--r--diseqc.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/diseqc.h b/diseqc.h
index 413ed4d9..6dbf04f8 100644
--- a/diseqc.h
+++ b/diseqc.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: diseqc.h 2.2 2011/05/22 10:35:38 kls Exp $
+ * $Id: diseqc.h 2.3 2011/09/10 13:36:50 kls Exp $
*/
#ifndef __DISEQC_H
@@ -33,15 +33,13 @@ private:
int lof;
char *commands;
bool parsing;
- mutable uchar codes[MaxDiseqcCodes];
- mutable int numCodes;
const char *Wait(const char *s) const;
- const char *Codes(const char *s) const;
+ const char *GetCodes(const char *s, uchar *Codes = NULL, uint8_t *MaxCodes = NULL) const;
public:
cDiseqc(void);
~cDiseqc();
bool Parse(const char *s);
- eDiseqcActions Execute(const char **CurrentAction) const;
+ eDiseqcActions Execute(const char **CurrentAction, uchar *Codes, uint8_t *MaxCodes) const;
// Parses the DiSEqC commands and returns the appropriate action code
// with every call. CurrentAction must be the address of a character pointer,
// which is initialized to NULL. This pointer is used internally while parsing
@@ -49,13 +47,16 @@ public:
// it. Call Execute() repeatedly (always providing the same CurrentAction pointer)
// until it returns daNone. After a successful execution of all commands
// *CurrentAction points to the value 0x00.
+ // If the current action consists of sending code bytes to the device, those
+ // bytes will be copied into Codes. MaxCodes must be initialized to the maximum
+ // number of bytes Codes can handle, and will be set to the actual number of
+ // bytes copied to Codes upon return.
int Devices(void) const { return devices; }
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; }
- const uchar *Codes(int &NumCodes) const { NumCodes = numCodes; return numCodes ? codes : NULL; }
};
class cDiseqcs : public cConfig<cDiseqc> {