Instrument Neutral Distributed Interface INDI  2.0.2
simplescope.h
Go to the documentation of this file.
1 /*
2  INDI Developers Manual
3  Tutorial #2
4 
5  "Simple Telescope Driver"
6 
7  We develop a simple telescope simulator.
8 
9  Refer to README, which contains instruction on how to build this driver, and use it
10  with an INDI-compatible client.
11 
12 */
13 
22 #pragma once
23 
24 #include "inditelescope.h"
25 
27 {
28  public:
29  SimpleScope();
30 
31  protected:
32  bool Handshake() override;
33 
34  const char *getDefaultName() override;
35  bool initProperties() override;
36 
37  // Telescope specific functions
38  bool ReadScopeStatus() override;
39  bool Goto(double, double) override;
40  bool Abort() override;
41 
42  private:
43  double currentRA {0};
44  double currentDEC {90};
45  double targetRA {0};
46  double targetDEC {0};
47 
48  // Debug channel to write mount logs to
49  // Default INDI::Logger debugging/logging channel are Message, Warn, Error, and Debug
50  // Since scope information can be _very_ verbose, we create another channel SCOPE specifically
51  // for extra debug logs. This way the user can turn it on/off as desired.
52  uint8_t DBG_SCOPE { INDI::Logger::DBG_IGNORE };
53 
54  // slew rate, degrees/s
55  static const uint8_t SLEW_RATE = 3;
56 };
bool Handshake() override
perform handshake with device to check communication
Definition: simplescope.cpp:61
bool Goto(double, double) override
Move the scope to the supplied RA and DEC coordinates.
Definition: simplescope.cpp:79
const char * getDefaultName() override
Definition: simplescope.cpp:71
bool Abort() override
Abort any telescope motion including tracking if possible.
bool initProperties() override
Called to initialize basic properties required all the time.
Definition: simplescope.cpp:40
bool ReadScopeStatus() override
Read telescope status.