MythTV
master
|
Rotor class. More...
#include <libmythtv/diseqc.h>
Public Types | |
enum | dvbdev_rotor_t : std::uint8_t { kTypeDiSEqC_1_2 = 0, kTypeDiSEqC_1_3 = 1 } |
Public Types inherited from DiSEqCDevDevice | |
enum | dvbdev_t : std::uint8_t { kTypeSwitch = 0, kTypeRotor = 1, kTypeSCR = 2, kTypeLNB = 3 } |
Public Member Functions | |
DiSEqCDevRotor (DiSEqCDevTree &tree, uint devid) | |
~DiSEqCDevRotor () override | |
void | Reset (void) override |
Resets to the last known settings for this device. More... | |
bool | Execute (const DiSEqCDevSettings &settings, const DTVMultiplex &tuning) 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 |
void | SetType (dvbdev_rotor_t type) |
void | SetLoSpeed (double speed) |
void | SetHiSpeed (double speed) |
void | SetPosMap (const uint_to_dbl_t &posmap) |
bool | SetChild (uint ordinal, DiSEqCDevDevice *device) override |
Changes the nth child of this node. More... | |
void | RotationComplete (void) const |
dvbdev_rotor_t | GetType (void) const |
double | GetLoSpeed (void) const |
double | GetHiSpeed (void) const |
uint_to_dbl_t | GetPosMap (void) const |
double | GetProgress (void) const |
Returns an indication of rotor progress. More... | |
bool | IsPositionKnown (void) const |
Returns true if there is reasonable confidence in the value returned by GetProgress(). More... | |
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... | |
bool | IsMoving (const DiSEqCDevSettings &settings) const |
uint | GetVoltage (const DiSEqCDevSettings &settings, const DTVMultiplex &tuning) const override |
Retrives the desired voltage for this config. More... | |
DiSEqCDevDevice * | GetSelectedChild (const DiSEqCDevSettings &setting) const override |
Retrieves the selected child for this configuration, if any. More... | |
DiSEqCDevDevice * | GetChild (uint) override |
Retrieves the nth child of this node. More... | |
Public Member Functions inherited from DiSEqCDevDevice | |
DiSEqCDevDevice (DiSEqCDevTree &tree, uint devid) | |
virtual | ~DiSEqCDevDevice () |
void | SetDeviceType (dvbdev_t type) |
void | SetParent (DiSEqCDevDevice *parent) |
void | SetOrdinal (uint ordinal) |
void | SetDescription (const QString &desc) |
void | SetRepeatCount (uint repeat) |
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 |
DiSEqCDevDevice * | FindDevice (uint dev_id) |
Static Public Member Functions | |
static QString | RotorTypeToString (dvbdev_rotor_t type) |
static dvbdev_rotor_t | RotorTypeFromString (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 | ExecuteRotor (const DiSEqCDevSettings &settings, const DTVMultiplex &tuning, double angle) |
bool | ExecuteUSALS (const DiSEqCDevSettings &settings, const DTVMultiplex &tuning, double angle) |
void | StartRotorPositionTracking (double azimuth) |
double | GetApproxAzimuth (void) const |
Protected Member Functions inherited from DiSEqCDevDevice | |
void | SetDeviceID (uint devid) const |
Static Protected Member Functions | |
static double | CalculateAzimuth (double angle) |
Static Protected Member Functions inherited from DiSEqCDevDevice | |
static QString | TableToString (uint type, const TypeTableVec &table) |
static uint | TableFromString (const QString &type, const TypeTableVec &table) |
Private Attributes | |
dvbdev_rotor_t | m_type {kTypeDiSEqC_1_3} |
double | m_speedHi {2.5} |
double | m_speedLo {1.9} |
dbl_to_uint_t | m_posmap |
DiSEqCDevDevice * | m_child {nullptr} |
double | m_lastPosition {0.0} |
double | m_desiredAzimuth {0.0} |
bool | m_reset {true} |
double | m_moveTime {0.0} |
bool | m_lastPosKnown {false} |
double | m_lastAzimuth {0.0} |
Static Private Attributes | |
static const TypeTableVec | kRotorTypeTable |
Additional Inherited Members | |
Protected Types inherited from DiSEqCDevDevice | |
using | TypeTableVec = std::vector< TypeTable > |
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 DiSEqCDevRotor::dvbdev_rotor_t : std::uint8_t |
|
inline |
|
override |
Definition at line 1683 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 1725 of file diseqc.cpp.
Referenced by DiSEqCDevRotor().
|
overridevirtual |
Applies DiSEqC settings to this node and any children.
settings | Configuration chain to apply. |
tuning | Tuning parameters. |
Implements DiSEqCDevDevice.
Definition at line 1688 of file diseqc.cpp.
|
overridevirtual |
Loads this device from the database.
Implements DiSEqCDevDevice.
Definition at line 1796 of file diseqc.cpp.
|
overridevirtual |
Stores this device to the database.
Implements DiSEqCDevDevice.
Definition at line 1858 of file diseqc.cpp.
|
inline |
Definition at line 317 of file diseqc.h.
Referenced by RotorTypeSetting::Save().
|
inline |
Definition at line 318 of file diseqc.h.
Referenced by RotorLoSpeedSetting::Save().
|
inline |
Definition at line 319 of file diseqc.h.
Referenced by RotorHiSpeedSetting::Save().
void DiSEqCDevRotor::SetPosMap | ( | const uint_to_dbl_t & | posmap | ) |
Definition at line 1984 of file diseqc.cpp.
Referenced by RotorPosMap::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 1751 of file diseqc.cpp.
Referenced by Load().
void DiSEqCDevRotor::RotationComplete | ( | void | ) | const |
Definition at line 2072 of file diseqc.cpp.
Referenced by GetProgress().
|
inline |
Definition at line 325 of file diseqc.h.
Referenced by RotorConfig::Load(), and RotorTypeSetting::Load().
|
inline |
Definition at line 326 of file diseqc.h.
Referenced by RotorLoSpeedSetting::Load().
|
inline |
Definition at line 327 of file diseqc.h.
Referenced by RotorHiSpeedSetting::Load().
uint_to_dbl_t DiSEqCDevRotor::GetPosMap | ( | void | ) | const |
Definition at line 1974 of file diseqc.cpp.
Referenced by RotorPosMap::Load().
double DiSEqCDevRotor::GetProgress | ( | void | ) | const |
Returns an indication of rotor progress.
Definition at line 1939 of file diseqc.cpp.
Referenced by GetApproxAzimuth(), DVBSignalMonitor::GetRotorStatus(), and IsMoving().
bool DiSEqCDevRotor::IsPositionKnown | ( | void | ) | const |
Returns true if there is reasonable confidence in the value returned by GetProgress().
If this returns false, GetProgress() returns progress toward the time when the position will be approximately known.
Definition at line 1969 of file diseqc.cpp.
|
inlineoverridevirtual |
Retrieves the proper number of children for this node.
Reimplemented from DiSEqCDevDevice.
|
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 1732 of file diseqc.cpp.
bool DiSEqCDevRotor::IsMoving | ( | const DiSEqCDevSettings & | settings | ) | const |
Definition at line 1770 of file diseqc.cpp.
Referenced by GetVoltage().
|
overridevirtual |
Retrives the desired voltage for this config.
settings | Configuration chain in effect. |
tuning | Tuning parameters. |
Implements DiSEqCDevDevice.
Definition at line 1779 of file diseqc.cpp.
|
overridevirtual |
Retrieves the selected child for this configuration, if any.
settings | Configuration chain in effect. |
Reimplemented from DiSEqCDevDevice.
Definition at line 1746 of file diseqc.cpp.
|
inlineoverridevirtual |
Retrieves the nth child of this node.
ordinal | Child number (starting at 0). |
Reimplemented from DiSEqCDevDevice.
|
inlinestatic |
|
inlinestatic |
|
protected |
Definition at line 1993 of file diseqc.cpp.
Referenced by Execute().
|
protected |
Definition at line 2014 of file diseqc.cpp.
Referenced by Execute().
|
protected |
Definition at line 2058 of file diseqc.cpp.
Referenced by ExecuteRotor(), and ExecuteUSALS().
|
staticprotected |
Definition at line 2033 of file diseqc.cpp.
Referenced by ExecuteRotor(), and ExecuteUSALS().
|
protected |
Definition at line 2049 of file diseqc.cpp.
Referenced by StartRotorPositionTracking().
|
private |
|
private |
Definition at line 363 of file diseqc.h.
Referenced by GetHiSpeed(), GetProgress(), Load(), SetHiSpeed(), and Store().
|
private |
Definition at line 364 of file diseqc.h.
Referenced by GetLoSpeed(), GetProgress(), Load(), SetLoSpeed(), and Store().
|
private |
Definition at line 365 of file diseqc.h.
Referenced by ExecuteRotor(), GetPosMap(), Load(), SetPosMap(), and Store().
|
private |
Definition at line 366 of file diseqc.h.
Referenced by Execute(), GetChild(), GetSelectedChild(), GetVoltage(), IsCommandNeeded(), Load(), Reset(), SetChild(), Store(), and ~DiSEqCDevRotor().
|
private |
Definition at line 369 of file diseqc.h.
Referenced by Execute(), IsCommandNeeded(), and IsMoving().
|
private |
Definition at line 370 of file diseqc.h.
Referenced by GetApproxAzimuth(), GetProgress(), RotationComplete(), and StartRotorPositionTracking().
Definition at line 371 of file diseqc.h.
Referenced by Execute(), IsCommandNeeded(), and Reset().
|
mutableprivate |
Definition at line 374 of file diseqc.h.
Referenced by GetApproxAzimuth(), GetProgress(), RotationComplete(), and StartRotorPositionTracking().
Definition at line 375 of file diseqc.h.
Referenced by IsMoving(), IsPositionKnown(), RotationComplete(), and StartRotorPositionTracking().
|
mutableprivate |
Definition at line 376 of file diseqc.h.
Referenced by GetApproxAzimuth(), GetProgress(), RotationComplete(), and StartRotorPositionTracking().
|
staticprivate |
Definition at line 379 of file diseqc.h.
Referenced by RotorTypeFromString(), and RotorTypeToString().