|
MythTV master
|
Switch class, including tone, legacy and DiSEqC switches. More...
#include <libmythtv/diseqc.h>
Public Types | |
| enum | dvbdev_switch_t : std::uint8_t { kTypeTone = 0 , kTypeDiSEqCCommitted = 1 , kTypeDiSEqCUncommitted = 2 , kTypeLegacySW21 = 3 , kTypeLegacySW42 = 4 , kTypeLegacySW64 = 5 , kTypeVoltage = 6 , kTypeMiniDiSEqC = 7 } |
Public Types inherited from DiSEqCDevDevice | |
| enum | dvbdev_t : std::uint8_t { kTypeSwitch = 0 , kTypeRotor = 1 , kTypeSCR = 2 , kTypeLNB = 3 } |
Public Member Functions | |
| DiSEqCDevSwitch (DiSEqCDevTree &tree, uint devid) | |
| ~DiSEqCDevSwitch () override | |
| 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 | Load (void) override |
| Loads this device from the database. More... | |
| bool | Store (void) const override |
| Stores this device to the database. More... | |
| void | SetType (dvbdev_switch_t type) |
| void | SetAddress (uint address) |
| void | SetNumPorts (uint num_ports) |
| bool | SetChild (uint ordinal, DiSEqCDevDevice *device) override |
| Changes the nth child of this node. More... | |
| dvbdev_switch_t | GetType (void) const |
| uint | GetAddress (void) const |
| uint | GetNumPorts (void) const |
| bool | ShouldSwitch (const DiSEqCDevSettings &settings, const DTVMultiplex &tuning) const |
| uint | GetChildCount (void) const override |
| Retrieves the proper number of children for this node. More... | |
| bool | IsCommandNeeded (const DiSEqCDevSettings &settings, const DTVMultiplex &tuning) const override |
| Determines if this device or any child will be sending a command for the given configuration chain. More... | |
| uint | GetVoltage (const DiSEqCDevSettings &settings, const DTVMultiplex &tuning) const override |
| Retrives the desired voltage for this config. More... | |
| DiSEqCDevDevice * | GetSelectedChild (const DiSEqCDevSettings &settings) const override |
| Retrieves the selected child for this configuration, if any. More... | |
| DiSEqCDevDevice * | GetChild (uint ordinal) override |
| Retrieves the nth child of this node. More... | |
Public Member Functions inherited from DiSEqCDevDevice | |
| 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 |
| Stores this device to the database. More... | |
| 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) |
| Returns a device by ID. More... | |
| 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 | SwitchTypeToString (dvbdev_switch_t type) |
| static dvbdev_switch_t | SwitchTypeFromString (const QString &type) |
Static Public Member Functions inherited from DiSEqCDevDevice | |
| 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 Member Functions | |
| bool | ExecuteLegacy (const DiSEqCDevSettings &settings, const DTVMultiplex &tuning, uint pos) |
| bool | ExecuteTone (const DiSEqCDevSettings &settings, const DTVMultiplex &tuning, uint pos) |
| bool | ExecuteVoltage (const DiSEqCDevSettings &settings, const DTVMultiplex &tuning, uint pos) |
| bool | ExecuteMiniDiSEqC (const DiSEqCDevSettings &settings, const DTVMultiplex &tuning, uint pos) |
| bool | ExecuteDiseqc (const DiSEqCDevSettings &settings, const DTVMultiplex &tuning, uint pos) |
| int | GetPosition (const DiSEqCDevSettings &settings) const |
Protected Member Functions inherited from DiSEqCDevDevice | |
| void | SetDeviceID (uint devid) const |
Private Attributes | |
| dvbdev_switch_t | m_type {kTypeTone} |
| uint | m_address {0x10} |
| uint | m_numPorts {2} |
| uint | m_lastPos {UINT_MAX} |
| uint | m_lastHighBand {UINT_MAX} |
| uint | m_lastHorizontal {UINT_MAX} |
| dvbdev_vec_t | m_children |
Static Private Attributes | |
| static const TypeTableVec | kSwitchTypeTable |
Additional Inherited Members | |
Protected Types inherited from DiSEqCDevDevice | |
| using | TypeTableVec = std::vector< TypeTable > |
Static Protected Member Functions inherited from DiSEqCDevDevice | |
| static QString | TableToString (uint type, const TypeTableVec &table) |
| static uint | TableFromString (const QString &type, const TypeTableVec &table) |
Protected Attributes inherited from DiSEqCDevDevice | |
| 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} |
| enum DiSEqCDevSwitch::dvbdev_switch_t : std::uint8_t |
| DiSEqCDevSwitch::DiSEqCDevSwitch | ( | DiSEqCDevTree & | tree, |
| uint | devid | ||
| ) |
Definition at line 1063 of file diseqc.cpp.
|
override |
Definition at line 1074 of file diseqc.cpp.
|
overridevirtual |
Applies DiSEqC settings to this node and any children.
| settings | Configuration chain to apply. |
| tuning | Tuning parameters. |
Implements DiSEqCDevDevice.
Definition at line 1080 of file diseqc.cpp.
|
protected |
Definition at line 1593 of file diseqc.cpp.
Referenced by Execute().
|
protected |
Definition at line 1362 of file diseqc.cpp.
Referenced by Execute().
|
protected |
Definition at line 1531 of file diseqc.cpp.
Referenced by Execute().
|
protected |
Definition at line 1495 of file diseqc.cpp.
Referenced by Execute().
|
protected |
Definition at line 1511 of file diseqc.cpp.
Referenced by Execute().
|
inline |
Definition at line 255 of file diseqc.h.
Referenced by SwitchAddressSetting::Load().
|
overridevirtual |
Retrieves the nth child of this node.
| ordinal | Child number (starting at 0). |
Reimplemented from DiSEqCDevDevice.
Definition at line 1175 of file diseqc.cpp.
|
overridevirtual |
Retrieves the proper number of children for this node.
Reimplemented from DiSEqCDevDevice.
Definition at line 1170 of file diseqc.cpp.
|
inline |
Definition at line 256 of file diseqc.h.
Referenced by SwitchPortsSetting::Load().
|
protected |
Definition at line 1640 of file diseqc.cpp.
Referenced by Execute(), GetSelectedChild(), IsCommandNeeded(), and ShouldSwitch().
|
overridevirtual |
Retrieves the selected child for this configuration, if any.
| settings | Configuration chain in effect. |
Reimplemented from DiSEqCDevDevice.
Definition at line 1160 of file diseqc.cpp.
Referenced by GetVoltage().
|
inline |
Definition at line 254 of file diseqc.h.
Referenced by SwitchTypeSetting::Load().
|
overridevirtual |
Retrives the desired voltage for this config.
| settings | Configuration chain in effect. |
| tuning | Tuning parameters. |
Implements DiSEqCDevDevice.
Definition at line 1201 of file diseqc.cpp.
|
overridevirtual |
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 from DiSEqCDevDevice.
Definition at line 1149 of file diseqc.cpp.
Referenced by Execute(), and IsCommandNeeded().
|
overridevirtual |
Loads this device from the database.
Implements DiSEqCDevDevice.
Definition at line 1213 of file diseqc.cpp.
|
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 1137 of file diseqc.cpp.
Referenced by DiSEqCDevSwitch().
|
inline |
Definition at line 249 of file diseqc.h.
Referenced by SwitchAddressSetting::Save().
|
overridevirtual |
Changes the nth child of this node.
| ordinal | Child number (starting at 0). |
| device | New child device. (may be nullptr) |
Reimplemented from DiSEqCDevDevice.
Definition at line 1183 of file diseqc.cpp.
Referenced by Load().
| void DiSEqCDevSwitch::SetNumPorts | ( | uint | num_ports | ) |
Definition at line 1339 of file diseqc.cpp.
Referenced by SwitchPortsSetting::Save().
|
inline |
Definition at line 248 of file diseqc.h.
Referenced by SwitchTypeSetting::Save().
| bool DiSEqCDevSwitch::ShouldSwitch | ( | const DiSEqCDevSettings & | settings, |
| const DTVMultiplex & | tuning | ||
| ) | const |
Definition at line 1548 of file diseqc.cpp.
Referenced by Execute(), and IsCommandNeeded().
|
overridevirtual |
Stores this device to the database.
Implements DiSEqCDevDevice.
Definition at line 1274 of file diseqc.cpp.
|
inlinestatic |
|
inlinestatic |
|
staticprivate |
Definition at line 299 of file diseqc.h.
Referenced by SwitchTypeFromString(), and SwitchTypeToString().
|
private |
Definition at line 292 of file diseqc.h.
Referenced by ExecuteDiseqc(), GetAddress(), Load(), SetAddress(), and Store().
|
private |
Definition at line 297 of file diseqc.h.
Referenced by DiSEqCDevSwitch(), Execute(), GetChild(), GetPosition(), GetSelectedChild(), IsCommandNeeded(), Load(), Reset(), SetChild(), SetNumPorts(), Store(), and ~DiSEqCDevSwitch().
|
private |
Definition at line 295 of file diseqc.h.
Referenced by ExecuteDiseqc(), Reset(), and ShouldSwitch().
|
private |
Definition at line 296 of file diseqc.h.
Referenced by ExecuteDiseqc(), Reset(), and ShouldSwitch().
|
private |
Definition at line 294 of file diseqc.h.
Referenced by Execute(), Reset(), and ShouldSwitch().
|
private |
Definition at line 293 of file diseqc.h.
Referenced by DiSEqCDevSwitch(), ExecuteDiseqc(), GetChildCount(), GetNumPorts(), GetPosition(), Load(), SetNumPorts(), and Store().
|
private |
Definition at line 291 of file diseqc.h.
Referenced by Execute(), ExecuteDiseqc(), ExecuteLegacy(), GetType(), Load(), SetType(), ShouldSwitch(), and Store().