MythTV
master
|
Represents a node in a DVB-S device network. More...
#include <diseqc.h>
Classes | |
struct | TypeTable |
Public Types | |
enum | dvbdev_t { kTypeSwitch = 0, kTypeRotor = 1, kTypeSCR = 2, kTypeLNB = 3 } |
Public Member Functions | |
DiSEqCDevDevice (DiSEqCDevTree &tree, uint devid) | |
virtual | ~DiSEqCDevDevice () |
virtual void | Reset (void) |
Resets to the last known settings for this device. More... | |
virtual bool | Execute (const DiSEqCDevSettings &, const DTVMultiplex &)=0 |
Applies DiSEqC settings to this node and any children. More... | |
virtual bool | Load (void)=0 |
Loads this device from the database. More... | |
virtual bool | Store (void) const =0 |
void | SetDeviceType (dvbdev_t type) |
void | SetParent (DiSEqCDevDevice *parent) |
void | SetOrdinal (uint ordinal) |
void | SetDescription (const QString &desc) |
void | SetRepeatCount (uint repeat) |
virtual bool | SetChild (uint, DiSEqCDevDevice *) |
Changes the nth child of this node. More... | |
dvbdev_t | GetDeviceType (void) const |
uint | GetDeviceID (void) const |
bool | IsRealDeviceID (void) const |
DiSEqCDevDevice * | GetParent (void) const |
uint | GetOrdinal (void) const |
QString | GetDescription (void) const |
uint | GetRepeatCount (void) const |
virtual uint | GetChildCount (void) const |
Retrieves the proper number of children for this node. More... | |
virtual bool | IsCommandNeeded (const DiSEqCDevSettings &, const DTVMultiplex &) const |
Determines if this device or any child will be sending a command for the given configuration chain. More... | |
virtual uint | GetVoltage (const DiSEqCDevSettings &, const DTVMultiplex &) const =0 |
Retrives the desired voltage for this config. More... | |
DiSEqCDevDevice * | FindDevice (uint dev_id) |
virtual DiSEqCDevDevice * | GetSelectedChild (const DiSEqCDevSettings &) const |
Retrieves the selected child for this configuration, if any. More... | |
virtual DiSEqCDevDevice * | GetChild (uint) |
Retrieves the nth child of this node. More... | |
Static Public Member Functions | |
static QString | DevTypeToString (dvbdev_t type) |
static dvbdev_t | DevTypeFromString (const QString &type) |
static DiSEqCDevDevice * | CreateById (DiSEqCDevTree &tree, uint devid) |
static DiSEqCDevDevice * | CreateByType (DiSEqCDevTree &tree, dvbdev_t type, uint dev_id=0) |
Protected Types | |
using | TypeTableVec = std::vector< TypeTable > |
Protected Member Functions | |
void | SetDeviceID (uint devid) const |
Static Protected Member Functions | |
static QString | TableToString (uint type, const TypeTableVec &table) |
static uint | TableFromString (const QString &type, const TypeTableVec &table) |
Protected Attributes | |
uint | m_devid |
dvbdev_t | m_devType {kTypeLNB} |
QString | m_desc |
DiSEqCDevTree & | m_tree |
DiSEqCDevDevice * | m_parent {nullptr} |
uint | m_ordinal {0} |
uint | m_repeat {1} |
Static Private Attributes | |
static const TypeTableVec | kDvbdevLookup |
|
protected |
|
inline |
|
virtual |
Definition at line 869 of file diseqc.cpp.
|
inlinevirtual |
Resets to the last known settings for this device.
Device will not actually have commands issued until next Execute() method.
Reimplemented in DiSEqCDevSCR, DiSEqCDevRotor, and DiSEqCDevSwitch.
Definition at line 147 of file diseqc.h.
Referenced by DiSEqCDevLNB::DiSEqCDevLNB(), DiSEqCDevTree::Reset(), DiSEqCDevRotor::Reset(), and DiSEqCDevSCR::Reset().
|
pure virtual |
Applies DiSEqC settings to this node and any children.
settings | Configuration chain to apply. |
tuning | Tuning parameters. |
Implemented in DiSEqCDevLNB, DiSEqCDevSCR, DiSEqCDevRotor, and DiSEqCDevSwitch.
Referenced by DiSEqCDevTree::Execute(), and DiSEqCDevRotor::Execute().
|
pure virtual |
Loads this device from the database.
Implemented in DiSEqCDevLNB, DiSEqCDevSCR, DiSEqCDevRotor, and DiSEqCDevSwitch.
Referenced by CreateById().
|
pure virtual |
Stores this device to the database.
Implemented in DiSEqCDevLNB, DiSEqCDevSCR, DiSEqCDevRotor, and DiSEqCDevSwitch.
Referenced by DiSEqCDevTree::Store(), DiSEqCDevRotor::Store(), and DiSEqCDevSCR::Store().
|
inline |
Definition at line 160 of file diseqc.h.
Referenced by CreateByType().
|
inline |
Definition at line 161 of file diseqc.h.
Referenced by DiSEqCDevSwitch::SetChild(), DiSEqCDevRotor::SetChild(), and DiSEqCDevSCR::SetChild().
|
inline |
Definition at line 162 of file diseqc.h.
Referenced by DiSEqCDevSwitch::SetChild(), DiSEqCDevRotor::SetChild(), and DiSEqCDevSCR::SetChild().
|
inline |
Definition at line 163 of file diseqc.h.
Referenced by CreateById(), CreateByType(), and DeviceDescrSetting::Save().
|
inline |
Definition at line 164 of file diseqc.h.
Referenced by DeviceRepeatSetting::Save().
|
inlinevirtual |
Changes the nth child of this node.
ordinal | Child number (starting at 0). |
device | New child device. (may be nullptr) |
Reimplemented in DiSEqCDevSCR, DiSEqCDevRotor, and DiSEqCDevSwitch.
Definition at line 165 of file diseqc.h.
Referenced by DeviceTree::DeleteDevice(), and DeviceTree::ValueChanged().
|
inline |
Definition at line 169 of file diseqc.h.
Referenced by DTVDeviceConfigGroup::AddNodes(), DiseqcConfigBase::CreateByType(), DiSEqCDevTree::IsInNeedOfConf(), and DeviceTypeSetting::Load().
|
inline |
Definition at line 170 of file diseqc.h.
Referenced by DTVDeviceConfigGroup::AddNodes(), CardUtil::DeleteInput(), DiSEqCDevRotor::Execute(), DiSEqCDevSCR::Execute(), FindDevice(), DiSEqCDevSwitch::GetPosition(), DiSEqCDevRotor::IsCommandNeeded(), DiSEqCDevRotor::IsMoving(), DiSEqCDevSwitch::Load(), DiSEqCDevRotor::Load(), DiSEqCDevSCR::Load(), DiSEqCDevLNB::Load(), SwitchSetting::Load(), RotorSetting::Load(), USALSRotorSetting::Load(), SCRPositionSetting::Load(), SwitchSetting::Save(), RotorSetting::Save(), USALSRotorSetting::Save(), SCRPositionSetting::Save(), DiSEqCDevTree::Store(), DiSEqCDevSwitch::Store(), DiSEqCDevRotor::Store(), DiSEqCDevSCR::Store(), DiSEqCDevLNB::Store(), DVBChannel::Tune(), and ~DiSEqCDevDevice().
|
inline |
Definition at line 171 of file diseqc.h.
Referenced by DiSEqCDevSwitch::Store(), DiSEqCDevRotor::Store(), DiSEqCDevSCR::Store(), DiSEqCDevLNB::Store(), and ~DiSEqCDevDevice().
|
inline |
Definition at line 173 of file diseqc.h.
Referenced by DeviceTree::DeleteDevice().
|
inline |
Definition at line 174 of file diseqc.h.
Referenced by DeviceTree::DeleteDevice().
|
inline |
Definition at line 175 of file diseqc.h.
Referenced by LNBConfig::LNBConfig(), DeviceDescrSetting::Load(), RotorConfig::RotorConfig(), RotorSetting::RotorSetting(), DiSEqCDevSwitch::Store(), DiSEqCDevRotor::Store(), DiSEqCDevSCR::Store(), DiSEqCDevLNB::Store(), and SwitchSetting::SwitchSetting().
|
inline |
Definition at line 176 of file diseqc.h.
Referenced by DeviceRepeatSetting::Load().
|
inlinevirtual |
Retrieves the proper number of children for this node.
Reimplemented in DiSEqCDevSCR, DiSEqCDevRotor, and DiSEqCDevSwitch.
Definition at line 177 of file diseqc.h.
Referenced by DTVDeviceConfigGroup::AddNodes(), FindDevice(), DeviceTree::PopulateChildren(), and SwitchSetting::SwitchSetting().
|
inlinevirtual |
Determines if this device or any child will be sending a command for the given configuration chain.
settings | Configuration chain in effect. |
tuning | Tuning parameters. |
Reimplemented in DiSEqCDevRotor, DiSEqCDevSwitch, and DiSEqCDevSCR.
Definition at line 178 of file diseqc.h.
Referenced by DiSEqCDevTree::Execute(), and DiSEqCDevRotor::IsCommandNeeded().
|
pure virtual |
Retrives the desired voltage for this config.
settings | Configuration chain in effect. |
tuning | Tuning parameters. |
Implemented in DiSEqCDevLNB, DiSEqCDevSCR, DiSEqCDevRotor, and DiSEqCDevSwitch.
Referenced by DiSEqCDevTree::ApplyVoltage(), DiSEqCDevSwitch::GetVoltage(), and DiSEqCDevRotor::GetVoltage().
DiSEqCDevDevice::FindDevice | ( | uint | dev_id | ) |
Returns a device by ID.
dev_id | Device ID to find. |
Definition at line 875 of file diseqc.cpp.
Referenced by DiSEqCDevTree::FindDevice(), and FindDevice().
|
inlinevirtual |
Retrieves the selected child for this configuration, if any.
settings | Configuration chain in effect. |
Reimplemented in DiSEqCDevSwitch, DiSEqCDevRotor, and DiSEqCDevSCR.
Definition at line 186 of file diseqc.h.
Referenced by DiSEqCDevTree::FindLNB(), DiSEqCDevTree::FindRotor(), and DiSEqCDevTree::FindSCR().
|
inlinevirtual |
Retrieves the nth child of this node.
ordinal | Child number (starting at 0). |
Reimplemented in DiSEqCDevSCR, DiSEqCDevRotor, and DiSEqCDevSwitch.
Definition at line 188 of file diseqc.h.
Referenced by DTVDeviceConfigGroup::AddNodes(), FindDevice(), DeviceTree::PopulateChildren(), and SwitchSetting::SwitchSetting().
|
inlinestatic |
|
inlinestatic |
Definition at line 193 of file diseqc.h.
Referenced by CreateById().
|
static |
Definition at line 899 of file diseqc.cpp.
Referenced by DiSEqCDevTree::Load(), DiSEqCDevSwitch::Load(), DiSEqCDevRotor::Load(), and DiSEqCDevSCR::Load().
|
static |
Definition at line 935 of file diseqc.cpp.
Referenced by CreateById(), and DeviceTree::ValueChanged().
|
inlineprotected |
Definition at line 203 of file diseqc.h.
Referenced by DiSEqCDevSwitch::Store(), DiSEqCDevRotor::Store(), DiSEqCDevSCR::Store(), and DiSEqCDevLNB::Store().
|
staticprotected |
Definition at line 97 of file diseqc.cpp.
Referenced by DevTypeToString(), DiSEqCDevLNB::LNBTypeToString(), DiSEqCDevRotor::RotorTypeToString(), DiSEqCDevSCR::SCRPositionToString(), and DiSEqCDevSwitch::SwitchTypeToString().
|
staticprotected |
Definition at line 105 of file diseqc.cpp.
Referenced by DevTypeFromString(), DiSEqCDevLNB::LNBTypeFromString(), DiSEqCDevRotor::RotorTypeFromString(), DiSEqCDevSCR::SCRPositionFromString(), and DiSEqCDevSwitch::SwitchTypeFromString().
|
mutableprotected |
Definition at line 205 of file diseqc.h.
Referenced by GetDeviceID(), IsRealDeviceID(), and SetDeviceID().
Definition at line 206 of file diseqc.h.
Referenced by GetDeviceType(), and SetDeviceType().
|
protected |
Definition at line 207 of file diseqc.h.
Referenced by GetDescription(), and SetDescription().
|
protected |
Definition at line 208 of file diseqc.h.
Referenced by DiSEqCDevSCR::Execute(), DiSEqCDevLNB::Execute(), DiSEqCDevSwitch::ExecuteDiseqc(), DiSEqCDevSwitch::ExecuteLegacy(), DiSEqCDevSwitch::ExecuteMiniDiSEqC(), DiSEqCDevRotor::ExecuteRotor(), DiSEqCDevSwitch::ExecuteTone(), DiSEqCDevRotor::ExecuteUSALS(), DiSEqCDevSwitch::ExecuteVoltage(), DiSEqCDevRotor::GetProgress(), DiSEqCDevSwitch::Load(), DiSEqCDevRotor::Load(), DiSEqCDevSCR::Load(), DiSEqCDevSCR::SendCommand(), DiSEqCDevSwitch::ShouldSwitch(), and ~DiSEqCDevDevice().
|
protected |
Definition at line 209 of file diseqc.h.
Referenced by GetParent(), SetParent(), DiSEqCDevSwitch::Store(), DiSEqCDevRotor::Store(), DiSEqCDevSCR::Store(), and DiSEqCDevLNB::Store().
|
protected |
Definition at line 210 of file diseqc.h.
Referenced by GetOrdinal(), SetOrdinal(), DiSEqCDevSwitch::Store(), DiSEqCDevRotor::Store(), DiSEqCDevSCR::Store(), and DiSEqCDevLNB::Store().
|
protected |
Definition at line 211 of file diseqc.h.
Referenced by DiSEqCDevSCR::Execute(), DiSEqCDevSwitch::ExecuteDiseqc(), DiSEqCDevRotor::ExecuteRotor(), DiSEqCDevRotor::ExecuteUSALS(), GetRepeatCount(), DiSEqCDevSwitch::Load(), DiSEqCDevRotor::Load(), DiSEqCDevSCR::Load(), DiSEqCDevLNB::Load(), DiSEqCDevSCR::PowerOff(), SetRepeatCount(), DiSEqCDevSwitch::Store(), DiSEqCDevRotor::Store(), DiSEqCDevSCR::Store(), and DiSEqCDevLNB::Store().
|
staticprivate |
Definition at line 220 of file diseqc.h.
Referenced by DevTypeFromString(), and DevTypeToString().