|
Instrument Neutral Distributed Interface INDI
0.9.6
|
Class to provide general functionality of a telescope device. More...
#include <inditelescope.h>
Public Member Functions | |
| virtual bool | ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n) |
| Process the client newNumber command. | |
| virtual bool | ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n) |
| Process the client newSwitch command. | |
| virtual bool | ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n) |
| Process the client newSwitch command. | |
| virtual void | ISGetProperties (const char *dev) |
| define the driver's properties to the client. | |
| virtual bool | initProperties () |
| Called to initialize basic properties required all the time. | |
| virtual bool | updateProperties () |
| Called when connected state changes, to add/remove properties. | |
| virtual void | TimerHit () |
| Called when setTimer() time is up. | |
| virtual bool | Connect () |
| Connect to the telescope. | |
| virtual bool | Disconnect () |
| Disconnect from telescope. | |
| virtual bool | Connect (const char *port) |
| INDI::Telescope implementation of Connect() assumes 9600 baud, 8 bit word, even parity, and no stop bit. Override function if communication paramaters are different. | |
Public Member Functions inherited from INDI::DefaultDevice | |
| void | addAuxControls () |
| Add Debug, Simulation, and Configuration options to the driver. | |
| void | addDebugControl () |
| Add Debug control to the driver. | |
| void | addSimulationControl () |
| Add Simulation control to the driver. | |
| void | addConfigurationControl () |
| Add Configuration control to the driver. | |
| void | resetProperties () |
| Set all properties to IDLE state. | |
| void | defineNumber (INumberVectorProperty *nvp) |
| Define number vector to client & register it. Alternatively, IDDefNumber can be used but the property will not get registered and the driver will not be able to save configuration files. | |
| void | defineText (ITextVectorProperty *tvp) |
| Define text vector to client & register it. Alternatively, IDDefText can be used but the property will not get registered and the driver will not be able to save configuration files. | |
| void | defineSwitch (ISwitchVectorProperty *svp) |
| Define switch vector to client & register it. Alternatively, IDDefswitch can be used but the property will not get registered and the driver will not be able to save configuration files. | |
| void | defineLight (ILightVectorProperty *lvp) |
| Define light vector to client & register it. Alternatively, IDDeflight can be used but the property will not get registered and the driver will not be able to save configuration files. | |
| void | defineBLOB (IBLOBVectorProperty *bvp) |
| Define BLOB vector to client & register it. Alternatively, IDDefBLOB can be used but the property will not get registered and the driver will not be able to save configuration files. | |
| virtual bool | deleteProperty (const char *propertyName) |
| Delete a property and unregister it. It will also be deleted from all clients. | |
| virtual void | setConnected (bool status, IPState state=IPS_OK, const char *msg=NULL) |
| Set connection switch status in the client. | |
| int | SetTimer (int ms) |
| Set a timer to call the function TimerHit after ms milliseconds. | |
| void | RemoveTimer (int id) |
| Remove timer added with SetTimer. | |
| virtual const char * | getDriverName () |
| void | setVersion (unsigned int vMajor, unsigned int vMinor) |
| Set driver version information to be defined in DRIVER_INFO property as vMajor.vMinor. | |
| unsigned int | getMajorVersion () |
| unsigned int | getMinorVersion () |
| virtual bool | ISNewBLOB (const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n) |
| Process the client newBLOB command. | |
| virtual bool | ISSnoopDevice (XMLEle *root) |
| Process a snoop event from INDI server. This function is called when a snooped property is updated in a snooped driver. | |
Public Member Functions inherited from INDI::BaseDevice | |
| INumberVectorProperty * | getNumber (const char *name) |
| ITextVectorProperty * | getText (const char *name) |
| ISwitchVectorProperty * | getSwitch (const char *name) |
| ILightVectorProperty * | getLight (const char *name) |
| IBLOBVectorProperty * | getBLOB (const char *name) |
| int | removeProperty (const char *name, char *errmsg) |
| Remove a property. | |
| void * | getRawProperty (const char *name, INDI_TYPE type=INDI_UNKNOWN) |
| Return a property and its type given its name. | |
| INDI::Property * | getProperty (const char *name, INDI_TYPE type=INDI_UNKNOWN) |
| Return a property and its type given its name. | |
| std::vector< INDI::Property * > * | getProperties () |
| Return a list of all properties in the device. | |
| void | buildSkeleton (const char *filename) |
| Build driver properties from a skeleton file. | |
| bool | isConnected () |
| void | setDeviceName (const char *dev) |
| Set the device name. | |
| const char * | getDeviceName () |
| void | addMessage (const char *msg) |
| Add message to the driver's message queue. | |
| const char * | messageQueue (int index) |
| const char * | lastMessage () |
| void | setMediator (INDI::BaseMediator *med) |
| Set the driver's mediator to receive notification of news devices and updated property values. | |
| INDI::BaseMediator * | getMediator () |
| const char * | getDriverExec () |
Protected Member Functions | |
| void | NewRaDec (double ra, double dec) |
| The child class calls this function when it has updates. | |
| virtual bool | ReadScopeStatus ()=0 |
| Read telescope status. This function checks the following: | |
| virtual bool | Goto (double ra, double dec)=0 |
| Move the scope to the supplied RA and DEC coordinates. | |
| virtual bool | canSync () |
| Does the mount support sync? | |
| virtual bool | Sync (double ra, double dec) |
| Set the telescope current RA and DEC coordinates to the supplied RA and DEC coordinates. | |
| virtual bool | MoveNS (TelescopeMotionNS dir) |
| Move the telescope in the direction dir. | |
| virtual bool | MoveWE (TelescopeMotionWE dir) |
| Move the telescope in the direction dir. | |
| virtual bool | canPark () |
| Does the mount support park? | |
| virtual bool | Park () |
| Park the telescope to its home position. | |
| virtual bool | Abort ()=0 |
| Abort telescope motion. | |
Protected Member Functions inherited from INDI::DefaultDevice | |
| virtual bool | loadConfig () |
| Load the last saved configuration file. | |
| virtual bool | saveConfig () |
| Save the current properties in a configuration file. | |
| virtual bool | loadDefaultConfig () |
| Load the default configuration file. | |
| void | setDebug (bool enable) |
| Toggle driver debug status. | |
| void | setSimulation (bool enable) |
| Toggle driver simulation status. | |
| bool | isDebug () |
| bool | isSimulation () |
| virtual const char * | getDefaultName ()=0 |
Protected Member Functions inherited from INDI::BaseDevice | |
| int | buildProp (XMLEle *root, char *errmsg) |
| Build a property given the supplied XML element (defXXX) | |
| int | setValue (XMLEle *root, char *errmsg) |
| handle SetXXX commands from client | |
| int | setBLOB (IBLOBVectorProperty *pp, XMLEle *root, char *errmsg) |
| Parse and store BLOB in the respective vector. | |
Additional Inherited Members | |
Public Types inherited from INDI::BaseDevice | |
| enum | INDI_ERROR { INDI_DEVICE_NOT_FOUND = -1, INDI_PROPERTY_INVALID = -2, INDI_PROPERTY_DUPLICATED = -3, INDI_DISPATCH_ERROR = -4 } |
Class to provide general functionality of a telescope device.
Developers need to subclass INDI::Telescope to implement any driver for telescopes within INDI.
Implementing a basic telescope driver involves the child class performing the following steps:
Definition at line 44 of file inditelescope.h.
|
protectedpure virtual |
Abort telescope motion.
|
protectedvirtual |
Does the mount support park?
Definition at line 552 of file inditelescope.cpp.
|
protectedvirtual |
Does the mount support sync?
Definition at line 547 of file inditelescope.cpp.
|
virtual |
Connect to the telescope.
Implements INDI::DefaultDevice.
Definition at line 436 of file inditelescope.cpp.
|
virtual |
INDI::Telescope implementation of Connect() assumes 9600 baud, 8 bit word, even parity, and no stop bit. Override function if communication paramaters are different.
| port | Port to connect to |
Definition at line 460 of file inditelescope.cpp.
|
virtual |
Disconnect from telescope.
Implements INDI::DefaultDevice.
Definition at line 503 of file inditelescope.cpp.
|
protectedpure virtual |
Move the scope to the supplied RA and DEC coordinates.
|
virtual |
define the driver's properties to the client.
| dev | name of the device |
Reimplemented from INDI::DefaultDevice.
Definition at line 90 of file inditelescope.cpp.
|
virtual |
Process the client newNumber command.
Reimplemented from INDI::DefaultDevice.
Definition at line 253 of file inditelescope.cpp.
|
virtual |
Process the client newSwitch command.
Reimplemented from INDI::DefaultDevice.
Definition at line 337 of file inditelescope.cpp.
|
virtual |
Process the client newSwitch command.
Reimplemented from INDI::DefaultDevice.
Definition at line 226 of file inditelescope.cpp.
|
protectedvirtual |
Move the telescope in the direction dir.
Definition at line 205 of file inditelescope.cpp.
|
protectedvirtual |
Move the telescope in the direction dir.
Definition at line 214 of file inditelescope.cpp.
|
protectedvirtual |
Park the telescope to its home position.
Definition at line 539 of file inditelescope.cpp.
|
protectedpure virtual |
Read telescope status. This function checks the following:
|
protectedvirtual |
Set the telescope current RA and DEC coordinates to the supplied RA and DEC coordinates.
Definition at line 198 of file inditelescope.cpp.
1.8.1.2