cDigiboxDevice Class Reference

Inheritance diagram for cDigiboxDevice:

Inheritance graph
[legend]
Collaboration diagram for cDigiboxDevice:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 cDigiboxDevice (void)
virtual ~cDigiboxDevice ()
virtual bool ProvidesSource (int Source) const
 Returns true if this device can provide the given source.
virtual bool ProvidesTransponder (const cChannel *Channel) const
virtual bool ProvidesChannel (const cChannel *Channel, int Priority=-1, bool *NeedsSetChannel=NULL) const
virtual bool SetChannelDevice (const cChannel *Channel, bool LiveView)
 Sets the device to the given channel (actual physical setup).

Protected Member Functions

virtual bool SetPid (cPidHandle *Handle, int Type, bool On)
virtual bool OpenDvr (void)
virtual void CloseDvr (void)
 Shuts down the DVR.
virtual bool GetTSPacket (uchar *&Data)

Private Member Functions

void LircSend (const char *s)
void LircSend (int n)

Private Attributes

int source
int digiboxChannelNumber
int fd_dvr
int apid
int vpid
cTSBuffertsBuffer
int fd_lirc


Detailed Description

Definition at line 59 of file sky.c.


Constructor & Destructor Documentation

cDigiboxDevice::cDigiboxDevice ( void   ) 

Definition at line 83 of file sky.c.

References apid, digiboxChannelNumber, fd_dvr, fd_lirc, cSource::FromString(), LOG_ERROR, source, strn0cpy(), and vpid.

Here is the call graph for this function:

cDigiboxDevice::~cDigiboxDevice (  )  [virtual]

Definition at line 103 of file sky.c.

References fd_lirc.


Member Function Documentation

void cDigiboxDevice::LircSend ( const char *  s  )  [private]

Definition at line 109 of file sky.c.

References dsyslog, fd_lirc, LOG_ERROR, and cCondWait::SleepMs().

Referenced by LircSend(), and SetChannelDevice().

Here is the call graph for this function:

void cDigiboxDevice::LircSend ( int  n  )  [private]

Definition at line 119 of file sky.c.

References LircSend().

Here is the call graph for this function:

bool cDigiboxDevice::SetPid ( cPidHandle Handle,
int  Type,
bool  On 
) [protected, virtual]

Does the actual PID setting on this device. On indicates whether the PID shall be added or deleted. Handle->handle can be used by the device to store information it needs to receive this PID (for instance a file handle). Handle->used indicates how many receivers are using this PID. Type indicates some special types of PIDs, which the device may need to set in a specific way.

Reimplemented from cDevice.

Definition at line 132 of file sky.c.

bool cDigiboxDevice::OpenDvr ( void   )  [protected, virtual]

Opens the DVR of this device and prepares it to deliver a Transport Stream for use in a cReceiver.

Reimplemented from cDevice.

Definition at line 138 of file sky.c.

References cDevice::CardIndex(), CloseDvr(), fd_dvr, MEGABYTE, and tsBuffer.

Here is the call graph for this function:

void cDigiboxDevice::CloseDvr ( void   )  [protected, virtual]

Shuts down the DVR.

Reimplemented from cDevice.

Definition at line 147 of file sky.c.

References fd_dvr, and tsBuffer.

Referenced by OpenDvr().

bool cDigiboxDevice::GetTSPacket ( uchar *&  Data  )  [protected, virtual]

Gets exactly one TS packet from the DVR of this device and returns a pointer to it in Data. Only the first 188 bytes (TS_SIZE) Data points to are valid and may be accessed. If there is currently no new data available, Data will be set to NULL. The function returns false in case of a non recoverable error, otherwise it returns true, even if Data is NULL.

Reimplemented from cDevice.

Definition at line 157 of file sky.c.

References apid, DUMMYAPID, DUMMYVPID, cTSBuffer::Get(), PID_MASK_HI, tsBuffer, and vpid.

Here is the call graph for this function:

bool cDigiboxDevice::ProvidesSource ( int  Source  )  const [virtual]

Returns true if this device can provide the given source.

Reimplemented from cDevice.

Definition at line 176 of file sky.c.

References source.

bool cDigiboxDevice::ProvidesTransponder ( const cChannel Channel  )  const [virtual]

Returns true if this device can provide the transponder of the given Channel (which implies that it can provide the Channel's source).

Reimplemented from cDevice.

Definition at line 181 of file sky.c.

bool cDigiboxDevice::ProvidesChannel ( const cChannel Channel,
int  Priority = -1,
bool *  NeedsDetachReceivers = NULL 
) const [virtual]

Returns true if this device can provide the given channel. In case the device has cReceivers attached to it or it is the primary device, Priority is used to decide whether the caller's request can be honored. The special Priority value -1 will tell the caller whether this device is principally able to provide the given Channel, regardless of any attached cReceivers. If NeedsDetachReceivers is given, the resulting value in it will tell the caller whether or not it will have to detach any currently attached receivers from this device before calling SwitchChannel. Note that the return value in NeedsDetachReceivers is only meaningful if the function itself actually returns true. The default implementation always returns false, so a derived cDevice class that can provide channels must implement this function.

Reimplemented from cDevice.

Definition at line 186 of file sky.c.

References cSkyChannel::digiboxChannelNumber, digiboxChannelNumber, cSkyChannels::GetSkyChannel(), cDevice::Priority(), and cDevice::Receiving().

Here is the call graph for this function:

bool cDigiboxDevice::SetChannelDevice ( const cChannel Channel,
bool  LiveView 
) [virtual]

Sets the device to the given channel (actual physical setup).

Reimplemented from cDevice.

Definition at line 210 of file sky.c.

References cChannel::Apid(), apid, cSkyChannel::digiboxChannelNumber, digiboxChannelNumber, fd_lirc, cSkyChannels::GetSkyChannel(), LircSend(), cDevice::Receiving(), cChannel::Vpid(), and vpid.

Here is the call graph for this function:


Member Data Documentation

int cDigiboxDevice::source [private]

Definition at line 61 of file sky.c.

Referenced by cDigiboxDevice(), and ProvidesSource().

Definition at line 62 of file sky.c.

Referenced by cDigiboxDevice(), ProvidesChannel(), and SetChannelDevice().

int cDigiboxDevice::fd_dvr [private]

Definition at line 63 of file sky.c.

Referenced by cDigiboxDevice(), CloseDvr(), and OpenDvr().

int cDigiboxDevice::apid [private]

Definition at line 64 of file sky.c.

Referenced by cDigiboxDevice(), GetTSPacket(), and SetChannelDevice().

int cDigiboxDevice::vpid [private]

Definition at line 64 of file sky.c.

Referenced by cDigiboxDevice(), GetTSPacket(), and SetChannelDevice().

Definition at line 65 of file sky.c.

Referenced by CloseDvr(), GetTSPacket(), and OpenDvr().

int cDigiboxDevice::fd_lirc [private]

Definition at line 66 of file sky.c.

Referenced by cDigiboxDevice(), LircSend(), SetChannelDevice(), and ~cDigiboxDevice().


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

Generated on Tue Nov 4 19:58:15 2008 for VDR by  doxygen 1.5.6