vdr  1.7.27
Public Member Functions | Private Types | Private Member Functions | Private Attributes
cRcuRemote Class Reference

List of all members.

Public Member Functions

 cRcuRemote (const char *DeviceName)
virtual ~cRcuRemote ()
virtual bool Ready (void)
virtual bool Initialize (void)

Private Types

enum  { modeH = 'h', modeB = 'b', modeS = 's' }

Private Member Functions

bool SendCommand (unsigned char Cmd)
int ReceiveByte (int TimeoutMs=0)
bool SendByteHandshake (unsigned char c)
bool SendByte (unsigned char c)
bool SendData (unsigned int n)
void SetCode (unsigned char Code)
void SetMode (unsigned char Mode)
void SetNumber (int n, bool Hex=false)
void SetPoints (unsigned char Dp, bool On)
void SetString (const char *s)
bool DetectCode (unsigned char *Code)
virtual void Action (void)
virtual void ChannelSwitch (const cDevice *Device, int ChannelNumber, bool LiveView)
virtual void Recording (const cDevice *Device, const char *Name, const char *FileName, bool On)

Private Attributes

int f
unsigned char dp
unsigned char code
unsigned char mode
int number
unsigned int data
bool receivedCommand

Detailed Description

Definition at line 27 of file rcu.c.


Member Enumeration Documentation

anonymous enum [private]
Enumerator:
modeH 
modeB 
modeS 

Definition at line 29 of file rcu.c.


Constructor & Destructor Documentation

cRcuRemote::cRcuRemote ( const char *  DeviceName)
cRcuRemote::~cRcuRemote ( ) [virtual]

Definition at line 91 of file rcu.c.

References cThread::Cancel().


Member Function Documentation

void cRcuRemote::Action ( void  ) [private, virtual]

A derived cThread class must implement the code it wants to execute as a separate thread in this function.

If this is a loop, it must check Running() repeatedly to see whether it's time to stop.

Implements cThread.

Definition at line 121 of file rcu.c.

References code, data, cTimeMs::Elapsed(), f, mode, cRemote::Put(), ReceiveByte(), receivedCommand, REPEATDELAY, REPEATLIMIT, cThread::Running(), SendCommand(), SendData(), and cTimeMs::Set().

void cRcuRemote::ChannelSwitch ( const cDevice Device,
int  ChannelNumber,
bool  LiveView 
) [private, virtual]

Reimplemented from cStatus.

Definition at line 356 of file rcu.c.

References cDevice::CurrentChannel(), and SetNumber().

bool cRcuRemote::DetectCode ( unsigned char *  Code) [private]

Definition at line 322 of file rcu.c.

References modeB, modeH, receivedCommand, REPEATDELAY, SetCode(), SetMode(), SetString(), and cCondWait::SleepMs().

Referenced by Initialize().

bool cRcuRemote::Initialize ( void  ) [virtual]

Reimplemented from cRemote.

Definition at line 101 of file rcu.c.

References code, DetectCode(), f, isyslog, cRemote::Name(), and cRemote::PutSetup().

bool cRcuRemote::Ready ( void  ) [virtual]

Reimplemented from cRemote.

Definition at line 96 of file rcu.c.

References f.

int cRcuRemote::ReceiveByte ( int  TimeoutMs = 0) [private]

Definition at line 203 of file rcu.c.

References f, cFile::FileReady(), LOG_ERROR, and safe_read().

Referenced by Action(), and SendByteHandshake().

void cRcuRemote::Recording ( const cDevice Device,
const char *  Name,
const char *  FileName,
bool  On 
) [private, virtual]

Reimplemented from cStatus.

Definition at line 362 of file rcu.c.

References cDevice::DeviceNumber(), cDevice::Receiving(), and SetPoints().

bool cRcuRemote::SendByte ( unsigned char  c) [private]

Definition at line 240 of file rcu.c.

References SendByteHandshake().

Referenced by SendCommand(), and SendData().

bool cRcuRemote::SendByteHandshake ( unsigned char  c) [private]

Definition at line 216 of file rcu.c.

References f, HANDSHAKETIMEOUT, LOG_ERROR, and ReceiveByte().

Referenced by SendByte().

bool cRcuRemote::SendCommand ( unsigned char  Cmd) [private]

Definition at line 269 of file rcu.c.

References SendByte().

Referenced by Action(), and SendData().

bool cRcuRemote::SendData ( unsigned int  n) [private]

Definition at line 249 of file rcu.c.

References mode, SendByte(), and SendCommand().

Referenced by Action().

void cRcuRemote::SetCode ( unsigned char  Code) [private]

Definition at line 259 of file rcu.c.

References code.

Referenced by cRcuRemote(), and DetectCode().

void cRcuRemote::SetMode ( unsigned char  Mode) [private]

Definition at line 264 of file rcu.c.

References mode.

Referenced by DetectCode().

void cRcuRemote::SetNumber ( int  n,
bool  Hex = false 
) [private]

Definition at line 274 of file rcu.c.

References data, dp, and number.

Referenced by ChannelSwitch(), cRcuRemote(), SetPoints(), and SetString().

void cRcuRemote::SetPoints ( unsigned char  Dp,
bool  On 
) [private]

Definition at line 313 of file rcu.c.

References dp, number, and SetNumber().

Referenced by Recording().

void cRcuRemote::SetString ( const char *  s) [private]

Definition at line 296 of file rcu.c.

References mode, modeH, and SetNumber().

Referenced by DetectCode().


Member Data Documentation

unsigned char cRcuRemote::code [private]

Definition at line 31 of file rcu.c.

Referenced by Action(), cRcuRemote(), Initialize(), and SetCode().

unsigned int cRcuRemote::data [private]

Definition at line 33 of file rcu.c.

Referenced by Action(), cRcuRemote(), and SetNumber().

unsigned char cRcuRemote::dp [private]

Definition at line 31 of file rcu.c.

Referenced by cRcuRemote(), SetNumber(), and SetPoints().

int cRcuRemote::f [private]

Definition at line 30 of file rcu.c.

Referenced by Action(), cRcuRemote(), Initialize(), Ready(), ReceiveByte(), and SendByteHandshake().

unsigned char cRcuRemote::mode [private]

Definition at line 31 of file rcu.c.

Referenced by Action(), cRcuRemote(), SendData(), SetMode(), and SetString().

int cRcuRemote::number [private]

Definition at line 32 of file rcu.c.

Referenced by cRcuRemote(), SetNumber(), and SetPoints().

Definition at line 34 of file rcu.c.

Referenced by Action(), cRcuRemote(), and DetectCode().


The documentation for this class was generated from the following file: