MythTV  master
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes | List of all members
DiSEqCDevSCR Class Reference

Unicable / SCR Class. More...

#include <diseqc.h>

Inheritance diagram for DiSEqCDevSCR:
Inheritance graph
[legend]
Collaboration diagram for DiSEqCDevSCR:
Collaboration graph
[legend]

Public Types

enum  dvbdev_pos_t { kTypeScrPosA = 0, kTypeScrPosB = 1 }
 
- Public Types inherited from DiSEqCDevDevice
enum  dvbdev_t { kTypeSwitch = 0, kTypeRotor = 1, kTypeSCR = 2, kTypeLNB = 3 }
 

Public Member Functions

 DiSEqCDevSCR (DiSEqCDevTree &tree, uint devid)
 
 ~DiSEqCDevSCR ()
 
void Reset (void) override
 Resets to the last known settings for this device. More...
 
bool Execute (const DiSEqCDevSettings &, const DTVMultiplex &) override
 Applies DiSEqC settings to this node and any children. More...
 
bool PowerOff (void) const
 
bool Load (void) override
 Loads this device from the database. More...
 
bool Store (void) const override
 Stores this device to the database. More...
 
void SetUserBand (uint userband)
 
void SetFrequency (uint freq)
 
void SetPIN (int pin)
 
bool SetChild (uint ordinal, DiSEqCDevDevice *device) override
 Changes the nth child of this node. More...
 
uint GetUserBand (void) const
 
uint GetFrequency (void) const
 
int GetPIN (void) const
 
uint GetChildCount (void) const override
 Retrieves the proper number of children for this node. More...
 
bool IsCommandNeeded (const DiSEqCDevSettings &, const DTVMultiplex &) const override
 Determines if this device or any child will be sending a command for the given configuration chain. More...
 
uint GetVoltage (const DiSEqCDevSettings &, const DTVMultiplex &) const override
 Retrives the desired voltage for this config. More...
 
uint32_t GetIntermediateFrequency (const uint32_t frequency) const
 
DiSEqCDevDeviceGetSelectedChild (const DiSEqCDevSettings &) const override
 Retrieves the selected child for this configuration, if any. More...
 
DiSEqCDevDeviceGetChild (uint) override
 Retrieves the nth child of this node. More...
 
- Public Member Functions inherited from DiSEqCDevDevice
 DiSEqCDevDevice (DiSEqCDevTree &tree, uint devid)
 
virtual ~DiSEqCDevDevice ()
 
void SetDeviceType (dvbdev_t type)
 
void SetParent (DiSEqCDevDevice *parent)
 
void SetOrdinal (uint ordinal)
 
void SetDescription (const QString &desc)
 
void SetRepeatCount (uint repeat)
 
dvbdev_t GetDeviceType (void) const
 
uint GetDeviceID (void) const
 
bool IsRealDeviceID (void) const
 
DiSEqCDevDeviceGetParent (void) const
 
uint GetOrdinal (void) const
 
QString GetDescription (void) const
 
uint GetRepeatCount (void) const
 
DiSEqCDevDeviceFindDevice (uint dev_id)
 Returns a device by ID. More...
 

Static Public Member Functions

static QString SCRPositionToString (dvbdev_pos_t pos)
 
static dvbdev_pos_t SCRPositionFromString (const QString &pos)
 
- Static Public Member Functions inherited from DiSEqCDevDevice
static QString DevTypeToString (dvbdev_t type)
 
static dvbdev_t DevTypeFromString (const QString &type)
 
static DiSEqCDevDeviceCreateById (DiSEqCDevTree &tree, uint devid)
 
static DiSEqCDevDeviceCreateByType (DiSEqCDevTree &tree, dvbdev_t type, uint dev_id=0)
 

Protected Member Functions

bool SendCommand (uint cmd, uint repeats, uint data_len=0, unsigned char *data=nullptr) const
 
- Protected Member Functions inherited from DiSEqCDevDevice
void SetDeviceID (uint devid) const
 

Private Attributes

uint m_scrUserband {0}
 
uint m_scrFrequency {1400}
 
int m_scrPin {-1}
 
DiSEqCDevDevicem_child {nullptr}
 

Static Private Attributes

static const TypeTable kSCRPositionTable [3]
 

Additional Inherited Members

