#include <diseqc.h>

Definition at line 206 of file diseqc.h.
Public Types | |
| enum | dvbdev_switch_t { kTypeTone = 0, kTypeDiSEqCCommitted = 1, kTypeDiSEqCUncommitted = 2, kTypeLegacySW21 = 3, kTypeLegacySW42 = 4, kTypeLegacySW64 = 5, kTypeVoltage = 6, kTypeMiniDiSEqC = 7 } |
Public Member Functions | |
| DiSEqCDevSwitch (DiSEqCDevTree &tree, uint devid) | |
| ~DiSEqCDevSwitch () | |
| virtual void | Reset (void) |
| Resets to the last known settings for this device. | |
| virtual bool | Execute (const DiSEqCDevSettings &, const DTVMultiplex &) |
| Applies DiSEqC settings to this node and any children. | |
| virtual bool | Load (void) |
| Loads this device from the database. | |
| virtual bool | Store (void) const |
| Stores this device to the database. | |
| void | SetType (dvbdev_switch_t type) |
| void | SetNumPorts (uint num_ports) |
| virtual bool | SetChild (uint, DiSEqCDevDevice *) |
| Changes the nth child of this node. | |
| dvbdev_switch_t | GetType (void) const |
| uint | GetNumPorts (void) const |
| bool | ShouldSwitch (const DiSEqCDevSettings &settings, const DTVMultiplex &tuning) const |
| virtual uint | GetChildCount (void) const |
| Retrieves the proper number of children for this node. | |
| 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. | |
| virtual uint | GetVoltage (const DiSEqCDevSettings &, const DTVMultiplex &) const |
| Retrives the desired voltage for this config. | |
| virtual DiSEqCDevDevice * | GetSelectedChild (const DiSEqCDevSettings &) const |
| Retrieves the selected child for this configuration, if any. | |
| virtual DiSEqCDevDevice * | GetChild (uint) |
| Retrieves the nth child of this node. | |
Static Public Member Functions | |
| static QString | SwitchTypeToString (dvbdev_switch_t type) |
| static dvbdev_switch_t | SwitchTypeFromString (const QString &type) |
Protected Member Functions | |
| bool | ExecuteLegacy (const DiSEqCDevSettings &, const DTVMultiplex &, uint pos) |
| bool | ExecuteTone (const DiSEqCDevSettings &, const DTVMultiplex &, uint pos) |
| bool | ExecuteVoltage (const DiSEqCDevSettings &, const DTVMultiplex &, uint pos) |
| bool | ExecuteMiniDiSEqC (const DiSEqCDevSettings &, const DTVMultiplex &, uint pos) |
| bool | ExecuteDiseqc (const DiSEqCDevSettings &, const DTVMultiplex &, uint pos) |
| int | GetPosition (const DiSEqCDevSettings &) const |
Private Attributes | |
| dvbdev_switch_t | m_type |
| uint | m_num_ports |
| uint | m_last_pos |
| uint | m_last_high_band |
| uint | m_last_horizontal |
| dvbdev_vec_t | m_children |
Static Private Attributes | |
| static const TypeTable | SwitchTypeTable [9] |
| DiSEqCDevSwitch::DiSEqCDevSwitch | ( | DiSEqCDevTree & | tree, | |
| uint | devid | |||
| ) |
Definition at line 957 of file diseqc.cpp.
| DiSEqCDevSwitch::~DiSEqCDevSwitch | ( | ) |
Definition at line 969 of file diseqc.cpp.
| void DiSEqCDevSwitch::Reset | ( | void | ) | [virtual] |
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 1037 of file diseqc.cpp.
Referenced by DiSEqCDevSwitch().
| bool DiSEqCDevSwitch::Execute | ( | const DiSEqCDevSettings & | , | |
| const DTVMultiplex & | ||||
| ) | [virtual] |
Applies DiSEqC settings to this node and any children.
| settings | Configuration chain to apply. | |
| tuning | Tuning parameters. |
Implements DiSEqCDevDevice.
Definition at line 979 of file diseqc.cpp.
| bool DiSEqCDevSwitch::Load | ( | void | ) | [virtual] |
Loads this device from the database.
Implements DiSEqCDevDevice.
Definition at line 1114 of file diseqc.cpp.
| bool DiSEqCDevSwitch::Store | ( | void | ) | const [virtual] |
Stores this device to the database.
Implements DiSEqCDevDevice.
Definition at line 1178 of file diseqc.cpp.
| void DiSEqCDevSwitch::SetType | ( | dvbdev_switch_t | type | ) | [inline] |
Definition at line 230 of file diseqc.h.
Referenced by convert_diseqc_db(), and SwitchTypeSetting::save().
| void DiSEqCDevSwitch::SetNumPorts | ( | uint | num_ports | ) |
Definition at line 1241 of file diseqc.cpp.
Referenced by convert_diseqc_db(), and SwitchPortsSetting::save().
| bool DiSEqCDevSwitch::SetChild | ( | uint | , | |
| DiSEqCDevDevice * | ||||
| ) | [virtual] |
Changes the nth child of this node.
| ordinal | Child number (starting at 0). | |
| device | New child device. (may be NULL) |
Reimplemented from DiSEqCDevDevice.
Definition at line 1084 of file diseqc.cpp.
Referenced by Load().
| dvbdev_switch_t DiSEqCDevSwitch::GetType | ( | void | ) | const [inline] |
| uint DiSEqCDevSwitch::GetNumPorts | ( | void | ) | const [inline] |
| bool DiSEqCDevSwitch::ShouldSwitch | ( | const DiSEqCDevSettings & | settings, | |
| const DTVMultiplex & | tuning | |||
| ) | const |
| uint DiSEqCDevSwitch::GetChildCount | ( | void | ) | const [virtual] |
Retrieves the proper number of children for this node.
Reimplemented from DiSEqCDevDevice.
Definition at line 1071 of file diseqc.cpp.
| bool DiSEqCDevSwitch::IsCommandNeeded | ( | const DiSEqCDevSettings & | settings, | |
| const DTVMultiplex & | tuning | |||
| ) | const [virtual] |
Determines if this device or any child will be sending a command for the given configuration chain.
| settings | Configuration chain in effect. |
Reimplemented from DiSEqCDevDevice.
Definition at line 1050 of file diseqc.cpp.
Referenced by Execute().
| uint DiSEqCDevSwitch::GetVoltage | ( | const DiSEqCDevSettings & | , | |
| const DTVMultiplex & | ||||
| ) | const [virtual] |
Retrives the desired voltage for this config.
| settings | Configuration chain in effect. | |
| tuning | Tuning parameters. |
Implements DiSEqCDevDevice.
Definition at line 1102 of file diseqc.cpp.
| DiSEqCDevDevice * DiSEqCDevSwitch::GetSelectedChild | ( | const DiSEqCDevSettings & | ) | const [virtual] |
Retrieves the selected child for this configuration, if any.
| settings | Configuration chain in effect. |
Reimplemented from DiSEqCDevDevice.
Definition at line 1061 of file diseqc.cpp.
Referenced by GetVoltage().
| DiSEqCDevDevice * DiSEqCDevSwitch::GetChild | ( | uint | ) | [virtual] |
Retrieves the nth child of this node.
| ordinal | Child number (starting at 0). |
Reimplemented from DiSEqCDevDevice.
Definition at line 1076 of file diseqc.cpp.
| static QString DiSEqCDevSwitch::SwitchTypeToString | ( | dvbdev_switch_t | type | ) | [inline, static] |
| static dvbdev_switch_t DiSEqCDevSwitch::SwitchTypeFromString | ( | const QString & | type | ) | [inline, static] |
| bool DiSEqCDevSwitch::ExecuteLegacy | ( | const DiSEqCDevSettings & | settings, | |
| const DTVMultiplex & | tuning, | |||
| uint | pos | |||
| ) | [protected] |
| bool DiSEqCDevSwitch::ExecuteTone | ( | const DiSEqCDevSettings & | , | |
| const DTVMultiplex & | , | |||
| uint | pos | |||
| ) | [protected] |
| bool DiSEqCDevSwitch::ExecuteVoltage | ( | const DiSEqCDevSettings & | settings, | |
| const DTVMultiplex & | tuning, | |||
| uint | pos | |||
| ) | [protected] |
| bool DiSEqCDevSwitch::ExecuteMiniDiSEqC | ( | const DiSEqCDevSettings & | settings, | |
| const DTVMultiplex & | tuning, | |||
| uint | pos | |||
| ) | [protected] |
| bool DiSEqCDevSwitch::ExecuteDiseqc | ( | const DiSEqCDevSettings & | settings, | |
| const DTVMultiplex & | tuning, | |||
| uint | pos | |||
| ) | [protected] |
| int DiSEqCDevSwitch::GetPosition | ( | const DiSEqCDevSettings & | settings | ) | const [protected] |
Definition at line 1559 of file diseqc.cpp.
Referenced by Execute(), GetSelectedChild(), IsCommandNeeded(), and ShouldSwitch().
dvbdev_switch_t DiSEqCDevSwitch::m_type [private] |
Definition at line 271 of file diseqc.h.
Referenced by Execute(), ExecuteDiseqc(), ExecuteLegacy(), GetType(), Load(), SetType(), ShouldSwitch(), and Store().
uint DiSEqCDevSwitch::m_num_ports [private] |
Definition at line 272 of file diseqc.h.
Referenced by DiSEqCDevSwitch(), ExecuteDiseqc(), GetChildCount(), GetNumPorts(), GetPosition(), Load(), SetNumPorts(), and Store().
uint DiSEqCDevSwitch::m_last_pos [private] |
uint DiSEqCDevSwitch::m_last_high_band [private] |
Definition at line 274 of file diseqc.h.
Referenced by ExecuteDiseqc(), Reset(), and ShouldSwitch().
uint DiSEqCDevSwitch::m_last_horizontal [private] |
Definition at line 275 of file diseqc.h.
Referenced by ExecuteDiseqc(), Reset(), and ShouldSwitch().
dvbdev_vec_t DiSEqCDevSwitch::m_children [private] |
Definition at line 276 of file diseqc.h.
Referenced by DiSEqCDevSwitch(), Execute(), GetChild(), GetPosition(), GetSelectedChild(), IsCommandNeeded(), Load(), Reset(), SetChild(), SetNumPorts(), Store(), and ~DiSEqCDevSwitch().
const DiSEqCDevDevice::TypeTable DiSEqCDevSwitch::SwitchTypeTable [static, private] |
Initial value:
{
{ "legacy_sw21", kTypeLegacySW21 },
{ "legacy_sw42", kTypeLegacySW42 },
{ "legacy_sw64", kTypeLegacySW64 },
{ "tone", kTypeTone },
{ "diseqc", kTypeDiSEqCCommitted },
{ "diseqc_uncom", kTypeDiSEqCUncommitted },
{ "voltage", kTypeVoltage },
{ "mini_diseqc", kTypeMiniDiSEqC },
{ QString::null, kTypeTone },
}
Definition at line 278 of file diseqc.h.
Referenced by SwitchTypeFromString(), and SwitchTypeToString().
1.5.5