MythTV
master
|
DVB-S device tree class. Represents a tree of DVB-S devices. More...
#include <libmythtv/diseqc.h>
Public Member Functions | |
DiSEqCDevTree () | |
~DiSEqCDevTree () | |
bool | Load (const QString &device) |
Loads the device tree from the database. More... | |
bool | Load (uint cardid) |
Loads the device tree from the database. More... | |
bool | Store (uint cardid, const QString &device="") |
Stores the device tree to the database. More... | |
bool | Execute (const DiSEqCDevSettings &settings, const DTVMultiplex &tuning) |
Applies settings to the entire tree. More... | |
void | Reset (void) |
Reset state of nodes in tree, forcing updates on the next Execute command. More... | |
DiSEqCDevRotor * | FindRotor (const DiSEqCDevSettings &settings, uint index=0) |
Returns the nth rotor device object in the tree. More... | |
DiSEqCDevLNB * | FindLNB (const DiSEqCDevSettings &settings) |
Returns the LNB device object selected by the configuration chain. More... | |
DiSEqCDevSCR * | FindSCR (const DiSEqCDevSettings &settings) |
Returns the SCR device object selected by the configuration chain. More... | |
DiSEqCDevDevice * | FindDevice (uint dev_id) |
Returns a device by ID. More... | |
DiSEqCDevDevice * | Root (void) |
Retrieves the root node in the tree. More... | |
void | SetRoot (DiSEqCDevDevice *root) |
Changes the root node of the tree. More... | |
bool | SendCommand (uint adr, uint cmd, uint repeats, cmd_vec_t &data) const |
bool | SendCommand (uint adr, uint cmd, uint repeats=0) const |
bool | ResetDiseqc (bool hard_reset, bool is_SCR) |
Resets the DiSEqC bus. More... | |
void | Open (int fd_frontend, bool is_SCR) |
Retrieve device tree. More... | |
void | Close (void) |
int | GetFD (void) const |
bool | SetTone (bool on) const |
bool | SetVoltage (uint voltage) |
uint | GetVoltage (void) const |
bool | IsInNeedOfConf (void) const |
void | AddDeferredDelete (uint dev_id) |
uint | CreateFakeDiSEqCID (void) |
Static Public Member Functions | |
static bool | IsFakeDiSEqCID (uint id) |
static bool | Exists (int cardid) |
Check if a Diseqc device tree exists. More... | |
Protected Member Functions | |
bool | ApplyVoltage (const DiSEqCDevSettings &settings, const DTVMultiplex &tuning) |
Protected Attributes | |
int | m_fdFrontend {-1} |
DiSEqCDevDevice * | m_root {nullptr} |
uint | m_lastVoltage {UINT_MAX} |
uint | m_previousFakeDiseqcid {kFirstFakeDiSEqCID} |
std::vector< uint > | m_delete |
Static Protected Attributes | |
static const uint | kFirstFakeDiSEqCID = 0xf0000000 |
DVB-S device tree class. Represents a tree of DVB-S devices.
DiSEqCDevTree::~DiSEqCDevTree | ( | ) |
Definition at line 301 of file diseqc.cpp.
bool DiSEqCDevTree::Load | ( | const QString & | device | ) |
Loads the device tree from the database.
device | recording input uses. |
Definition at line 311 of file diseqc.cpp.
Referenced by CardUtil::DeleteInput(), DTVDeviceConfigGroup::DTVDeviceConfigGroup(), DiSEqCDevTrees::FindTree(), and DVBConfigurationGroup::reloadDiseqcTree().
Loads the device tree from the database.
cardid | Capture card id. |
Definition at line 343 of file diseqc.cpp.
Stores the device tree to the database.
Definition at line 422 of file diseqc.cpp.
Referenced by CardUtil::DeleteInput(), and DVBConfigurationGroup::Save().
bool DiSEqCDevTree::Execute | ( | const DiSEqCDevSettings & | settings, |
const DTVMultiplex & | tuning | ||
) |
Applies settings to the entire tree.
settings | Configuration chain to apply. |
tuning | Tuning parameters. |
Definition at line 509 of file diseqc.cpp.
Referenced by DVBChannel::Tune().
void DiSEqCDevTree::Reset | ( | void | ) |
Reset state of nodes in tree, forcing updates on the next Execute command.
Definition at line 536 of file diseqc.cpp.
Referenced by DiSEqCDevTree(), and ResetDiseqc().
DiSEqCDevRotor * DiSEqCDevTree::FindRotor | ( | const DiSEqCDevSettings & | settings, |
uint | index = 0 |
||
) |
Returns the nth rotor device object in the tree.
settings | Configuration chain in effect. |
index | 0 for first rotor, 1 for second, etc. |
Definition at line 550 of file diseqc.cpp.
Referenced by DVBChannel::GetRotor().
DiSEqCDevLNB * DiSEqCDevTree::FindLNB | ( | const DiSEqCDevSettings & | settings | ) |
Returns the LNB device object selected by the configuration chain.
settings | Configuration chain in effect. |
Definition at line 573 of file diseqc.cpp.
Referenced by DiSEqCDevSCR::Execute(), DiSEqCDevSwitch::ExecuteDiseqc(), DiSEqCDevSwitch::ExecuteLegacy(), DiSEqCDevSwitch::ShouldSwitch(), and DVBChannel::Tune().
DiSEqCDevSCR * DiSEqCDevTree::FindSCR | ( | const DiSEqCDevSettings & | settings | ) |
Returns the SCR device object selected by the configuration chain.
settings | Configuration chain in effect. |
Definition at line 596 of file diseqc.cpp.
Referenced by DVBChannel::Open(), and DVBChannel::Tune().
DiSEqCDevDevice * DiSEqCDevTree::FindDevice | ( | uint | dev_id | ) |
Returns a device by ID.
dev_id | Device ID to find. |
Definition at line 620 of file diseqc.cpp.
|
inline |
Retrieves the root node in the tree.
Definition at line 93 of file diseqc.h.
Referenced by CardUtil::DeleteInput(), DTVDeviceConfigGroup::DTVDeviceConfigGroup(), and DeviceTree::PopulateTree().
void DiSEqCDevTree::SetRoot | ( | DiSEqCDevDevice * | root | ) |
Changes the root node of the tree.
root | New root node (may be nullptr). |
Definition at line 632 of file diseqc.cpp.
Referenced by DeviceTree::DeleteDevice(), CardUtil::DeleteInput(), and DeviceTree::ValueChanged().
Resets the DiSEqC bus.
hard_reset | If true, the bus will be power cycled. |
is_SCR | Is this an SCR bus? |
Definition at line 741 of file diseqc.cpp.
Referenced by Open().
void DiSEqCDevTree::Open | ( | int | fd_frontend, |
bool | is_SCR | ||
) |
Retrieve device tree.
fd_frontend | DVB frontend device file descriptor. |
is_SCR | Is this an SCR bus? |
Definition at line 790 of file diseqc.cpp.
Referenced by DVBChannel::Open().
|
inline |
Definition at line 108 of file diseqc.h.
Referenced by DVBChannel::Close().
|
inline |
Definition at line 109 of file diseqc.h.
Referenced by DiSEqCDevSwitch::ExecuteLegacy(), DiSEqCDevSwitch::ExecuteMiniDiSEqC(), DiSEqCDevSwitch::ExecuteTone(), and DiSEqCDevSwitch::ExecuteVoltage().
Definition at line 482 of file diseqc.cpp.
Referenced by Execute(), and DiSEqCDevLNB::Execute().
Definition at line 798 of file diseqc.cpp.
Referenced by ApplyVoltage(), ResetDiseqc(), and DiSEqCDevSCR::SendCommand().
|
inline |
Definition at line 116 of file diseqc.h.
Referenced by DiSEqCDevRotor::GetProgress().
bool DiSEqCDevTree::IsInNeedOfConf | ( | void | ) | const |
Definition at line 834 of file diseqc.cpp.
Referenced by CardUtil::IsInNeedOfExternalInputConf().
|
inline |
Definition at line 120 of file diseqc.h.
Referenced by DiSEqCDevDevice::~DiSEqCDevDevice().
|
inline |
Definition at line 121 of file diseqc.h.
Referenced by DiSEqCDevDevice::CreateByType().
Definition at line 123 of file diseqc.h.
Referenced by DiSEqCDevDevice::IsRealDeviceID().
|
static |
Check if a Diseqc device tree exists.
cardid | Capture card id. |
Definition at line 393 of file diseqc.cpp.
Referenced by DVBConfigurationGroup::Load().
|
protected |
Definition at line 842 of file diseqc.cpp.
Referenced by Execute().
|
protected |
|
protected |
Definition at line 131 of file diseqc.h.
Referenced by ApplyVoltage(), Execute(), FindDevice(), FindLNB(), FindRotor(), FindSCR(), IsInNeedOfConf(), Load(), Reset(), Root(), SetRoot(), Store(), and ~DiSEqCDevTree().
|
protected |
Definition at line 132 of file diseqc.h.
Referenced by GetVoltage(), Reset(), and SetVoltage().
|
protected |
Definition at line 133 of file diseqc.h.
Referenced by CreateFakeDiSEqCID().
|
protected |
Definition at line 134 of file diseqc.h.
Referenced by AddDeferredDelete(), Load(), and Store().
|
staticprotected |
Definition at line 136 of file diseqc.h.
Referenced by IsFakeDiSEqCID().