- Static Protected Member Functions inherited from DiSEqCDevDevice
static QString TableToString (uint type, const TypeTable *table)
 
static uint TableFromString (const QString &type, const TypeTable *table)
 
- Protected Attributes inherited from DiSEqCDevDevice
uint m_devid
 
dvbdev_t m_devType {kTypeLNB}
 
QString m_desc
 
DiSEqCDevTreem_tree
 
DiSEqCDevDevicem_parent {nullptr}
 
uint m_ordinal {0}
 
uint m_repeat {1}
 

Detailed Description

Unicable / SCR Class.

Definition at line 373 of file diseqc.h.

Member Enumeration Documentation

◆ dvbdev_pos_t

Enumerator
kTypeScrPosA 
kTypeScrPosB 

Definition at line 388 of file diseqc.h.

Constructor & Destructor Documentation

◆ DiSEqCDevSCR()

DiSEqCDevSCR::DiSEqCDevSCR ( DiSEqCDevTree tree,
uint  devid 
)
inline

Definition at line 376 of file diseqc.h.

◆ ~DiSEqCDevSCR()

DiSEqCDevSCR::~DiSEqCDevSCR ( )

Definition at line 2129 of file diseqc.cpp.

Member Function Documentation

◆ Reset()

void DiSEqCDevSCR::Reset ( void  )
overridevirtual

Resets to the last known settings for this device.

Device will not actually have commands issued until next Execute() method.

Reimplemented from DiSEqCDevDevice.

Definition at line 2134 of file diseqc.cpp.

Referenced by DiSEqCDevSCR().

◆ Execute()

bool DiSEqCDevSCR::Execute ( const DiSEqCDevSettings settings,
const DTVMultiplex tuning 
)
overridevirtual

Applies DiSEqC settings to this node and any children.

Parameters
settingsConfiguration chain to apply.
tuningTuning parameters.
Returns
True if execution completed successfully.

Implements DiSEqCDevDevice.

Definition at line 2140 of file diseqc.cpp.

◆ PowerOff()

bool DiSEqCDevSCR::PowerOff ( void  ) const

Definition at line 2204 of file diseqc.cpp.

◆ Load()

bool DiSEqCDevSCR::Load ( void  )
overridevirtual

Loads this device from the database.

Returns
True if successful.

Implements DiSEqCDevDevice.

Definition at line 2265 of file diseqc.cpp.

◆ Store()

bool DiSEqCDevSCR::Store ( void  ) const
overridevirtual

Stores this device to the database.

Returns
True if successful.

Implements DiSEqCDevDevice.

Definition at line 2316 of file diseqc.cpp.

◆ SetUserBand()

void DiSEqCDevSCR::SetUserBand ( uint  userband)
inline

Definition at line 393 of file diseqc.h.

Referenced by SCRUserBandSetting::Save().

◆ SetFrequency()

void DiSEqCDevSCR::SetFrequency ( uint  freq)
inline

Definition at line 394 of file diseqc.h.

Referenced by SCRFrequencySetting::Save().

◆ SetPIN()

void DiSEqCDevSCR::SetPIN ( int  pin)
inline

Definition at line 395 of file diseqc.h.

Referenced by SCRPINSetting::Save().

◆ SetChild()

bool DiSEqCDevSCR::SetChild ( uint  ordinal,
DiSEqCDevDevice device 
)
overridevirtual

Changes the nth child of this node.

Parameters
ordinalChild number (starting at 0).
deviceNew child device. (may be nullptr)
Returns
true if object was added to tree.

Reimplemented from DiSEqCDevDevice.

Definition at line 2377 of file diseqc.cpp.

Referenced by Load().

◆ GetUserBand()

uint DiSEqCDevSCR::GetUserBand ( void  ) const
inline

Definition at line 399 of file diseqc.h.

Referenced by SCRUserBandSetting::Load().

◆ GetFrequency()

uint DiSEqCDevSCR::GetFrequency ( void  ) const
inline

Definition at line 400 of file diseqc.h.

Referenced by SCRFrequencySetting::Load().

◆ GetPIN()

int DiSEqCDevSCR::GetPIN ( void  ) const
inline

Definition at line 401 of file diseqc.h.

Referenced by SCRPINSetting::Load().

◆ GetChildCount()

