MythTV  master
diseqc.h
Go to the documentation of this file.
1 /* -*- Mode: c++ -*-
2  * \file diseqc.h
3  * \brief DVB-S Device Tree Control Classes.
4  * \author Copyright (C) 2006, Yeasah Pell
5  */
6 
7 #ifndef DISEQC_H
8 #define DISEQC_H
9 
10 // C++ headers
11 #include <cinttypes>
12 #include <climits>
13 #include <vector>
14 
15 // Qt headers
16 #include <QString>
17 #include <QMutex>
18 #include <QMap>
19 
20 class DTVMultiplex;
21 
22 class DiSEqCDevSettings;
23 class DiSEqCDevTrees;
24 class DiSEqCDevTree;
25 class DiSEqCDevDevice;
26 class DiSEqCDevRotor;
27 class DiSEqCDevLNB;
28 class DiSEqCDevSCR;
29 
30 using uint_to_dbl_t = QMap<uint, double>;
31 using dbl_to_uint_t = QMap<double, uint>;
32 using cardid_to_diseqc_tree_t = QMap<uint, DiSEqCDevTree*>;
33 using dvbdev_vec_t = std::vector<DiSEqCDevDevice*>;
34 using cmd_vec_t = std::vector<uint8_t>;
35 
37 {
38  public:
39  DiSEqCDevSettings() = default;
40 
41  bool Load( uint card_input_id);
42  bool Store(uint card_input_id) const;
43  double GetValue(uint devid) const;
44  void SetValue(uint devid, double value);
45 
46  protected:
47  uint_to_dbl_t m_config; //< map of dev tree id to configuration value
49 };
50 
51 class DiSEqCDev
52 {
53  public:
54  static DiSEqCDevTree* FindTree(uint cardid);
55  static void InvalidateTrees(void);
56 
57  protected:
59 };
60 
62 {
63  public:
65 
66  DiSEqCDevTree *FindTree(uint cardid);
67  void InvalidateTrees(void);
68 
69  protected:
71  QMutex m_treesLock;
72 };
73 
75 {
76  public:
79 
80  bool Load(const QString &device);
81  bool Load(uint cardid);
82  bool Store(uint cardid, const QString &device = "");
83  bool Execute(const DiSEqCDevSettings &settings,
84  const DTVMultiplex &tuning);
85  void Reset(void);
86 
87  DiSEqCDevRotor *FindRotor(const DiSEqCDevSettings &settings, uint index = 0);
88  DiSEqCDevLNB *FindLNB(const DiSEqCDevSettings &settings);
89  DiSEqCDevSCR *FindSCR(const DiSEqCDevSettings &settings);
91 
93  DiSEqCDevDevice *Root(void) { return m_root; }
94  void SetRoot(DiSEqCDevDevice *root);
95 
96  bool SendCommand(uint adr, uint cmd, uint repeats,
97  cmd_vec_t &data) const;
98  bool SendCommand(uint adr, uint cmd, uint repeats = 0) const
99  {
100  cmd_vec_t nada;
101  return SendCommand(adr, cmd, repeats, nada);
102  }
103 
104  bool ResetDiseqc(bool hard_reset, bool is_SCR);
105 
106  // frontend fd
107  void Open(int fd_frontend, bool is_SCR);
108  void Close(void) { m_fdFrontend = -1; }
109  int GetFD(void) const { return m_fdFrontend; }
110 
111  // Sets
112  bool SetTone(bool on) const;
113  bool SetVoltage(uint voltage);
114 
115  // Gets
116  uint GetVoltage(void) const { return m_lastVoltage; }
117  bool IsInNeedOfConf(void) const;
118 
119  // tree management
120  void AddDeferredDelete(uint dev_id) { m_delete.push_back(dev_id); }
122 
123  static bool IsFakeDiSEqCID(uint id) { return id >= kFirstFakeDiSEqCID; }
124  static bool Exists(int cardid);
125 
126  protected:
127  bool ApplyVoltage(const DiSEqCDevSettings &settings,
128  const DTVMultiplex &tuning);
129 
130  int m_fdFrontend {-1};
132  uint m_lastVoltage {UINT_MAX};
134  std::vector<uint> m_delete;
135 
136  static const uint kFirstFakeDiSEqCID;
137 };
138 
140 {
141  public:
143  : m_devid(devid), m_tree(tree) {}
144  virtual ~DiSEqCDevDevice();
145 
146  // Commands
147  virtual void Reset(void) {}
148  virtual bool Execute(const DiSEqCDevSettings&, const DTVMultiplex&) = 0;
149  virtual bool Load(void) = 0;
150  virtual bool Store(void) const = 0;
151 
152  // Sets
153  enum dvbdev_t
154  {
157  kTypeSCR = 2,
158  kTypeLNB = 3,
159  };
161  void SetParent(DiSEqCDevDevice* parent) { m_parent = parent; }
162  void SetOrdinal(uint ordinal) { m_ordinal = ordinal; }
163  void SetDescription(const QString &desc) { m_desc = desc; }
164  void SetRepeatCount(uint repeat) { m_repeat = repeat; }
165  virtual bool SetChild(uint /*ordinal*/, DiSEqCDevDevice */*device*/)
166  {return false; }
167 
168  // Gets
169  dvbdev_t GetDeviceType(void) const { return m_devType; }
170  uint GetDeviceID(void) const { return m_devid; }
171  bool IsRealDeviceID(void) const
173  DiSEqCDevDevice *GetParent(void) const { return m_parent; }
174  uint GetOrdinal(void) const { return m_ordinal; }
175  QString GetDescription(void) const { return m_desc; }
176  uint GetRepeatCount(void) const { return m_repeat; }
177  virtual uint GetChildCount(void) const { return 0; }
178  virtual bool IsCommandNeeded(
179  const DiSEqCDevSettings &/*settings*/, const DTVMultiplex &/*tuning*/)
180  const { return false; }
181  virtual uint GetVoltage(
182  const DiSEqCDevSettings &/*settings*/, const DTVMultiplex &/*tuning*/) const = 0;
183 
184  // Non-const Gets
187  const DiSEqCDevSettings &/*settings*/) const { return nullptr; }
188  virtual DiSEqCDevDevice *GetChild(uint /*ordinal*/) { return nullptr; }
189 
190  // Statics
191  static QString DevTypeToString(dvbdev_t type)
192  { return TableToString((uint)type, kDvbdevLookup); }
193  static dvbdev_t DevTypeFromString(const QString &type)
195 
197  uint devid);
199  dvbdev_t type,
200  uint dev_id = 0);
201 
202  protected:
203  void SetDeviceID(uint devid) const { m_devid = devid; }
204 
205  mutable uint m_devid;
207  QString m_desc;
212 
213  struct TypeTable { QString name; uint value; };
214  using TypeTableVec = std::vector<TypeTable>;
215  static QString TableToString(uint type, const TypeTableVec &table);
216  static uint TableFromString(const QString &type,
217  const TypeTableVec &table);
218 
219  private:
221 };
222 
224 {
225  public:
226  DiSEqCDevSwitch(DiSEqCDevTree &tree, uint devid);
227  ~DiSEqCDevSwitch() override;
228 
229  // Commands
230  void Reset(void) override; // DiSEqCDevDevice
231  bool Execute(const DiSEqCDevSettings &/*settings*/,
232  const DTVMultiplex &/*tuning*/) override; // DiSEqCDevDevice
233  bool Load(void) override; // DiSEqCDevDevice
234  bool Store(void) const override; // DiSEqCDevDevice
235 
236  // Sets
238  {
247  };
249  void SetAddress(uint address) { m_address = address; }
250  void SetNumPorts(uint num_ports);
251  bool SetChild(uint ordinal, DiSEqCDevDevice *device) override; // DiSEqCDevDevice
252 
253  // Gets
254  dvbdev_switch_t GetType(void) const { return m_type; }
255  uint GetAddress(void) const { return m_address; }
256  uint GetNumPorts(void) const { return m_numPorts; }
257  bool ShouldSwitch(const DiSEqCDevSettings &settings,
258  const DTVMultiplex &tuning) const;
259  uint GetChildCount(void) const override; // DiSEqCDevDevice
260  bool IsCommandNeeded(const DiSEqCDevSettings &settings,
261  const DTVMultiplex &tuning) const override; // DiSEqCDevDevice
262  uint GetVoltage(const DiSEqCDevSettings &settings,
263  const DTVMultiplex &tuning) const override; // DiSEqCDevDevice
264 
265  // Non-const Gets
266  DiSEqCDevDevice *GetSelectedChild(const DiSEqCDevSettings &settings) const override; // DiSEqCDevDevice
267  DiSEqCDevDevice *GetChild(uint ordinal) override; // DiSEqCDevDevice
268 
269  // Statics
271  { return TableToString((uint)type, kSwitchTypeTable); }
274 
275 
276  protected:
277  bool ExecuteLegacy(
278  const DiSEqCDevSettings &settings, const DTVMultiplex &tuning, uint pos);
279  bool ExecuteTone(
280  const DiSEqCDevSettings &settings, const DTVMultiplex &tuning, uint pos);
281  bool ExecuteVoltage(
282  const DiSEqCDevSettings &settings, const DTVMultiplex &tuning, uint pos);
283  bool ExecuteMiniDiSEqC(
284  const DiSEqCDevSettings &settings, const DTVMultiplex &tuning, uint pos);
285  bool ExecuteDiseqc(
286  const DiSEqCDevSettings &settings, const DTVMultiplex &tuning, uint pos);
287 
288  int GetPosition( const DiSEqCDevSettings &settings) const;
289 
290  private:
292  uint m_address {0x10}; //DISEQC_ADR_SW_ALL
294  uint m_lastPos {UINT_MAX};
295  uint m_lastHighBand {UINT_MAX};
296  uint m_lastHorizontal {UINT_MAX};
298 
300 };
301 
303 {
304  public:
306  : DiSEqCDevDevice(tree, devid) { DiSEqCDevRotor::Reset(); }
307  ~DiSEqCDevRotor() override;
308 
309  // Commands
310  void Reset(void) override; // DiSEqCDevDevice
311  bool Execute(const DiSEqCDevSettings &settings, const DTVMultiplex &tuning) override; // DiSEqCDevDevice
312  bool Load(void) override; // DiSEqCDevDevice
313  bool Store(void) const override; // DiSEqCDevDevice
314 
315  // Sets
318  void SetLoSpeed(double speed) { m_speedLo = speed; }
319  void SetHiSpeed(double speed) { m_speedHi = speed; }
320  void SetPosMap(const uint_to_dbl_t &posmap);
321  bool SetChild(uint ordinal, DiSEqCDevDevice* device) override; // DiSEqCDevDevice
322  void RotationComplete(void) const;
323 
324  // Gets
325  dvbdev_rotor_t GetType(void) const { return m_type; }
326  double GetLoSpeed(void) const { return m_speedLo; }
327  double GetHiSpeed(void) const { return m_speedHi; }
328  uint_to_dbl_t GetPosMap(void) const;
329  double GetProgress(void) const;
330  bool IsPositionKnown(void) const;
331  uint GetChildCount(void) const override // DiSEqCDevDevice
332  { return 1; }
333  bool IsCommandNeeded(const DiSEqCDevSettings &settings,
334  const DTVMultiplex &tuning) const override; // DiSEqCDevDevice
335  bool IsMoving(const DiSEqCDevSettings &settings) const;
336  uint GetVoltage(const DiSEqCDevSettings &settings,
337  const DTVMultiplex &tuning) const override; // DiSEqCDevDevice
338 
339  // Non-const Gets
340  DiSEqCDevDevice *GetSelectedChild(const DiSEqCDevSettings &setting) const override; // DiSEqCDevDevice
341  DiSEqCDevDevice *GetChild(uint /*ordinal*/) override // DiSEqCDevDevice
342  { return m_child; }
343 
344  // Statics
346  { return TableToString((uint)type, kRotorTypeTable); }
347  static dvbdev_rotor_t RotorTypeFromString(const QString &type)
349 
350  protected:
351  bool ExecuteRotor(const DiSEqCDevSettings &settings, const DTVMultiplex &tuning,
352  double angle);
353  bool ExecuteUSALS(const DiSEqCDevSettings &settings, const DTVMultiplex &tuning,
354  double angle);
355  void StartRotorPositionTracking(double azimuth);
356 
357  static double CalculateAzimuth(double angle);
358  double GetApproxAzimuth(void) const;
359 
360  private:
361  // configuration
363  double m_speedHi {2.5};
364  double m_speedLo {1.9};
367 
368  // state
369  double m_lastPosition {0.0};
370  double m_desiredAzimuth {0.0};
371  bool m_reset {true};
372 
373  // rotor position tracking state
374  mutable double m_moveTime {0.0};
375  mutable bool m_lastPosKnown {false};
376  mutable double m_lastAzimuth {0.0};
377 
378  // statics
380 };
381 
383 {
384  public:
386  : DiSEqCDevDevice(tree, devid) { DiSEqCDevSCR::Reset(); }
387  ~DiSEqCDevSCR() override;
388 
389  // Commands
390  void Reset(void) override; // DiSEqCDevDevice
391  bool Execute(const DiSEqCDevSettings &settings, const DTVMultiplex &tuning) override; // DiSEqCDevDevice
392  bool PowerOff(void) const;
393  bool Load(void) override; // DiSEqCDevDevice
394  bool Store(void) const override; // DiSEqCDevDevice
395 
396  // Sets
398  {
401  };
402  void SetUserBand(uint userband) { m_scrUserband = userband; }
404  void SetPIN(int pin) { m_scrPin = pin; }
405  bool SetChild(uint ordinal, DiSEqCDevDevice* device) override; // DiSEqCDevDevice
406 
407  // Gets
408  uint GetUserBand(void) const { return m_scrUserband; }
409  uint GetFrequency(void) const { return m_scrFrequency; }
410  int GetPIN(void) const { return m_scrPin; }
411  uint GetChildCount(void) const override // DiSEqCDevDevice
412  { return 1; }
413  bool IsCommandNeeded(const DiSEqCDevSettings &/*settings*/,
414  const DTVMultiplex &/*tuning*/) const override // DiSEqCDevDevice
415  { return false; }
416  uint GetVoltage(const DiSEqCDevSettings &settings,
417  const DTVMultiplex &tuning) const override; // DiSEqCDevDevice
418  uint32_t GetIntermediateFrequency(uint32_t frequency) const;
419 
420  // Non-const Gets
421  DiSEqCDevDevice *GetSelectedChild(const DiSEqCDevSettings &/*settings*/) const override // DiSEqCDevDevice
422  { return m_child; }
423  DiSEqCDevDevice *GetChild(uint /*ordinal*/) override // DiSEqCDevDevice
424  { return m_child; }
425 
426  // statics
427  static QString SCRPositionToString(dvbdev_pos_t pos)
428  { return TableToString((uint)pos, kSCRPositionTable); }
429 
430  static dvbdev_pos_t SCRPositionFromString(const QString &pos)
432 
433  protected:
434  bool SendCommand(uint cmd, uint repeats, cmd_vec_t &data) const;
435 
436  private:
437  uint m_scrUserband {0}; /* 0-7 */
439  int m_scrPin {-1}; /* 0-255, -1=disabled */
440 
442 
444 };
445 
447 {
448  public:
450  : DiSEqCDevDevice(tree, devid) { DiSEqCDevLNB::Reset(); }
451 
452  // Commands
453  bool Execute(const DiSEqCDevSettings &settings, const DTVMultiplex &tuning) override; // DiSEqCDevDevice
454  bool Load(void) override; // DiSEqCDevDevice
455  bool Store(void) const override; // DiSEqCDevDevice
456 
457  // Sets
459  {
464  };
466  void SetLOFSwitch(uint lof_switch) { m_lofSwitch = lof_switch; }
467  void SetLOFHigh( uint lof_hi) { m_lofHi = lof_hi; }
468  void SetLOFLow( uint lof_lo) { m_lofLo = lof_lo; }
469  void SetPolarityInverted(bool inv) { m_polInv = inv; }
470 
471  // Gets
472  dvbdev_lnb_t GetType(void) const { return m_type; }
473  uint GetLOFSwitch(void) const { return m_lofSwitch; }
474  uint GetLOFHigh(void) const { return m_lofHi; }
475  uint GetLOFLow(void) const { return m_lofLo; }
476  bool IsPolarityInverted(void) const { return m_polInv; }
477  bool IsHighBand(const DTVMultiplex &tuning) const;
478  bool IsHorizontal(const DTVMultiplex &tuning) const;
479  uint32_t GetIntermediateFrequency(const DiSEqCDevSettings& settings,
480  const DTVMultiplex &tuning) const;
481  uint GetVoltage(const DiSEqCDevSettings &settings,
482  const DTVMultiplex &tuning) const override; // DiSEqCDevDevice
483 
484  // statics
486  { return TableToString((uint)type, kLNBTypeTable); }
487 
488  static dvbdev_lnb_t LNBTypeFromString(const QString &type)
490 
491  private:
493  uint m_lofSwitch {11700000};
494  uint m_lofHi {10600000};
495  uint m_lofLo { 9750000};
499  bool m_polInv {false};
500 
502 };
503 
504 #endif // DISEQC_H
DiSEqCDevSwitch::SwitchTypeToString
static QString SwitchTypeToString(dvbdev_switch_t type)
Definition: diseqc.h:270
DiSEqCDevDevice::m_ordinal
uint m_ordinal
Definition: diseqc.h:210
dvbdev_vec_t
std::vector< DiSEqCDevDevice * > dvbdev_vec_t
Definition: diseqc.h:33
DiSEqCDevRotor::IsCommandNeeded
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.
Definition: diseqc.cpp:1727
DiSEqCDevTree::~DiSEqCDevTree
~DiSEqCDevTree()
Definition: diseqc.cpp:301
DiSEqCDevRotor::kTypeDiSEqC_1_2
@ kTypeDiSEqC_1_2
Definition: diseqc.h:316
DTVMultiplex
Definition: dtvmultiplex.h:24
DiSEqCDevDevice::TypeTable::name
QString name
Definition: diseqc.h:213
DiSEqCDevDevice::GetChildCount
virtual uint GetChildCount(void) const
Retrieves the proper number of children for this node.
Definition: diseqc.h:177
DiSEqCDevSCR::SCRPositionFromString
static dvbdev_pos_t SCRPositionFromString(const QString &pos)
Definition: diseqc.h:430
DiSEqCDev
Main DVB-S device interface.
Definition: diseqc.h:51
DiSEqCDevLNB::Store
bool Store(void) const override
Definition: diseqc.cpp:2416
DiSEqCDevTree::IsInNeedOfConf
bool IsInNeedOfConf(void) const
Definition: diseqc.cpp:831
DiSEqCDevSwitch::SwitchTypeFromString
static dvbdev_switch_t SwitchTypeFromString(const QString &type)
Definition: diseqc.h:272
DiSEqCDevTree::DiSEqCDevTree
DiSEqCDevTree()
Definition: diseqc.h:77
DiSEqCDevDevice::FindDevice
DiSEqCDevDevice * FindDevice(uint dev_id)
Definition: diseqc.cpp:872
DiSEqCDevDevice::kTypeRotor
@ kTypeRotor
Definition: diseqc.h:156
DiSEqCDevLNB::GetLOFLow
uint GetLOFLow(void) const
Definition: diseqc.h:475
DiSEqCDevSCR::GetIntermediateFrequency
uint32_t GetIntermediateFrequency(uint32_t frequency) const
Definition: diseqc.cpp:2211
DiSEqCDevSwitch::kSwitchTypeTable
static const TypeTableVec kSwitchTypeTable
Definition: diseqc.h:299
DiSEqCDevSettings::GetValue
double GetValue(uint devid) const
Retrieves a value from this configuration chain by device id.
Definition: diseqc.cpp:204
DiSEqCDevRotor::~DiSEqCDevRotor
~DiSEqCDevRotor() override
Definition: diseqc.cpp:1678
DiSEqCDevLNB::LNBTypeFromString
static dvbdev_lnb_t LNBTypeFromString(const QString &type)
Definition: diseqc.h:488
DiSEqCDevRotor
Rotor class.
Definition: diseqc.h:302
DiSEqCDevLNB::SetLOFHigh
void SetLOFHigh(uint lof_hi)
Definition: diseqc.h:467
DiSEqCDevRotor::GetType
dvbdev_rotor_t GetType(void) const
Definition: diseqc.h:325
DiSEqCDevRotor::kTypeDiSEqC_1_3
@ kTypeDiSEqC_1_3
Definition: diseqc.h:316
DiSEqCDevDevice::SetDeviceID
void SetDeviceID(uint devid) const
Definition: diseqc.h:203
DiSEqCDevSCR::GetVoltage
uint GetVoltage(const DiSEqCDevSettings &settings, const DTVMultiplex &tuning) const override
Retrives the desired voltage for this config.
Definition: diseqc.cpp:2205
DiSEqCDevTree::m_delete
std::vector< uint > m_delete
Definition: diseqc.h:134
DiSEqCDevSwitch::SetChild
bool SetChild(uint ordinal, DiSEqCDevDevice *device) override
Changes the nth child of this node.
Definition: diseqc.cpp:1180
DiSEqCDevTree::m_fdFrontend
int m_fdFrontend
Definition: diseqc.h:130
DiSEqCDevLNB::kLNBTypeTable
static const TypeTableVec kLNBTypeTable
Definition: diseqc.h:501
DiSEqCDevDevice::m_tree
DiSEqCDevTree & m_tree
Definition: diseqc.h:208
DiSEqCDevTree::SendCommand
bool SendCommand(uint adr, uint cmd, uint repeats, cmd_vec_t &data) const
DiSEqCDevSCR::SetUserBand
void SetUserBand(uint userband)
Definition: diseqc.h:402
DiSEqCDevLNB::GetType
dvbdev_lnb_t GetType(void) const
Definition: diseqc.h:472
DiSEqCDevSettings::SetValue
void SetValue(uint devid, double value)
Sets a value for this configuration chain by device id.
Definition: diseqc.cpp:219
freq
static const std::array< const uint32_t, 4 > freq
Definition: element.cpp:45
DiSEqCDevDevice::GetDescription
QString GetDescription(void) const
Definition: diseqc.h:175
DiSEqCDevSettings::m_config
uint_to_dbl_t m_config
Definition: diseqc.h:47
DiSEqCDevSCR::SendCommand
bool SendCommand(uint cmd, uint repeats, cmd_vec_t &data) const
Definition: diseqc.cpp:2186
DiSEqCDevTree::Execute
bool Execute(const DiSEqCDevSettings &settings, const DTVMultiplex &tuning)
Applies settings to the entire tree.
Definition: diseqc.cpp:509
DiSEqCDevDevice::kTypeSCR
@ kTypeSCR
Definition: diseqc.h:157
DiSEqCDevLNB::SetLOFSwitch
void SetLOFSwitch(uint lof_switch)
Definition: diseqc.h:466
DiSEqCDevRotor::m_moveTime
double m_moveTime
Definition: diseqc.h:374
DiSEqCDevSCR::kTypeScrPosB
@ kTypeScrPosB
Definition: diseqc.h:400
DiSEqCDevRotor::RotorTypeToString
static QString RotorTypeToString(dvbdev_rotor_t type)
Definition: diseqc.h:345
DiSEqCDevSwitch::GetChild
DiSEqCDevDevice * GetChild(uint ordinal) override
Retrieves the nth child of this node.
Definition: diseqc.cpp:1172
DiSEqCDevLNB::DiSEqCDevLNB
DiSEqCDevLNB(DiSEqCDevTree &tree, uint devid)
Definition: diseqc.h:449
DiSEqCDevRotor::SetPosMap
void SetPosMap(const uint_to_dbl_t &posmap)
Definition: diseqc.cpp:1979
DiSEqCDevSwitch::m_numPorts
uint m_numPorts
Definition: diseqc.h:293
DiSEqCDevTree::SetTone
bool SetTone(bool on) const
Definition: diseqc.cpp:482
DiSEqCDevSwitch::Execute
bool Execute(const DiSEqCDevSettings &, const DTVMultiplex &) override
Applies DiSEqC settings to this node and any children.
Definition: diseqc.cpp:1077
DiSEqCDevRotor::m_child
DiSEqCDevDevice * m_child
Definition: diseqc.h:366
DiSEqCDevTrees
Static-scoped locked tree list class.
Definition: diseqc.h:61
DiSEqCDevRotor::kRotorTypeTable
static const TypeTableVec kRotorTypeTable
Definition: diseqc.h:379
DiSEqCDevSCR::IsCommandNeeded
bool IsCommandNeeded(const DiSEqCDevSettings &, const DTVMultiplex &) const override
Determines if this device or any child will be sending a command for the given configuration chain.
Definition: diseqc.h:413
DiSEqCDevSwitch::m_lastPos
uint m_lastPos
Definition: diseqc.h:294
DiSEqCDevLNB::kTypeBandstacked
@ kTypeBandstacked
Definition: diseqc.h:463
DiSEqCDevDevice
Represents a node in a DVB-S device network.
Definition: diseqc.h:139
DiSEqCDevDevice::GetVoltage
virtual uint GetVoltage(const DiSEqCDevSettings &, const DTVMultiplex &) const =0
Retrives the desired voltage for this config.
DiSEqCDevSCR::m_scrUserband
uint m_scrUserband
Definition: diseqc.h:437
DiSEqCDevSwitch::m_type
dvbdev_switch_t m_type
Definition: diseqc.h:291
DiSEqCDevDevice::SetChild
virtual bool SetChild(uint, DiSEqCDevDevice *)
Changes the nth child of this node.
Definition: diseqc.h:165
DiSEqCDevSettings::Load
bool Load(uint card_input_id)
Loads configuration chain from DB for specified card input id.
Definition: diseqc.cpp:128
DiSEqCDevSwitch::Reset
void Reset(void) override
Resets to the last known settings for this device.
Definition: diseqc.cpp:1134
DiSEqCDevSwitch::Store
bool Store(void) const override
Definition: diseqc.cpp:1271
DiSEqCDevSwitch::GetPosition
int GetPosition(const DiSEqCDevSettings &settings) const
Definition: diseqc.cpp:1635
DiSEqCDevTrees::m_treesLock
QMutex m_treesLock
Definition: diseqc.h:71
DiSEqCDevRotor::m_speedLo
double m_speedLo
Definition: diseqc.h:364
DiSEqCDevSCR::SetFrequency
void SetFrequency(uint freq)
Definition: diseqc.h:403
DiSEqCDevSwitch::kTypeDiSEqCUncommitted
@ kTypeDiSEqCUncommitted
Definition: diseqc.h:241
DiSEqCDevDevice::DevTypeToString
static QString DevTypeToString(dvbdev_t type)
Definition: diseqc.h:191
DiSEqCDevSCR::DiSEqCDevSCR
DiSEqCDevSCR(DiSEqCDevTree &tree, uint devid)
Definition: diseqc.h:385
DiSEqCDevTree::Exists
static bool Exists(int cardid)
Check if a Diseqc device tree exists.
Definition: diseqc.cpp:393
DiSEqCDevRotor::SetChild
bool SetChild(uint ordinal, DiSEqCDevDevice *device) override
Changes the nth child of this node.
Definition: diseqc.cpp:1746
DiSEqCDevTree::Open
void Open(int fd_frontend, bool is_SCR)
Retrieve device tree.
Definition: diseqc.cpp:790
DiSEqCDevDevice::kTypeSwitch
@ kTypeSwitch
Definition: diseqc.h:155
DiSEqCDevSettings::m_inputId
uint m_inputId
current input id
Definition: diseqc.h:48
DiSEqCDevDevice::GetParent
DiSEqCDevDevice * GetParent(void) const
Definition: diseqc.h:173
DiSEqCDevDevice::Reset
virtual void Reset(void)
Resets to the last known settings for this device.
Definition: diseqc.h:147
DiSEqCDevSwitch::ExecuteTone
bool ExecuteTone(const DiSEqCDevSettings &settings, const DTVMultiplex &tuning, uint pos)
Definition: diseqc.cpp:1492
DiSEqCDevSCR::GetPIN
int GetPIN(void) const
Definition: diseqc.h:410
DiSEqCDevTrees::~DiSEqCDevTrees
~DiSEqCDevTrees()
Definition: diseqc.cpp:256
DiSEqCDevLNB::m_lofHi
uint m_lofHi
Definition: diseqc.h:494
DiSEqCDevRotor::ExecuteRotor
bool ExecuteRotor(const DiSEqCDevSettings &settings, const DTVMultiplex &tuning, double angle)
Definition: diseqc.cpp:1988
DiSEqCDevSettings
DVB-S device settings class.
Definition: diseqc.h:36
DiSEqCDevRotor::m_lastPosition
double m_lastPosition
Definition: diseqc.h:369
DiSEqCDevLNB::m_lofLo
uint m_lofLo
Definition: diseqc.h:495
DiSEqCDevTree::kFirstFakeDiSEqCID
static const uint kFirstFakeDiSEqCID
Definition: diseqc.h:136
DiSEqCDevDevice::GetDeviceType
dvbdev_t GetDeviceType(void) const
Definition: diseqc.h:169
DiSEqCDevRotor::SetHiSpeed
void SetHiSpeed(double speed)
Definition: diseqc.h:319
DiSEqCDevRotor::GetProgress
double GetProgress(void) const
Returns an indication of rotor progress.
Definition: diseqc.cpp:1934
cmd_vec_t
std::vector< uint8_t > cmd_vec_t
Definition: diseqc.h:34
DiSEqCDevDevice::GetRepeatCount
uint GetRepeatCount(void) const
Definition: diseqc.h:176
DiSEqCDevSCR::GetFrequency
uint GetFrequency(void) const
Definition: diseqc.h:409
DiSEqCDevRotor::CalculateAzimuth
static double CalculateAzimuth(double angle)
Definition: diseqc.cpp:2028
DiSEqCDevSwitch::GetChildCount
uint GetChildCount(void) const override
Retrieves the proper number of children for this node.
Definition: diseqc.cpp:1167
DiSEqCDevLNB::SetType
void SetType(dvbdev_lnb_t type)
Definition: diseqc.h:465
DiSEqCDevDevice::TableToString
static QString TableToString(uint type, const TypeTableVec &table)
Definition: diseqc.cpp:97
DiSEqCDevLNB::m_lofSwitch
uint m_lofSwitch
Definition: diseqc.h:493
DiSEqCDevLNB::IsPolarityInverted
bool IsPolarityInverted(void) const
Definition: diseqc.h:476
DiSEqCDevRotor::Store
bool Store(void) const override
Definition: diseqc.cpp:1853
DiSEqCDevSCR::kSCRPositionTable
static const TypeTableVec kSCRPositionTable
Definition: diseqc.h:443
DiSEqCDevTree::m_previousFakeDiseqcid
uint m_previousFakeDiseqcid
Definition: diseqc.h:133
DiSEqCDevTree::ApplyVoltage
bool ApplyVoltage(const DiSEqCDevSettings &settings, const DTVMultiplex &tuning)
Definition: diseqc.cpp:839
DiSEqCDevSwitch::GetAddress
uint GetAddress(void) const
Definition: diseqc.h:255
DiSEqCDevLNB::m_polInv
bool m_polInv
If a signal is circularly polarized the polarity will flip on each reflection, so antenna systems wit...
Definition: diseqc.h:499
DiSEqCDevSwitch::ExecuteMiniDiSEqC
bool ExecuteMiniDiSEqC(const DiSEqCDevSettings &settings, const DTVMultiplex &tuning, uint pos)
Definition: diseqc.cpp:1528
DiSEqCDevSCR::Store
bool Store(void) const override
Definition: diseqc.cpp:2268
DiSEqCDevLNB::kTypeFixed
@ kTypeFixed
Definition: diseqc.h:460
DiSEqCDevDevice::TableFromString
static uint TableFromString(const QString &type, const TypeTableVec &table)
Definition: diseqc.cpp:105
DiSEqCDevTree::SetVoltage
bool SetVoltage(uint voltage)
Definition: diseqc.cpp:798
DiSEqCDevDevice::SetDeviceType
void SetDeviceType(dvbdev_t type)
Definition: diseqc.h:160
DiSEqCDevRotor::Load
bool Load(void) override
Loads this device from the database.
Definition: diseqc.cpp:1791
DiSEqCDevTree::IsFakeDiSEqCID
static bool IsFakeDiSEqCID(uint id)
Definition: diseqc.h:123
DiSEqCDevLNB::dvbdev_lnb_t
dvbdev_lnb_t
Definition: diseqc.h:458
DiSEqCDevDevice::TypeTableVec
std::vector< TypeTable > TypeTableVec
Definition: diseqc.h:214
DiSEqCDevSCR::~DiSEqCDevSCR
~DiSEqCDevSCR() override
Definition: diseqc.cpp:2087
DiSEqCDevDevice::Load
virtual bool Load(void)=0
Loads this device from the database.
DiSEqCDevRotor::m_posmap
dbl_to_uint_t m_posmap
Definition: diseqc.h:365
DiSEqCDevRotor::IsPositionKnown
bool IsPositionKnown(void) const
Returns true if there is reasonable confidence in the value returned by GetProgress().
Definition: diseqc.cpp:1964
DiSEqCDevTree::CreateFakeDiSEqCID
uint CreateFakeDiSEqCID(void)
Definition: diseqc.h:121
DiSEqCDevRotor::DiSEqCDevRotor
DiSEqCDevRotor(DiSEqCDevTree &tree, uint devid)
Definition: diseqc.h:305
uint_to_dbl_t
QMap< uint, double > uint_to_dbl_t
Definition: diseqc.h:30
DiSEqCDevSwitch::m_lastHorizontal
uint m_lastHorizontal
Definition: diseqc.h:296
DiSEqCDevDevice::SetOrdinal
void SetOrdinal(uint ordinal)
Definition: diseqc.h:162
DiSEqCDevSCR
Unicable / SCR Class.
Definition: diseqc.h:382
DiSEqCDevDevice::dvbdev_t
dvbdev_t
Definition: diseqc.h:153
DiSEqCDevRotor::m_type
dvbdev_rotor_t m_type
Definition: diseqc.h:362
DiSEqCDevSCR::Execute
bool Execute(const DiSEqCDevSettings &settings, const DTVMultiplex &tuning) override
Applies DiSEqC settings to this node and any children.
Definition: diseqc.cpp:2098
DiSEqCDevDevice::m_repeat
uint m_repeat
Definition: diseqc.h:211
DiSEqCDevRotor::RotorTypeFromString
static dvbdev_rotor_t RotorTypeFromString(const QString &type)
Definition: diseqc.h:347
DiSEqCDevRotor::RotationComplete
void RotationComplete(void) const
Definition: diseqc.cpp:2067
DiSEqCDevTree::Load
bool Load(const QString &device)
Loads the device tree from the database.
Definition: diseqc.cpp:311
DiSEqCDevDevice::SetParent
void SetParent(DiSEqCDevDevice *parent)
Definition: diseqc.h:161
DiSEqCDevSwitch::ExecuteLegacy
bool ExecuteLegacy(const DiSEqCDevSettings &settings, const DTVMultiplex &tuning, uint pos)
Definition: diseqc.cpp:1359
DiSEqCDevTree::SetRoot
void SetRoot(DiSEqCDevDevice *root)
Changes the root node of the tree.
Definition: diseqc.cpp:632
DiSEqCDevLNB
LNB Class.
Definition: diseqc.h:446
DiSEqCDevRotor::GetSelectedChild
DiSEqCDevDevice * GetSelectedChild(const DiSEqCDevSettings &setting) const override
Retrieves the selected child for this configuration, if any.
Definition: diseqc.cpp:1741
DiSEqCDevDevice::GetChild
virtual DiSEqCDevDevice * GetChild(uint)
Retrieves the nth child of this node.
Definition: diseqc.h:188
DiSEqCDevLNB::Load
bool Load(void) override
Loads this device from the database.
Definition: diseqc.cpp:2386
DiSEqCDevSwitch::IsCommandNeeded
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.
Definition: diseqc.cpp:1146
DiSEqCDevLNB::SetPolarityInverted
void SetPolarityInverted(bool inv)
Definition: diseqc.h:469
DiSEqCDevSwitch::GetSelectedChild
DiSEqCDevDevice * GetSelectedChild(const DiSEqCDevSettings &settings) const override
Retrieves the selected child for this configuration, if any.
Definition: diseqc.cpp:1157
DiSEqCDevLNB::IsHorizontal
bool IsHorizontal(const DTVMultiplex &tuning) const
Determine if horizontal polarity is active (for switchable LNBs).
Definition: diseqc.cpp:2506
DiSEqCDevSwitch::dvbdev_switch_t
dvbdev_switch_t
Definition: diseqc.h:237
DiSEqCDevTree::GetFD
int GetFD(void) const
Definition: diseqc.h:109
DiSEqCDevRotor::Execute
bool Execute(const DiSEqCDevSettings &settings, const DTVMultiplex &tuning) override
Applies DiSEqC settings to this node and any children.
Definition: diseqc.cpp:1683
DiSEqCDevRotor::m_lastPosKnown
bool m_lastPosKnown
Definition: diseqc.h:375
DiSEqCDevDevice::m_parent
DiSEqCDevDevice * m_parent
Definition: diseqc.h:209
DiSEqCDevSCR::m_scrFrequency
uint m_scrFrequency
Definition: diseqc.h:438
uint
unsigned int uint
Definition: compat.h:81
DiSEqCDevRotor::GetPosMap
uint_to_dbl_t GetPosMap(void) const
Definition: diseqc.cpp:1969
DiSEqCDevSCR::GetUserBand
uint GetUserBand(void) const
Definition: diseqc.h:408
DiSEqCDevSwitch::ExecuteVoltage
bool ExecuteVoltage(const DiSEqCDevSettings &settings, const DTVMultiplex &tuning, uint pos)
Definition: diseqc.cpp:1508
DiSEqCDevLNB::Execute
bool Execute(const DiSEqCDevSettings &settings, const DTVMultiplex &tuning) override
Applies DiSEqC settings to this node and any children.
Definition: diseqc.cpp:2363
DiSEqCDevRotor::GetChildCount
uint GetChildCount(void) const override
Retrieves the proper number of children for this node.
Definition: diseqc.h:331
DiSEqCDev::FindTree
static DiSEqCDevTree * FindTree(uint cardid)
Retrieve device tree.
Definition: diseqc.cpp:237
DiSEqCDevTree::Root
DiSEqCDevDevice * Root(void)
Retrieves the root node in the tree.
Definition: diseqc.h:93
DiSEqCDevDevice::m_devid
uint m_devid
Definition: diseqc.h:205
DiSEqCDevDevice::GetOrdinal
uint GetOrdinal(void) const
Definition: diseqc.h:174
DiSEqCDev::s_trees
static DiSEqCDevTrees s_trees
Definition: diseqc.h:58
DiSEqCDevDevice::TypeTable
Definition: diseqc.h:213
DiSEqCDevDevice::IsCommandNeeded
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.
Definition: diseqc.h:178
DiSEqCDevDevice::CreateByType
static DiSEqCDevDevice * CreateByType(DiSEqCDevTree &tree, dvbdev_t type, uint dev_id=0)
Definition: diseqc.cpp:932
DiSEqCDevSCR::SetChild
bool SetChild(uint ordinal, DiSEqCDevDevice *device) override
Changes the nth child of this node.
Definition: diseqc.cpp:2329
DiSEqCDevTree::FindDevice
DiSEqCDevDevice * FindDevice(uint dev_id)
Returns a device by ID.
Definition: diseqc.cpp:620
DiSEqCDevLNB::GetLOFSwitch
uint GetLOFSwitch(void) const
Definition: diseqc.h:473
DiSEqCDevLNB::GetLOFHigh
uint GetLOFHigh(void) const
Definition: diseqc.h:474
cardid_to_diseqc_tree_t
QMap< uint, DiSEqCDevTree * > cardid_to_diseqc_tree_t
Definition: diseqc.h:32
DiSEqCDevSCR::PowerOff
bool PowerOff(void) const
Definition: diseqc.cpp:2160
DiSEqCDevTree::m_lastVoltage
uint m_lastVoltage
Definition: diseqc.h:132
DiSEqCDevDevice::SetRepeatCount
void SetRepeatCount(uint repeat)
Definition: diseqc.h:164
DiSEqCDevDevice::TypeTable::value
uint value
Definition: diseqc.h:213
DiSEqCDevDevice::kTypeLNB
@ kTypeLNB
Definition: diseqc.h:158
DiSEqCDevSwitch::Load
bool Load(void) override
Loads this device from the database.
Definition: diseqc.cpp:1210
DiSEqCDevTree::FindLNB
DiSEqCDevLNB * FindLNB(const DiSEqCDevSettings &settings)
Returns the LNB device object selected by the configuration chain.
Definition: diseqc.cpp:573
DiSEqCDevLNB::LNBTypeToString
static QString LNBTypeToString(dvbdev_lnb_t type)
Definition: diseqc.h:485
DiSEqCDevSwitch::m_children
dvbdev_vec_t m_children
Definition: diseqc.h:297
DiSEqCDevSwitch::kTypeDiSEqCCommitted
@ kTypeDiSEqCCommitted
Definition: diseqc.h:240
DiSEqCDevRotor::StartRotorPositionTracking
void StartRotorPositionTracking(double azimuth)
Definition: diseqc.cpp:2053
DiSEqCDevRotor::ExecuteUSALS
bool ExecuteUSALS(const DiSEqCDevSettings &settings, const DTVMultiplex &tuning, double angle)
Definition: diseqc.cpp:2009
DiSEqCDevTree::Close
void Close(void)
Definition: diseqc.h:108
DiSEqCDevSCR::m_scrPin
int m_scrPin
Definition: diseqc.h:439
DiSEqCDevSwitch::GetType
dvbdev_switch_t GetType(void) const
Definition: diseqc.h:254
DiSEqCDevSettings::DiSEqCDevSettings
DiSEqCDevSettings()=default
DiSEqCDevTree::SendCommand
bool SendCommand(uint adr, uint cmd, uint repeats=0) const
Definition: diseqc.h:98
DiSEqCDevSwitch::kTypeMiniDiSEqC
@ kTypeMiniDiSEqC
Definition: diseqc.h:246
DiSEqCDevSwitch::SetNumPorts
void SetNumPorts(uint num_ports)
Definition: diseqc.cpp:1336
DiSEqCDevSettings::Store
bool Store(uint card_input_id) const
Stores configuration chain to DB for specified card input id.
Definition: diseqc.cpp:162
DiSEqCDev::InvalidateTrees
static void InvalidateTrees(void)
Invalidate cached trees.
Definition: diseqc.cpp:245
DiSEqCDevTree::ResetDiseqc
bool ResetDiseqc(bool hard_reset, bool is_SCR)
Resets the DiSEqC bus.
Definition: diseqc.cpp:741
DiSEqCDevSCR::SetPIN
void SetPIN(int pin)
Definition: diseqc.h:404
DiSEqCDevDevice::m_devType
dvbdev_t m_devType
Definition: diseqc.h:206
DiSEqCDevDevice::~DiSEqCDevDevice
virtual ~DiSEqCDevDevice()
Definition: diseqc.cpp:866
DiSEqCDevDevice::kDvbdevLookup
static const TypeTableVec kDvbdevLookup
Definition: diseqc.h:220
DiSEqCDevRotor::m_lastAzimuth
double m_lastAzimuth
Definition: diseqc.h:376
DiSEqCDevSwitch::kTypeTone
@ kTypeTone
Definition: diseqc.h:239
DiSEqCDevSwitch::SetAddress
void SetAddress(uint address)
Definition: diseqc.h:249
DiSEqCDevTree::FindRotor
DiSEqCDevRotor * FindRotor(const DiSEqCDevSettings &settings, uint index=0)
Returns the nth rotor device object in the tree.
Definition: diseqc.cpp:550
DiSEqCDevSCR::kTypeScrPosA
@ kTypeScrPosA
Definition: diseqc.h:399
DiSEqCDevSwitch::kTypeLegacySW64
@ kTypeLegacySW64
Definition: diseqc.h:244
DiSEqCDevRotor::GetVoltage
uint GetVoltage(const DiSEqCDevSettings &settings, const DTVMultiplex &tuning) const override
Retrives the desired voltage for this config.
Definition: diseqc.cpp:1774
DiSEqCDevSwitch::kTypeLegacySW42
@ kTypeLegacySW42
Definition: diseqc.h:243
DiSEqCDevSCR::GetSelectedChild
DiSEqCDevDevice * GetSelectedChild(const DiSEqCDevSettings &) const override
Retrieves the selected child for this configuration, if any.
Definition: diseqc.h:421
DiSEqCDevDevice::CreateById
static DiSEqCDevDevice * CreateById(DiSEqCDevTree &tree, uint devid)
Definition: diseqc.cpp:896
DiSEqCDevSCR::GetChildCount
uint GetChildCount(void) const override
Retrieves the proper number of children for this node.
Definition: diseqc.h:411
DiSEqCDevSwitch::kTypeLegacySW21
@ kTypeLegacySW21
Definition: diseqc.h:242
DiSEqCDevSCR::m_child
DiSEqCDevDevice * m_child
Definition: diseqc.h:441
DiSEqCDevSCR::SCRPositionToString
static QString SCRPositionToString(dvbdev_pos_t pos)
Definition: diseqc.h:427
DiSEqCDevSwitch::kTypeVoltage
@ kTypeVoltage
Definition: diseqc.h:245
DiSEqCDevRotor::m_reset
bool m_reset
Definition: diseqc.h:371
DiSEqCDevTree::m_root
DiSEqCDevDevice * m_root
Definition: diseqc.h:131
DiSEqCDevDevice::DevTypeFromString
static dvbdev_t DevTypeFromString(const QString &type)
Definition: diseqc.h:193
DiSEqCDevSwitch::~DiSEqCDevSwitch
~DiSEqCDevSwitch() override
Definition: diseqc.cpp:1071
DiSEqCDevSwitch::SetType
void SetType(dvbdev_switch_t type)
Definition: diseqc.h:248
DiSEqCDevTree::FindSCR
DiSEqCDevSCR * FindSCR(const DiSEqCDevSettings &settings)
Returns the SCR device object selected by the configuration chain.
Definition: diseqc.cpp:596
DiSEqCDevDevice::IsRealDeviceID
bool IsRealDeviceID(void) const
Definition: diseqc.h:171
DiSEqCDevSwitch::ExecuteDiseqc
bool ExecuteDiseqc(const DiSEqCDevSettings &settings, const DTVMultiplex &tuning, uint pos)
Definition: diseqc.cpp:1588
DiSEqCDevRotor::Reset
void Reset(void) override
Resets to the last known settings for this device.
Definition: diseqc.cpp:1720
DiSEqCDevRotor::GetApproxAzimuth
double GetApproxAzimuth(void) const
Definition: diseqc.cpp:2044
DiSEqCDevRotor::IsMoving
bool IsMoving(const DiSEqCDevSettings &settings) const
Definition: diseqc.cpp:1765
DiSEqCDevSCR::Load
bool Load(void) override
Loads this device from the database.
Definition: diseqc.cpp:2217
DiSEqCDevTree
DVB-S device tree class. Represents a tree of DVB-S devices.
Definition: diseqc.h:74
DiSEqCDevRotor::SetLoSpeed
void SetLoSpeed(double speed)
Definition: diseqc.h:318
DiSEqCDevDevice::Store
virtual bool Store(void) const =0
DiSEqCDevDevice::SetDescription
void SetDescription(const QString &desc)
Definition: diseqc.h:163
DiSEqCDevDevice::DiSEqCDevDevice
DiSEqCDevDevice(DiSEqCDevTree &tree, uint devid)
Definition: diseqc.h:142
DiSEqCDevLNB::IsHighBand
bool IsHighBand(const DTVMultiplex &tuning) const
Determine if the high frequency band is active (for switchable LNBs).
Definition: diseqc.cpp:2486
DiSEqCDevRotor::GetHiSpeed
double GetHiSpeed(void) const
Definition: diseqc.h:327
DiSEqCDevTree::Store
bool Store(uint cardid, const QString &device="")
Stores the device tree to the database.
Definition: diseqc.cpp:422
DiSEqCDevTrees::FindTree
DiSEqCDevTree * FindTree(uint cardid)
Retrieve device tree.
Definition: diseqc.cpp:265
DiSEqCDevDevice::m_desc
QString m_desc
Definition: diseqc.h:207
DiSEqCDevDevice::GetDeviceID
uint GetDeviceID(void) const
Definition: diseqc.h:170
DiSEqCDevLNB::kTypeVoltageAndToneControl
@ kTypeVoltageAndToneControl
Definition: diseqc.h:462
DiSEqCDevSwitch::DiSEqCDevSwitch
DiSEqCDevSwitch(DiSEqCDevTree &tree, uint devid)
Definition: diseqc.cpp:1060
DiSEqCDevSCR::Reset
void Reset(void) override
Resets to the last known settings for this device.
Definition: diseqc.cpp:2092
DiSEqCDevTree::GetVoltage
uint GetVoltage(void) const
Definition: diseqc.h:116
DiSEqCDevLNB::m_type
dvbdev_lnb_t m_type
Definition: diseqc.h:492
DiSEqCDevDevice::GetSelectedChild
virtual DiSEqCDevDevice * GetSelectedChild(const DiSEqCDevSettings &) const
Retrieves the selected child for this configuration, if any.
Definition: diseqc.h:186
DiSEqCDevDevice::Execute
virtual bool Execute(const DiSEqCDevSettings &, const DTVMultiplex &)=0
Applies DiSEqC settings to this node and any children.
DiSEqCDevRotor::m_speedHi
double m_speedHi
Definition: diseqc.h:363
DiSEqCDevRotor::GetChild
DiSEqCDevDevice * GetChild(uint) override
Retrieves the nth child of this node.
Definition: diseqc.h:341
DiSEqCDevSCR::dvbdev_pos_t
dvbdev_pos_t
Definition: diseqc.h:397
DiSEqCDevRotor::GetLoSpeed
double GetLoSpeed(void) const
Definition: diseqc.h:326
DiSEqCDevTrees::m_trees
cardid_to_diseqc_tree_t m_trees
Definition: diseqc.h:70
DiSEqCDevRotor::m_desiredAzimuth
double m_desiredAzimuth
Definition: diseqc.h:370
DiSEqCDevTrees::InvalidateTrees
void InvalidateTrees(void)
Invalidate cached trees.
Definition: diseqc.cpp:283
DiSEqCDevRotor::dvbdev_rotor_t
dvbdev_rotor_t
Definition: diseqc.h:316
dbl_to_uint_t
QMap< double, uint > dbl_to_uint_t
Definition: diseqc.h:31
DiSEqCDevSwitch::GetVoltage
uint GetVoltage(const DiSEqCDevSettings &settings, const DTVMultiplex &tuning) const override
Retrives the desired voltage for this config.
Definition: diseqc.cpp:1198
DiSEqCDevSCR::GetChild
DiSEqCDevDevice * GetChild(uint) override
Retrieves the nth child of this node.
Definition: diseqc.h:423
DiSEqCDevLNB::GetVoltage
uint GetVoltage(const DiSEqCDevSettings &settings, const DTVMultiplex &tuning) const override
Retrives the desired voltage for this config.
Definition: diseqc.cpp:2372
DiSEqCDevTree::Reset
void Reset(void)
Reset state of nodes in tree, forcing updates on the next Execute command.
Definition: diseqc.cpp:536
DiSEqCDevRotor::SetType
void SetType(dvbdev_rotor_t type)
Definition: diseqc.h:317
DiSEqCDevSwitch::m_address
uint m_address
Definition: diseqc.h:292
DiSEqCDevLNB::kTypeVoltageControl
@ kTypeVoltageControl
Definition: diseqc.h:461
DiSEqCDevLNB::SetLOFLow
void SetLOFLow(uint lof_lo)
Definition: diseqc.h:468
DiSEqCDevSwitch::m_lastHighBand
uint m_lastHighBand
Definition: diseqc.h:295
DiSEqCDevLNB::GetIntermediateFrequency
uint32_t GetIntermediateFrequency(const DiSEqCDevSettings &settings, const DTVMultiplex &tuning) const
Calculate proper intermediate frequency for the given settings and tuning parameters.
Definition: diseqc.cpp:2518
DiSEqCDevTree::AddDeferredDelete
void AddDeferredDelete(uint dev_id)
Definition: diseqc.h:120
DiSEqCDevSwitch::GetNumPorts
uint GetNumPorts(void) const
Definition: diseqc.h:256
DiSEqCDevSwitch
Switch class, including tone, legacy and DiSEqC switches.
Definition: diseqc.h:223
DiSEqCDevSwitch::ShouldSwitch
bool ShouldSwitch(const DiSEqCDevSettings &settings, const DTVMultiplex &tuning) const
Definition: diseqc.cpp:1545