code:telescope_driver
Differences
This shows you the differences between two versions of the page.
Next revisionBoth sides next revision | |||
code:telescope_driver [2008/12/29 22:03] – created pkubanek | code:telescope_driver [2010/01/17 02:40] – Changed to new teld.h interface pkubanek | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Tasks in implementing driver ====== | ====== Tasks in implementing driver ====== | ||
- | To implement an RTS2 telescope driver, you need to create a child class inherited from [[Rts2DevTelescope]] abstract class. This class provides pure virtual methods, which you must overwrite. The method names should be self explanatory and are well documented. | + | To implement an RTS2 telescope driver, you need to create a child class inherited from [[rts2teld:: |
If you are using a serial port to communicate with your telescope, you can consider using [[Rts2ConnSerial]] class to handle for you communication over serial port. For example how to use this class refer to [[http:// | If you are using a serial port to communicate with your telescope, you can consider using [[Rts2ConnSerial]] class to handle for you communication over serial port. For example how to use this class refer to [[http:// | ||
Line 8: | Line 8: | ||
<code c++> | <code c++> | ||
- | #include "telescope.h" | + | #include "teld.h" |
- | class Rts2DevMyTelescope: public | + | using namespace rts2teld; |
+ | |||
+ | class MyTelescope: public | ||
{ | { | ||
protected: | protected: | ||
Line 18: | Line 20: | ||
virtual int stopPark (); | virtual int stopPark (); | ||
public: | public: | ||
- | | + | |
}; | }; | ||
- | int | + | int Telescope::startMove () |
- | Rts2DevMyTelescope::startMove () | + | |
{ | { | ||
struct ln_equ_struct tar; | struct ln_equ_struct tar; | ||
Line 32: | Line 33: | ||
} | } | ||
- | int | + | int MyTelescope::stopMove () |
- | Rts2DevMyTelescope::stopMove () | + | |
{ | { | ||
return 0; // success | return 0; // success | ||
} | } | ||
- | int | + | int MyTelescope::startPark () |
- | Rts2DevMyTelescope::startPark () | + | |
{ | { | ||
// do all what is needed to move telescope to park position | // do all what is needed to move telescope to park position | ||
Line 46: | Line 45: | ||
} | } | ||
- | int | + | int MyTelescope::endPark () |
- | Rts2DevMyTelescope::endPark () | + | |
{ | { | ||
return 0; | return 0; | ||
} | } | ||
- | Rts2DevMyTelescope::Rts2DevMyTelescope | + | MyTelescope::MyTelescope |
{ | { | ||
code/telescope_driver.txt · Last modified: 2010/01/17 00:00 (external edit)