vdr  2.2.0
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
cRcuRemote Class Reference

Public Member Functions

 cRcuRemote (const char *DeviceName)
 
virtual ~cRcuRemote ()
 
virtual bool Ready (void)
 
virtual bool Initialize (void)
 
- Public Member Functions inherited from cRemote
virtual ~cRemote ()
 
const char * Name (void)
 
- Public Member Functions inherited from cListObject
 cListObject (void)
 
virtual ~cListObject ()
 
virtual int Compare (const cListObject &ListObject) const
 
void Append (cListObject *Object)
 
void Insert (cListObject *Object)
 
void Unlink (void)
 
int Index (void) const
 
cListObjectPrev (void) const
 
cListObjectNext (void) const
 

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 Member Functions inherited from cThread
 cThread (const char *Description=NULL, bool LowPriority=false)
 
virtual ~cThread ()
 
void SetDescription (const char *Description,...) __attribute__((format(printf
 
void bool Start (void)
 
bool Active (void)
 
void SetPriority (int Priority)
 
void SetIOPriority (int Priority)
 
void Lock (void)
 
void Unlock (void)
 
bool Running (void)
 
void Cancel (int WaitSeconds=0)
 
- Private Member Functions inherited from cStatus
 cStatus (void)
 
virtual ~cStatus ()
 
virtual void ChannelChange (const cChannel *Channel)
 
virtual void TimerChange (const cTimer *Timer, eTimerChange Change)
 
virtual void Replaying (const cControl *Control, const char *Name, const char *FileName, bool On)
 
virtual void SetVolume (int Volume, bool Absolute)
 
virtual void SetAudioTrack (int Index, const char *const *Tracks)
 
virtual void SetAudioChannel (int AudioChannel)
 
virtual void SetSubtitleTrack (int Index, const char *const *Tracks)
 
virtual void OsdClear (void)
 
virtual void OsdTitle (const char *Title)
 
virtual void OsdStatusMessage (const char *Message)
 
virtual void OsdHelpKeys (const char *Red, const char *Green, const char *Yellow, const char *Blue)
 
virtual void OsdItem (const char *Text, int Index)
 
virtual void OsdCurrentItem (const char *Text)
 
virtual void OsdTextItem (const char *Text, bool Scroll)
 
virtual void OsdChannel (const char *Text)
 
virtual void OsdProgramme (time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle)
 
- Private Member Functions inherited from cListObject
 cListObject (void)
 
virtual ~cListObject ()
 
virtual int Compare (const cListObject &ListObject) const
 
void Append (cListObject *Object)
 
void Insert (cListObject *Object)
 
void Unlink (void)
 
int Index (void) const
 
cListObjectPrev (void) const
 
cListObjectNext (void) const
 

Private Attributes

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

Additional Inherited Members

- Static Public Member Functions inherited from cRemote
static void SetLearning (cRemote *Learning)
 
static bool IsLearning ()
 
static bool Enabled (void)
 
static void SetEnabled (bool Enabled)
 
static void Clear (void)
 
static bool Put (eKeys Key, bool AtFront=false)
 
static bool PutMacro (eKeys Key)
 
static bool CallPlugin (const char *Plugin)
 
static const char * GetPlugin (void)
 
static bool HasKeys (void)
 
static eKeys Get (int WaitMs=1000, char **UnknownCode=NULL)
 
static time_t LastActivity (void)
 
static void TriggerLastActivity (void)
 
- Protected Member Functions inherited from cRemote
 cRemote (const char *Name)
 
const char * GetSetup (void)
 
void PutSetup (const char *Setup)
 
bool Put (uint64_t Code, bool Repeat=false, bool Release=false)
 
bool Put (const char *Code, bool Repeat=false, bool Release=false)
 
- Static Private Member Functions inherited from cThread
static tThreadId ThreadId (void)
 
static tThreadId IsMainThread (void)
 
static void SetMainThreadId (void)
 
- Static Private Member Functions inherited from cStatus
static void MsgChannelChange (const cChannel *Channel)
 
static void MsgTimerChange (const cTimer *Timer, eTimerChange Change)
 
static void MsgChannelSwitch (const cDevice *Device, int ChannelNumber, bool LiveView)
 
static void MsgRecording (const cDevice *Device, const char *Name, const char *FileName, bool On)
 
static void MsgReplaying (const cControl *Control, const char *Name, const char *FileName, bool On)
 
static void MsgSetVolume (int Volume, bool Absolute)
 
static void MsgSetAudioTrack (int Index, const char *const *Tracks)
 
static void MsgSetAudioChannel (int AudioChannel)
 
static void MsgSetSubtitleTrack (int Index, const char *const *Tracks)
 
static void MsgOsdClear (void)
 
static void MsgOsdTitle (const char *Title)
 
static void MsgOsdStatusMessage (const char *Message)
 
static void MsgOsdHelpKeys (const char *Red, const char *Green, const char *Yellow, const char *Blue)
 
static void MsgOsdItem (const char *Text, int Index)
 
static void MsgOsdCurrentItem (const char *Text)
 
static void MsgOsdTextItem (const char *Text, bool Scroll=false)
 
static void MsgOsdChannel (const char *Text)
 
static void MsgOsdProgramme (time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle)
 

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  )
privatevirtual

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 
)
privatevirtual

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 
)
privatevirtual

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().

bool cRcuRemote::receivedCommand
private

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: