diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2000-02-19 18:00:00 +0100 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2000-02-19 18:00:00 +0100 |
commit | c475c637aba78366763cb122673ff836dd9e7e85 (patch) | |
tree | 84548734048499e913f200e1359acec4fa441fb0 /remote.h | |
download | vdr-patch-lnbsharing-c475c637aba78366763cb122673ff836dd9e7e85.tar.gz vdr-patch-lnbsharing-c475c637aba78366763cb122673ff836dd9e7e85.tar.bz2 |
Version 0.01 (Initial revision).vdr_osm-0.01
Diffstat (limited to 'remote.h')
-rw-r--r-- | remote.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/remote.h b/remote.h new file mode 100644 index 0000000..6827929 --- /dev/null +++ b/remote.h @@ -0,0 +1,43 @@ +/* + * remote.h: Interface to the Remote Control Unit + * + * See the main source file 'osm.c' for copyright information and + * how to reach the author. + * + * $Id: remote.h 1.1 2000/02/19 13:36:48 kls Exp $ + */ + +#ifndef __REMOTE_H +#define __REMOTE_H + +#include <stdio.h> +#include <time.h> + +class cRcIo { +private: + int f; + unsigned char dp, code, mode; + unsigned short address; + time_t t; + int firstTime, lastTime, minDelta; + unsigned int lastCommand; + bool SendCommand(unsigned char Cmd); + int ReceiveByte(bool Wait = true); + bool SendByteHandshake(unsigned char c); + bool SendByte(unsigned char c); +public: + enum { modeH = 'h', modeB = 'b', modeS = 's' }; + cRcIo(char *DeviceName); + ~cRcIo(); + void Flush(int WaitSeconds = 0); + bool SetCode(unsigned char Code, unsigned short Address); + bool SetMode(unsigned char Mode); + bool GetCommand(unsigned int *Command, unsigned short *Address = NULL); + bool Digit(int n, int v); + bool Number(int n, bool Hex = false); + void Points(unsigned char Dp) { dp = Dp; } + bool String(char *s); + bool DetectCode(unsigned char *Code, unsigned short *Address); + }; + +#endif //__REMOTE_H |