cRcuRemote Class Reference

#include <rcu.h>

Inheritance diagram for cRcuRemote:

Inheritance graph
[legend]
Collaboration diagram for cRcuRemote:

Collaboration graph
[legend]

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)
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 17 of file rcu.h.


Member Enumeration Documentation

anonymous enum [private]

Enumerator:
modeH 
modeB 
modeS 

Definition at line 19 of file rcu.h.


Constructor & Destructor Documentation

cRcuRemote::cRcuRemote ( const char *  DeviceName  ) 

Definition at line 20 of file rcu.c.

References code, data, dp, f, cRemote::GetSetup(), isyslog, LOG_ERROR_STR, mode, modeB, cRemote::Name(), number, receivedCommand, SetCode(), SetNumber(), Setup, and cThread::Start().

Here is the call graph for this function:

cRcuRemote::~cRcuRemote (  )  [virtual]

Definition at line 55 of file rcu.c.

References cThread::Cancel().

Here is the call graph for this function:


Member Function Documentation

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

Definition at line 233 of file rcu.c.

References SendByte().

Referenced by Action(), and SendData().

Here is the call graph for this function:

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

Definition at line 167 of file rcu.c.

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

Referenced by Action(), and SendByteHandshake().

Here is the call graph for this function:

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

Definition at line 180 of file rcu.c.

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

Referenced by SendByte().

Here is the call graph for this function:

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

Definition at line 204 of file rcu.c.

References SendByteHandshake().

Referenced by SendCommand(), and SendData().

Here is the call graph for this function:

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

Definition at line 213 of file rcu.c.

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

Referenced by Action().

Here is the call graph for this function:

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

Definition at line 223 of file rcu.c.

References code.

Referenced by cRcuRemote(), and DetectCode().

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

Definition at line 228 of file rcu.c.

References mode.

Referenced by DetectCode().

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

Definition at line 238 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 277 of file rcu.c.

References dp, number, and SetNumber().

Referenced by Recording().

Here is the call graph for this function:

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

Definition at line 260 of file rcu.c.

References mode, modeH, and SetNumber().

Referenced by DetectCode().

Here is the call graph for this function:

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

Definition at line 286 of file rcu.c.

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

Referenced by Initialize().

Here is the call graph for this function:

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 85 of file rcu.c.

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

Here is the call graph for this function:

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

Reimplemented from cStatus.

Definition at line 320 of file rcu.c.

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

Here is the call graph for this function:

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

Reimplemented from cStatus.

Definition at line 326 of file rcu.c.

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

Here is the call graph for this function:

bool cRcuRemote::Ready ( void   )  [virtual]

Reimplemented from cRemote.

Definition at line 60 of file rcu.c.

References f.

bool cRcuRemote::Initialize ( void   )  [virtual]

Reimplemented from cRemote.

Definition at line 65 of file rcu.c.

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

Here is the call graph for this function:


Member Data Documentation

int cRcuRemote::f [private]

Definition at line 20 of file rcu.h.

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

unsigned char cRcuRemote::dp [private]

Definition at line 21 of file rcu.h.

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

unsigned char cRcuRemote::code [private]

Definition at line 21 of file rcu.h.

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

unsigned char cRcuRemote::mode [private]

Definition at line 21 of file rcu.h.

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

int cRcuRemote::number [private]

Definition at line 22 of file rcu.h.

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

unsigned int cRcuRemote::data [private]

Definition at line 23 of file rcu.h.

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

Definition at line 24 of file rcu.h.

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


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

Generated on Tue Nov 4 20:00:53 2008 for VDR by  doxygen 1.5.6