DVB-S device tree class. More...
#include <diseqc.h>
Public Member Functions | |
| DiSEqCDevTree () | |
| ~DiSEqCDevTree () | |
| bool | Load (uint cardid) |
| Loads the device tree from the database. | |
| bool | Store (uint cardid) |
| Stores the device tree to the database. | |
| bool | Execute (const DiSEqCDevSettings &settings, const DTVMultiplex &tuning) |
| Applies settings to the entire tree. | |
| void | Reset (void) |
| Reset state of nodes in tree, forcing updates on the next Execute command. | |
| DiSEqCDevRotor * | FindRotor (const DiSEqCDevSettings &settings, uint index=0) |
| Returns the nth rotor device object in the tree. | |
| DiSEqCDevLNB * | FindLNB (const DiSEqCDevSettings &settings) |
| Returns the LNB device object selected by the configuration chain. | |
| DiSEqCDevDevice * | FindDevice (uint dev_id) |
| Returns a device by ID. | |
| DiSEqCDevDevice * | Root (void) |
| Retrieves the root node in the tree. | |
| void | SetRoot (DiSEqCDevDevice *root) |
| Changes the root node of the tree. | |
| bool | SendCommand (uint adr, uint cmd, uint repeats=0, uint data_len=0, unsigned char *data=NULL) |
| Sends a DiSEqC command. | |
| bool | ResetDiseqc (bool hard_reset) |
| Resets the DiSEqC bus. | |
| void | Open (int fd_frontend) |
| void | Close (void) |
| int | GetFD (void) const |
| bool | SetTone (bool on) |
| 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 id) |
Protected Member Functions | |
| bool | ApplyVoltage (const DiSEqCDevSettings &settings, const DTVMultiplex &tuning) |
Protected Attributes | |
| int | m_fd_frontend |
| DiSEqCDevDevice * | m_root |
| uint | m_last_voltage |
| uint | m_previous_fake_diseqcid |
| vector< uint > | m_delete |
Static Protected Attributes | |
| static const uint | kFirstFakeDiSEqCID = 0xf0000000 |
DVB-S device tree class.
Represents a tree of DVB-S devices.
Definition at line 74 of file diseqc.h.
| DiSEqCDevTree::DiSEqCDevTree | ( | ) |
Definition at line 310 of file diseqc.cpp.
| DiSEqCDevTree::~DiSEqCDevTree | ( | ) |
Definition at line 317 of file diseqc.cpp.
Loads the device tree from the database.
| cardid | Capture card id. |
Definition at line 327 of file diseqc.cpp.
Referenced by CardUtil::DeleteCard(), DTVDeviceConfigGroup::DTVDeviceConfigGroup(), DiSEqCDevTrees::FindTree(), and DVBConfigurationGroup::Load().
Stores the device tree to the database.
| cardid | Capture card id. |
Definition at line 398 of file diseqc.cpp.
Referenced by convert_diseqc_db(), CardUtil::DeleteCard(), 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 484 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 511 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 525 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 548 of file diseqc.cpp.
Referenced by DiSEqCDevSwitch::ExecuteDiseqc(), DiSEqCDevSwitch::ExecuteLegacy(), DiSEqCDevSwitch::ShouldSwitch(), and DVBChannel::Tune().
| DiSEqCDevDevice * DiSEqCDevTree::FindDevice | ( | uint | dev_id | ) |
Returns a device by ID.
| dev_id | Device ID to find. |
Definition at line 572 of file diseqc.cpp.
Referenced by DeviceTree::CreateNewNodeDialog(), DeviceTree::del(), and DeviceTree::EditNodeDialog().
| DiSEqCDevDevice* DiSEqCDevTree::Root | ( | void | ) | [inline] |
Retrieves the root node in the tree.
Definition at line 91 of file diseqc.h.
Referenced by DTVDeviceConfigGroup::AddNodes(), CardUtil::DeleteCard(), DTVDeviceConfigGroup::DTVDeviceConfigGroup(), and DeviceTree::PopulateTree().
| void DiSEqCDevTree::SetRoot | ( | DiSEqCDevDevice * | root | ) |
Changes the root node of the tree.
| root | New root node (may be NULL). |
Definition at line 584 of file diseqc.cpp.
Referenced by convert_diseqc_db(), DeviceTree::CreateRootNodeDialog(), DeviceTree::del(), and CardUtil::DeleteCard().
| bool DiSEqCDevTree::SendCommand | ( | uint | adr, | |
| uint | cmd, | |||
| uint | repeats = 0, |
|||
| uint | data_len = 0, |
|||
| unsigned char * | data = NULL | |||
| ) |
Sends a DiSEqC command.
| adr | DiSEqC destination address. | |
| cmd | DiSEqC command. | |
| repeats | Number of times to repeat command. | |
| data_len | Length of optional data. | |
| data | Pointer to optional data. |
Definition at line 628 of file diseqc.cpp.
Referenced by DiSEqCDevSwitch::ExecuteDiseqc(), DiSEqCDevRotor::ExecuteRotor(), DiSEqCDevRotor::ExecuteUSALS(), and ResetDiseqc().
Resets the DiSEqC bus.
| hard_reset | If true, the bus will be power cycled. |
Definition at line 687 of file diseqc.cpp.
Referenced by Open().
| void DiSEqCDevTree::Open | ( | int | fd_frontend | ) |
Definition at line 720 of file diseqc.cpp.
Referenced by DVBChannel::Open().
| void DiSEqCDevTree::Close | ( | void | ) | [inline] |
Definition at line 101 of file diseqc.h.
Referenced by DVBChannel::Close().
| int DiSEqCDevTree::GetFD | ( | void | ) | const [inline] |
Definition at line 102 of file diseqc.h.
Referenced by DiSEqCDevSwitch::ExecuteLegacy(), DiSEqCDevSwitch::ExecuteMiniDiSEqC(), DiSEqCDevSwitch::ExecuteTone(), DiSEqCDevSwitch::ExecuteVoltage(), and SendCommand().
Definition at line 455 of file diseqc.cpp.
Referenced by DiSEqCDevLNB::Execute(), and Execute().
Definition at line 728 of file diseqc.cpp.
Referenced by ApplyVoltage(), and ResetDiseqc().
| uint DiSEqCDevTree::GetVoltage | ( | void | ) | const [inline] |
Definition at line 109 of file diseqc.h.
Referenced by DiSEqCDevRotor::GetProgress().
| bool DiSEqCDevTree::IsInNeedOfConf | ( | void | ) | const |
Definition at line 762 of file diseqc.cpp.
Referenced by CardUtil::IsInNeedOfExternalInputConf().
| void DiSEqCDevTree::AddDeferredDelete | ( | uint | dev_id | ) | [inline] |
Definition at line 113 of file diseqc.h.
Referenced by DiSEqCDevDevice::~DiSEqCDevDevice().
| uint DiSEqCDevTree::CreateFakeDiSEqCID | ( | void | ) | [inline] |
Definition at line 114 of file diseqc.h.
Referenced by DiSEqCDevDevice::CreateByType().
Definition at line 116 of file diseqc.h.
Referenced by DiSEqCDevDevice::IsRealDeviceID().
| bool DiSEqCDevTree::Exists | ( | int | id | ) | [static] |
Definition at line 370 of file diseqc.cpp.
Referenced by DVBConfigurationGroup::Load().
| bool DiSEqCDevTree::ApplyVoltage | ( | const DiSEqCDevSettings & | settings, | |
| const DTVMultiplex & | tuning | |||
| ) | [protected] |
Definition at line 770 of file diseqc.cpp.
Referenced by Execute().
int DiSEqCDevTree::m_fd_frontend [protected] |
DiSEqCDevDevice* DiSEqCDevTree::m_root [protected] |
Definition at line 124 of file diseqc.h.
Referenced by ApplyVoltage(), Execute(), FindDevice(), FindLNB(), FindRotor(), IsInNeedOfConf(), Load(), Reset(), Root(), SetRoot(), Store(), and ~DiSEqCDevTree().
uint DiSEqCDevTree::m_last_voltage [protected] |
Definition at line 125 of file diseqc.h.
Referenced by GetVoltage(), Reset(), and SetVoltage().
uint DiSEqCDevTree::m_previous_fake_diseqcid [protected] |
Definition at line 126 of file diseqc.h.
Referenced by CreateFakeDiSEqCID().
vector<uint> DiSEqCDevTree::m_delete [protected] |
Definition at line 127 of file diseqc.h.
Referenced by AddDeferredDelete(), Load(), and Store().
const uint DiSEqCDevTree::kFirstFakeDiSEqCID = 0xf0000000 [static, protected] |
Definition at line 129 of file diseqc.h.
Referenced by IsFakeDiSEqCID().
1.6.3