uint DiSEqCDevSCR::GetChildCount ( void  ) const
inlineoverridevirtual

Retrieves the proper number of children for this node.

Returns
Number of children

Reimplemented from DiSEqCDevDevice.

Definition at line 402 of file diseqc.h.

◆ IsCommandNeeded()

bool DiSEqCDevSCR::IsCommandNeeded ( const DiSEqCDevSettings settings,
const DTVMultiplex tuning 
) const
inlineoverridevirtual

Determines if this device or any child will be sending a command for the given configuration chain.

Parameters
settingsConfiguration chain in effect.
tuningTuning parameters.
Returns
true if a command would be sent if Execute() were called.

Reimplemented from DiSEqCDevDevice.

Definition at line 404 of file diseqc.h.

◆ GetVoltage()

uint DiSEqCDevSCR::GetVoltage ( const DiSEqCDevSettings settings,
const DTVMultiplex tuning 
) const
overridevirtual

Retrives the desired voltage for this config.

Parameters
settingsConfiguration chain in effect.
tuningTuning parameters.
Returns
Voltage required.

Implements DiSEqCDevDevice.

Definition at line 2253 of file diseqc.cpp.

◆ GetIntermediateFrequency()

uint32_t DiSEqCDevSCR::GetIntermediateFrequency ( const uint32_t  frequency) const

Definition at line 2259 of file diseqc.cpp.

Referenced by DVBChannel::Tune().

◆ GetSelectedChild()

DiSEqCDevDevice* DiSEqCDevSCR::GetSelectedChild ( const DiSEqCDevSettings settings) const
inlineoverridevirtual

Retrieves the selected child for this configuration, if any.

Parameters
settingsConfiguration chain in effect.
Returns
Child node object, or nullptr if none.

Reimplemented from DiSEqCDevDevice.

Definition at line 412 of file diseqc.h.

◆ GetChild()

DiSEqCDevDevice* DiSEqCDevSCR::GetChild ( uint  ordinal)
inlineoverridevirtual

Retrieves the nth child of this node.

Parameters
ordinalChild number (starting at 0).
Returns
Pointer to device object, or nullptr if no child.

Reimplemented from DiSEqCDevDevice.

Definition at line 414 of file diseqc.h.

◆ SCRPositionToString()

static QString DiSEqCDevSCR::SCRPositionToString ( dvbdev_pos_t  pos)
inlinestatic

Definition at line 418 of file diseqc.h.

Referenced by SCRPositionSetting::SCRPositionSetting().

◆ SCRPositionFromString()

static dvbdev_pos_t DiSEqCDevSCR::SCRPositionFromString ( const QString &  pos)
inlinestatic

Definition at line 421 of file diseqc.h.

◆ SendCommand()

bool DiSEqCDevSCR::SendCommand ( uint  cmd,
uint  repeats,
uint  data_len = 0,
unsigned char *  data = nullptr 
) const
protected

Definition at line 2233 of file diseqc.cpp.

Referenced by Execute(), and PowerOff().

Member Data Documentation

◆ m_scrUserband

uint DiSEqCDevSCR::m_scrUserband {0}
private

Definition at line 429 of file diseqc.h.

Referenced by Execute(), Load(), PowerOff(), and Store().

◆ m_scrFrequency

uint DiSEqCDevSCR::m_scrFrequency {1400}
private

Definition at line 430 of file diseqc.h.

Referenced by Execute(), GetIntermediateFrequency(), Load(), and Store().

◆ m_scrPin

int DiSEqCDevSCR::m_scrPin {-1}
private

Definition at line 431 of file diseqc.h.

Referenced by Execute(), Load(), PowerOff(), and Store().

◆ m_child

DiSEqCDevDevice* DiSEqCDevSCR::m_child {nullptr}
private

Definition at line 433 of file diseqc.h.

Referenced by Load(), Reset(), SetChild(), Store(), and ~DiSEqCDevSCR().

◆ kSCRPositionTable

const DiSEqCDevDevice::TypeTable DiSEqCDevSCR::kSCRPositionTable
staticprivate
Initial value:
=
{
{ "A", kTypeScrPosA },
{ "B", kTypeScrPosB },
{ QString(), kTypeScrPosA },
}

Definition at line 435 of file diseqc.h.


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