basedevice.h   basedevice.h 
skipping to change at line 25 skipping to change at line 25
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*************************************************************************** ****/ *************************************************************************** ****/
#ifndef INDIBASEDRIVER_H #ifndef INDIBASEDRIVER_H
#define INDIBASEDRIVER_H #define INDIBASEDRIVER_H
#include <vector> #include <vector>
#include <string> #include <string>
#include <locale.h>
#include <pthread.h>
#include "indiapi.h" #include "indiapi.h"
#include "indidevapi.h" #include "indidevapi.h"
#include "indibase.h" #include "indibase.h"
#include "indiproperty.h" #include "indiproperty.h"
#define MAXRBUF 2048 #define MAXRBUF 2048
/** /**
* \class INDI::BaseDevice * \class INDI::BaseDevice
\brief Class to provide basic INDI device functionality. \brief Class to provide basic INDI device functionality.
 End of changes. 1 change blocks. 
0 lines changed or deleted 3 lines changed or added


 defaultdevice.h   defaultdevice.h 
skipping to change at line 24 skipping to change at line 24
along with this library; see the file COPYING.LIB. If not, write to along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*************************************************************************** ****/ *************************************************************************** ****/
#ifndef INDIDEFAULTDRIVER_H #ifndef INDIDEFAULTDRIVER_H
#define INDIDEFAULTDRIVER_H #define INDIDEFAULTDRIVER_H
#include "basedevice.h" #include "basedevice.h"
#include "indidriver.h" #include "indidriver.h"
#include "indilogger.h"
#include <memory.h> #include <memory.h>
/**
* @brief COMMUNICATION_TAB Where all the properties required to connect/di
sconnect from a device are located.
* Usually such properties may include port number, IP address, or any pro
perty necessarily to establish a
* connection to the device.
*/
extern const char *COMMUNICATION_TAB; extern const char *COMMUNICATION_TAB;
/**
* @brief MAIN_CONTROL_TAB Where all the primary controls for the device ar
e located.
*/
extern const char *MAIN_CONTROL_TAB; extern const char *MAIN_CONTROL_TAB;
/**
* @brief MOTION_TAB Where all the motion control properties of the device
are located.
*/
extern const char *MOTION_TAB; extern const char *MOTION_TAB;
/**
* @brief DATETIME_TAB Where all date and time setting properties are locat
ed.
*/
extern const char *DATETIME_TAB; extern const char *DATETIME_TAB;
/**
* @brief SITE_TAB Where all site information setting are located.
*/
extern const char *SITE_TAB; extern const char *SITE_TAB;
/**
* @brief OPTIONS_TAB Where all the driver's options are located. Those may
include auxiliary controls, driver
* metadata, version information..etc.
*/
extern const char *OPTIONS_TAB; extern const char *OPTIONS_TAB;
/**
* @brief FILTER_TAB Where all the properties for filter wheels are located
.
*/
extern const char *FILTER_TAB; extern const char *FILTER_TAB;
extern const char *GUIDER_TAB;
/**
* @brief FOCUS_TAB Where all the properties for focuser are located.
*/
extern const char *FOCUS_TAB;
/**
* @brief GUIDE_TAB Where all the properties for guiding are located.
*/
extern const char *GUIDE_TAB;
/** /**
* \class INDI::DefaultDevice * \class INDI::DefaultDevice
\brief Class to provide extended functionality for devices in addition \brief Class to provide extended functionality for devices in addition
to the functionality provided by INDI::BaseDevice. This class should \e onl y be subclassed by to the functionality provided by INDI::BaseDevice. This class should \e onl y be subclassed by
drivers directly as it is linked with main(). Virtual drivers cannot employ INDI::DefaultDevice. drivers directly as it is linked with main(). Virtual drivers cannot employ INDI::DefaultDevice.
INDI::DefaultDevice provides capability to add Debug, Simulation, and Co nfiguration controls. These controls (switches) are INDI::DefaultDevice provides capability to add Debug, Simulation, and Co nfiguration controls. These controls (switches) are
defined to the client. Configuration options permit saving and loading o f AS-IS property values. defined to the client. Configuration options permit saving and loading o f AS-IS property values.
skipping to change at line 144 skipping to change at line 184
*/ */
void setVersion(unsigned int vMajor, unsigned int vMinor) { majorVersio n = vMajor; minorVersion = vMinor;} void setVersion(unsigned int vMajor, unsigned int vMinor) { majorVersio n = vMajor; minorVersion = vMinor;}
/** \return Major driver version number. */ /** \return Major driver version number. */
unsigned int getMajorVersion() { return majorVersion;} unsigned int getMajorVersion() { return majorVersion;}
/** \return Minor driver version number. */ /** \return Minor driver version number. */
unsigned int getMinorVersion() { return minorVersion;} unsigned int getMinorVersion() { return minorVersion;}
/** \brief define the driver's properties to the client. /** \brief define the driver's properties to the client.
* Usually, only a minumum set of properties are defined to the client
in this function if the device is in disconnected state.
* Those properties should be enough to enable the client to establish
a connection to the device. In addition to
* CONNECT/DISCONNECT, such properties may include port name, IP addre
ss, etc...
* You should check if the device is already connected, and if this is
true, then you must define the remainder of the
* the properties to the client in this function. Otherweise, the rema
inder of the driver's properties are defined to the
* client in updateProperties() function which is called when a client
connects/disconnects from a device.
\param dev name of the device \param dev name of the device
\note This function is called by the INDI framework, do not call it d irectly. \note This function is called by the INDI framework, do not call it d irectly. See LX200 Generic driver for an example implementation
*/ */
virtual void ISGetProperties (const char *dev); virtual void ISGetProperties (const char *dev);
/** \brief Process the client newSwitch command /** \brief Process the client newSwitch command
\note This function is called by the INDI framework, do not call it d irectly. \note This function is called by the INDI framework, do not call it d irectly.
\returns True if any property was successfully processed, false other wise. \returns True if any property was successfully processed, false other wise.
*/ */
virtual bool ISNewSwitch (const char *dev, const char *name, ISState *s tates, char *names[], int n); virtual bool ISNewSwitch (const char *dev, const char *name, ISState *s tates, char *names[], int n);
/** \brief Process the client newNumber command /** \brief Process the client newNumber command
skipping to change at line 217 skipping to change at line 263
void setDebug(bool enable); void setDebug(bool enable);
/** \brief Toggle driver simulation status /** \brief Toggle driver simulation status
A driver can run in simulation mode if Simulation option is enabled b y the client. A driver can run in simulation mode if Simulation option is enabled b y the client.
\param enable If true, the Simulation option is set to ON. \param enable If true, the Simulation option is set to ON.
*/ */
void setSimulation(bool enable); void setSimulation(bool enable);
/** \brief Inform driver that the debug option was triggered.
This function is called after setDebug is triggered by the client.
Reimplement this function if your driver needs to take specific actio
n after
debug is enabled/disabled. Otherwise, you can use isDebug() to
check if simulation is enabled or disabled.
\param enable If true, the debug option is set to ON.
*/
virtual void debugTriggered(bool enable);
/** \brief Inform driver that the simulation option was triggered.
This function is called after setSimulation is triggered by the clien
t.
Reimplement this function if your driver needs to take specific actio
n after
simulation is enabled/disabled. Otherwise, you can use isSimulation()
to
check if simulation is enabled or disabled.
\param enable If true, the simulation option is set to ON.
*/
virtual void simulationTriggered(bool enable);
/** \return True if Debug is on, False otherwise. */ /** \return True if Debug is on, False otherwise. */
bool isDebug(); bool isDebug();
/** \return True if Simulation is on, False otherwise. */ /** \return True if Simulation is on, False otherwise. */
bool isSimulation(); bool isSimulation();
/** \brief Initilize properties initial state and value. The child clas s must implement this function. /** \brief Initilize properties initial state and value. The child clas s must implement this function.
\return True if initilization is successful, false otherwise. \return True if initilization is successful, false otherwise.
*/ */
virtual bool initProperties(); virtual bool initProperties();
 End of changes. 12 change blocks. 
2 lines changed or deleted 87 lines changed or added


 indiapi.h   indiapi.h 
skipping to change at line 51 skipping to change at line 51
\section Development Developing under INDI \section Development Developing under INDI
<p>Please refere to the <a href="http://www.indilib.org/develop/developer-m anual">INDI Developers Manual</a> for a complete guide on INDI's driver dev elopemnt framework.</p> <p>Please refere to the <a href="http://www.indilib.org/develop/developer-m anual">INDI Developers Manual</a> for a complete guide on INDI's driver dev elopemnt framework.</p>
<p>The INDI Library API is divided into the following main sections:</p> <p>The INDI Library API is divided into the following main sections:</p>
<ul> <ul>
<li><a href="indidevapi_8h.html">INDI Device API</a></li> <li><a href="indidevapi_8h.html">INDI Device API</a></li>
<li><a href="classINDI_1_1BaseClient.html">INDI Client API</a></li> <li><a href="classINDI_1_1BaseClient.html">INDI Client API</a></li>
<li><a href="namespaceINDI.html">INDI Base Drivers</a></li> <li><a href="namespaceINDI.html">INDI Base Drivers</a></li>
<li><a href="structINDI_1_1Logger.html">INDI Debugging & Logging API</a></l i>
<li><a href="indicom_8h.html">INDI Common Routine Library</a></li> <li><a href="indicom_8h.html">INDI Common Routine Library</a></li>
<li><a href="lilxml_8h.html">INDI LilXML Library</a></li> <li><a href="lilxml_8h.html">INDI LilXML Library</a></li>
<li><a href="group__configFunctions.html">Configuration</a></li> <li><a href="group__configFunctions.html">Configuration</a></li>
</ul> </ul>
\section Tutorials
INDI Library includes a number of tutorials to illustrate development of IN
DI drivers. Check out the <a href="examples.html">examples</a> provided wit
h INDI library.
\section Simulators
Simulators provide a great framework to test drivers and equipment alike. I
NDI Library provides the following simulators:
<ul>
<li><b>Telescope Simulator</b>: Offers GOTO capability, motion control, gui
ding, and ability to set Periodic Error (PE) which is read by the CCD simul
ator when generating images.</li>
<li><b>CCD Simulator</b>: Offers a very flexible CCD simulator with a prima
ry CCD chip and a guide chip. The simulator generate images based on the RA
& DEC coordinates it
snoops from the telescope driver using General Star Catalog (GSC). Please
note that you must install GSC for the CCD simulator to work properly. Furt
hermore,
The simulator snoops FWHM from the focuser simulator which affects the gen
erated images focus. All images are generated in standard FITS format.</li>
<li><b>Filter Wheel Simulator</b>: Offers a simple simulator to change filt
er wheels and their corresponding designations.</li>
<li><b>Focuser Simulator</b>: Offers a simple simualtor for an absolute pos
ition focuser. It generates a simulated FWHM value that may be used by othe
r simulator such as the CCD simulator.</li>
</ul>
\section Help \section Help
You can find information on INDI development in the <a href="http://www.ind ilib.org">INDI Library</a> site. Furthermore, you can discuss INDI related issues on the <a href="http://sourceforge.net/mail/?group_id=90275">INDI de velopment mailing list</a>. You can find information on INDI development in the <a href="http://www.ind ilib.org">INDI Library</a> site. Furthermore, you can discuss INDI related issues on the <a href="http://sourceforge.net/mail/?group_id=90275">INDI de velopment mailing list</a>.
\author Elwood Downey
\author Jasem Mutlaq \author Jasem Mutlaq
\author Elwood Downey
*/ */
/** \file indiapi.h /** \file indiapi.h
\brief Constants and Data structure definitions for the interface to th e reference INDI C API implementation. \brief Constants and Data structure definitions for the interface to th e reference INDI C API implementation.
\author Elwood C. Downey \author Elwood C. Downey
*/ */
/************************************************************************** ***** /************************************************************************** *****
* INDI wire protocol version implemented by this API. * INDI wire protocol version implemented by this API.
* N.B. this is indepedent of the API itself. * N.B. this is indepedent of the API itself.
skipping to change at line 126 skipping to change at line 143
typedef enum typedef enum
{ {
IP_RO, /*!< Read Only */ IP_RO, /*!< Read Only */
IP_WO, /*!< Write Only */ IP_WO, /*!< Write Only */
IP_RW /*!< Read & Write */ IP_RW /*!< Read & Write */
} IPerm; /* permission hint, WRT client */ } IPerm; /* permission hint, WRT client */
/* The XML strings for these attributes may be any length but implementatio ns /* The XML strings for these attributes may be any length but implementatio ns
* are only obligued to support these lengths for the various string attrib utes. * are only obligued to support these lengths for the various string attrib utes.
*/ */
#define MAXINDINAME 32 #define MAXINDINAME 64
#define MAXINDILABEL 32 #define MAXINDILABEL 64
#define MAXINDIDEVICE 32 #define MAXINDIDEVICE 64
#define MAXINDIGROUP 32 #define MAXINDIGROUP 64
#define MAXINDIFORMAT 32 #define MAXINDIFORMAT 64
#define MAXINDIBLOBFMT 32 #define MAXINDIBLOBFMT 64
#define MAXINDITSTAMP 32 #define MAXINDITSTAMP 64
/************************************************************************** ***** /************************************************************************** *****
* Typedefs for each INDI Property type. * Typedefs for each INDI Property type.
* *
* INumber.format may be any printf-style appropriate for double * INumber.format may be any printf-style appropriate for double
* or style "m" to create sexigesimal using the form "%<w>.<f>m" where * or style "m" to create sexigesimal using the form "%<w>.<f>m" where
* <w> is the total field width. * <w> is the total field width.
* <f> is the width of the fraction. valid values are: * <f> is the width of the fraction. valid values are:
* 9 -> :mm:ss.ss * 9 -> :mm:ss.ss
* 8 -> :mm:ss.s * 8 -> :mm:ss.s
 End of changes. 5 change blocks. 
8 lines changed or deleted 38 lines changed or added


 indibase.h   indibase.h 
skipping to change at line 29 skipping to change at line 29
<li>BaseDriver: Base class for all INDI virtual driver as handled and st ored in INDI::BaseClient.</li> <li>BaseDriver: Base class for all INDI virtual driver as handled and st ored in INDI::BaseClient.</li>
<li>DefaultDriver: INDI::BaseDriver with extended functionality such as debug, simulation, and configuration support. <li>DefaultDriver: INDI::BaseDriver with extended functionality such as debug, simulation, and configuration support.
It is \e only used by drivers directly, it cannot be used by clients .</li> It is \e only used by drivers directly, it cannot be used by clients .</li>
<li>FilterInterface: Basic interface for filter wheels functions.</li> <li>FilterInterface: Basic interface for filter wheels functions.</li>
<li>GuiderInterface: Basic interface for guider (ST4) port functions.</l i> <li>GuiderInterface: Basic interface for guider (ST4) port functions.</l i>
<li>CCD: Base class for CCD drivers. Provides basic support for single c hip CCD and CCDs with a guide head as well.</li> <li>CCD: Base class for CCD drivers. Provides basic support for single c hip CCD and CCDs with a guide head as well.</li>
<li>Telescope: Base class for telescope drivers.</li> <li>Telescope: Base class for telescope drivers.</li>
<li>FilterWheel: Base class for Filter Wheels. It implements the FilterI nterface.</li> <li>FilterWheel: Base class for Filter Wheels. It implements the FilterI nterface.</li>
<li>Focuser: Base class for focusers.</li> <li>Focuser: Base class for focusers.</li>
<li>USBDevice: Base class for USB devices for direct read/write/control over USB.</li> <li>USBDevice: Base class for USB devices for direct read/write/control over USB.</li>
<li>Controller: Class to handle controller inputs like joysticks and gam
epads.</li>
<li>Logger: Class to handle debugging and logging of drivers.</li>
</ul> </ul>
\author Jasem Mutlaq \author Jasem Mutlaq
\author Gerry Rozema \author Gerry Rozema
*/ */
namespace INDI namespace INDI
{ {
class BaseMediator; class BaseMediator;
class BaseClient; class BaseClient;
class BaseDevice; class BaseDevice;
class DefaultDevice; class DefaultDevice;
class FilterInterface; class FilterInterface;
class GuiderInterface; class GuiderInterface;
class CCD; class CCD;
class Telescope; class Telescope;
class FilterWheel; class FilterWheel;
class Focuser; class Focuser;
class USBDevice; class USBDevice;
class Property; class Property;
class Controller;
class Logger;
} }
/*! INDI property type */ /*! INDI property type */
typedef enum typedef enum
{ {
INDI_NUMBER, /*!< INumberVectorProperty. */ INDI_NUMBER, /*!< INumberVectorProperty. */
INDI_SWITCH, /*!< ISwitchVectorProperty. */ INDI_SWITCH, /*!< ISwitchVectorProperty. */
INDI_TEXT, /*!< ITextVectorProperty. */ INDI_TEXT, /*!< ITextVectorProperty. */
INDI_LIGHT, /*!< ILightVectorProperty. */ INDI_LIGHT, /*!< ILightVectorProperty. */
INDI_BLOB, /*!< IBLOBVectorProperty. */ INDI_BLOB, /*!< IBLOBVectorProperty. */
 End of changes. 2 change blocks. 
0 lines changed or deleted 5 lines changed or added


 indiccd.h   indiccd.h 
skipping to change at line 33 skipping to change at line 33
#include <string.h> #include <string.h>
#include "defaultdevice.h" #include "defaultdevice.h"
#include "indiguiderinterface.h" #include "indiguiderinterface.h"
extern const char *IMAGE_SETTINGS_TAB; extern const char *IMAGE_SETTINGS_TAB;
extern const char *IMAGE_INFO_TAB; extern const char *IMAGE_INFO_TAB;
extern const char *GUIDE_HEAD_TAB; extern const char *GUIDE_HEAD_TAB;
extern const char *GUIDE_CONTROL_TAB; extern const char *GUIDE_CONTROL_TAB;
/**
* @brief The CCDChip class provides functionality of a CCD Chip within a C
CD.
*
*/
class CCDChip class CCDChip
{ {
public: public:
CCDChip(); CCDChip();
~CCDChip(); ~CCDChip();
typedef enum { LIGHT_FRAME=0, BIAS_FRAME, DARK_FRAME, FLAT_FRAME } CCD_ FRAME; typedef enum { LIGHT_FRAME=0, BIAS_FRAME, DARK_FRAME, FLAT_FRAME } CCD_ FRAME;
typedef enum { FRAME_X, FRAME_Y, FRAME_W, FRAME_H} CCD_FRAME_INDEX; typedef enum { FRAME_X, FRAME_Y, FRAME_W, FRAME_H} CCD_FRAME_INDEX;
typedef enum { BIN_W, BIN_H} CCD_BIN_INDEX; typedef enum { BIN_W, BIN_H} CCD_BIN_INDEX;
typedef enum { CCD_MAX_X, CCD_MAX_Y, CCD_PIXEL_SIZE, CCD_PIXEL_SIZE_X, CCD_PIXEL_SIZE_Y, CCD_BITSPERPIXEL} CCD_INFO_INDEX; typedef enum { CCD_MAX_X, CCD_MAX_Y, CCD_PIXEL_SIZE, CCD_PIXEL_SIZE_X, CCD_PIXEL_SIZE_Y, CCD_BITSPERPIXEL} CCD_INFO_INDEX;
/**
* @brief getXRes Get the horizontal resolution in pixels of the CCD Ch
ip.
* @return the horizontal resolution of the CCD Chip.
*/
inline int getXRes() { return XRes; } inline int getXRes() { return XRes; }
/**
* @brief Get the vertical resolution in pixels of the CCD Chip.
* @return the horizontal resolution of the CCD Chip.
*/
inline int getYRes() { return YRes; } inline int getYRes() { return YRes; }
/**
* @brief getSubX Get the starting left coordinates (X) of the frame.
* @return the starting left coordinates (X) of the image.
*/
inline int getSubX() { return SubX; } inline int getSubX() { return SubX; }
/**
* @brief getSubY Get the starting top coordinates (Y) of the frame.
* @return the starting top coordinates (Y) of the image.
*/
inline int getSubY() { return SubY; } inline int getSubY() { return SubY; }
/**
* @brief getSubW Get the width of the frame
* @return unbinned width of the frame
*/
inline int getSubW() { return SubW; } inline int getSubW() { return SubW; }
/**
* @brief getSubH Get the height of the frame
* @return unbinned height of the frame
*/
inline int getSubH() { return SubH; } inline int getSubH() { return SubH; }
/**
* @brief getBinX Get horizontal binning of the CCD chip.
* @return horizontal binning of the CCD chip.
*/
inline int getBinX() { return BinX; } inline int getBinX() { return BinX; }
/**
* @brief getBinY Get vertical binning of the CCD chip.
* @return vertical binning of the CCD chip.
*/
inline int getBinY() { return BinY; } inline int getBinY() { return BinY; }
/**
* @brief getPixelSizeX Get horizontal pixel size in microns.
* @return horizontal pixel size in microns.
*/
inline float getPixelSizeX() { return PixelSizex; } inline float getPixelSizeX() { return PixelSizex; }
/**
* @brief getPixelSizeY Get vertical pixel size in microns.
* @return vertical pixel size in microns.
*/
inline float getPixelSizeY() { return PixelSizey; } inline float getPixelSizeY() { return PixelSizey; }
/**
* @brief getBPP Get CCD Chip depth (bits per pixel).
* @return bits per pixel.
*/
inline int getBPP() { return BPP; } inline int getBPP() { return BPP; }
/**
* @brief getFrameBufferSize Get allocated frame buffer size to hold th
e CCD image frame.
* @return allocated frame buffer size to hold the CCD image frame.
*/
inline int getFrameBufferSize() { return RawFrameSize; } inline int getFrameBufferSize() { return RawFrameSize; }
/**
* @brief getExposureLeft Get exposure time left in seconds.
* @return exposure time left in seconds.
*/
inline double getExposureLeft() { return ImageExposureN[0].value; } inline double getExposureLeft() { return ImageExposureN[0].value; }
/**
* @brief getExposureDuration Get requested exposure duration for the C
CD chip in seconds.
* @return requested exposure duration for the CCD chip in seconds.
*/
inline double getExposureDuration() { return exposureDuration; } inline double getExposureDuration() { return exposureDuration; }
/**
* @brief getExposureStartTime
* @return exposure start time in ISO 8601 format.
*/
const char *getExposureStartTime();
/**
* @brief getFrameBuffer Get raw frame buffer of the CCD chip.
* @return raw frame buffer of the CCD chip.
*/
inline char *getFrameBuffer() { return RawFrame; } inline char *getFrameBuffer() { return RawFrame; }
/**
* @brief isCompressed
* @return True if frame is compressed, false otherwise.
*/
inline bool isCompressed() { return SendCompressed; } inline bool isCompressed() { return SendCompressed; }
/**
* @brief isInterlaced
* @return True if CCD chip is Interlaced, false otherwise.
*/
inline bool isInterlaced() { return Interlaced; } inline bool isInterlaced() { return Interlaced; }
/**
* @brief getFrameType
* @return CCD Frame type
*/
inline CCD_FRAME getFrameType() { return FrameType; } inline CCD_FRAME getFrameType() { return FrameType; }
const char *getExposureStartTime();
/**
* @brief getFrameTypeName returns CCD Frame type name
* @param fType type of frame
* @return CCD Frame type name
*/
const char *getFrameTypeName(CCD_FRAME fType);
/**
* @brief setResolutoin set CCD Chip resolution
* @param x width
* @param y height
*/
void setResolutoin(int x, int y); void setResolutoin(int x, int y);
/**
* @brief setFrame Set desired frame resolutoin for an exposure.
* @param subx Left position.
* @param suby Top position.
* @param subw unbinned width of the frame.
* @param subh unbinned height of the frame.
*/
void setFrame(int subx, int suby, int subw, int subh); void setFrame(int subx, int suby, int subw, int subh);
/**
* @brief setBin Set CCD Chip binnig
* @param hor Horizontal binning.
* @param ver Vertical binning.
*/
void setBin(int hor, int ver); void setBin(int hor, int ver);
/**
* @brief setPixelSize Set CCD Chip pixel size
* @param x Horziontal pixel size in microns.
* @param y Vertical pixel size in microns.
*/
void setPixelSize(float x, float y); void setPixelSize(float x, float y);
/**
* @brief setCompressed Set whether a frame is compressed after exposur
e?
* @param cmp If true, compress frame.
*/
void setCompressed (bool cmp); void setCompressed (bool cmp);
/**
* @brief setInterlaced Set whether the CCD chip is interlaced or not?
* @param intr If true, the CCD chip is interlaced.
*/
void setInterlaced(bool intr); void setInterlaced(bool intr);
/**
* @brief setFrameBufferSize Set desired frame buffer size. The functio
n will allocate memory accordingly. The frame size depends on the
* desired frame resolution (Left, Top, Width, Height), depth of the CC
D chip (bpp), and binning settings. You must set the frame size any time
* any of the prior parameters gets updated.
* @param nbuf size of buffer in bytes.
*/
void setFrameBufferSize(int nbuf); void setFrameBufferSize(int nbuf);
/**
* @brief setBPP Set depth of CCD chip.
* @param bpp bits per pixel
*/
void setBPP(int bpp); void setBPP(int bpp);
int setFrameType(CCD_FRAME);
/**
* @brief setFrameType Set desired frame type for next exposure.
* @param type desired CCD frame type.
*/
void setFrameType(CCD_FRAME type);
/**
* @brief setExposureDuration Set desired CCD frame exposure duration f
or next exposure. You must call this function immediately before
* starting the actual exposure as it is used to calculate the timestam
p used for the FITS header.
* @param duration exposure duration in seconds.
*/
void setExposureDuration(double duration); void setExposureDuration(double duration);
/**
* @brief setExposureLeft Update exposure time left. Inform the client
of the new exposure time left value.
* @param duration exposure duration left in seconds.
*/
void setExposureLeft(double duration); void setExposureLeft(double duration);
/**
* @brief setExposureFailed Alert the client that the exposure failed.
*/
void setExposureFailed(); void setExposureFailed();
private: private:
int XRes; // native resolution of the ccd int XRes; // native resolution of the ccd
int YRes; // ditto int YRes; // ditto
int SubX; // left side of the subframe we are requesting int SubX; // left side of the subframe we are requesting
int SubY; // top of the subframe requested int SubY; // top of the subframe requested
int SubW; // width of the subframe int SubW; // UNBINNED width of the subframe
int SubH; // height of the subframe int SubH; // UNBINNED height of the subframe
int BinX; // Binning requested in the x direction int BinX; // Binning requested in the x direction
int BinY; // Binning requested in the Y direction int BinY; // Binning requested in the Y direction
float PixelSizex; // pixel size in microns, x direction float PixelSizex; // pixel size in microns, x direction
float PixelSizey; // pixel size in microns, y direction float PixelSizey; // pixel size in microns, y direction
int BPP; // Bytes per Pixel int BPP; // Bytes per Pixel
bool Interlaced; bool Interlaced;
char *RawFrame; char *RawFrame;
int RawFrameSize; int RawFrameSize;
bool SendCompressed; bool SendCompressed;
CCD_FRAME FrameType; CCD_FRAME FrameType;
skipping to change at line 192 skipping to change at line 364
\param x Subframe X coordinate in pixels. \param x Subframe X coordinate in pixels.
\param y Subframe Y coordinate in pixels. \param y Subframe Y coordinate in pixels.
\param w Subframe width in pixels. \param w Subframe width in pixels.
\param h Subframe height in pixels. \param h Subframe height in pixels.
\note (0,0) is defined as most left, top pixel in the subframe. \note (0,0) is defined as most left, top pixel in the subframe.
\return true is CCD chip update is successful, false otherwise. \return true is CCD chip update is successful, false otherwise.
\note This function is not implemented in INDI::CCD, it must be implemented in the child class \note This function is not implemented in INDI::CCD, it must be implemented in the child class
*/ */
virtual bool updateCCDFrame(int x, int y, int w, int h); virtual bool updateCCDFrame(int x, int y, int w, int h);
/** \brief INDI::CCD calls this function when Guide head frame dime
nsion is updated by the client. Derived classes should implement this funct
ion
\param x Subframe X coordinate in pixels.
\param y Subframe Y coordinate in pixels.
\param w Subframe width in pixels.
\param h Subframe height in pixels.
\note (0,0) is defined as most left, top pixel in the subframe.
\return true is CCD chip update is successful, false otherwise.
\note This function is not implemented in INDI::CCD, it must be
implemented in the child class
*/
virtual bool updateGuideFrame(int x, int y, int w, int h);
/** \brief INDI::CCD calls this function when CCD Binning needs to be updated in the hardware. Derived classes should implement this function /** \brief INDI::CCD calls this function when CCD Binning needs to be updated in the hardware. Derived classes should implement this function
\param hor Horizontal binning. \param hor Horizontal binning.
\param ver Vertical binning. \param ver Vertical binning.
\return true is CCD chip update is successful, false otherwise. \return true is CCD chip update is successful, false otherwise.
\note This function is not implemented in INDI::CCD, it must be implemented in the child class \note This function is not implemented in INDI::CCD, it must be implemented in the child class
*/ */
virtual bool updateCCDBin(int hor, int ver); virtual bool updateCCDBin(int hor, int ver);
/** \brief INDI::CCD calls this function when Guide head binning is
updated by the client. Derived classes should implement this function
\param hor Horizontal binning.
\param ver Vertical binning.
\return true is CCD chip update is successful, false otherwise.
\note This function is not implemented in INDI::CCD, it must be
implemented in the child class
*/
virtual bool updateGuideBin(int hor, int ver);
/** \brief INDI::CCD calls this function when CCD frame type needs to be updated in the hardware. /** \brief INDI::CCD calls this function when CCD frame type needs to be updated in the hardware.
\param fType Frame type \param fType Frame type
\return true is CCD chip update is successful, false otherwise. \return true is CCD chip update is successful, false otherwise.
\note It is \e not mandotary to implement this function in the child class. The CCD hardware layer may either set the frame type when this function \note It is \e not mandotary to implement this function in the child class. The CCD hardware layer may either set the frame type when this function
is called, or (optionally) before an exposure is started. is called, or (optionally) before an exposure is started.
*/ */
virtual bool updateCCDFrameType(CCDChip::CCD_FRAME fType); virtual bool updateCCDFrameType(CCDChip::CCD_FRAME fType);
/** \brief INDI::CCD calls this function when Guide frame type is u
pdated by the client.
\param fType Frame type
\return true is CCD chip update is successful, false otherwise.
\note It is \e not mandotary to implement this function in the
child class. The CCD hardware layer may either set the frame type when this
function
is called, or (optionally) before an exposure is started.
*/
virtual bool updateGuideFrameType(CCDChip::CCD_FRAME fType);
/** \brief Setup CCD paramters for primary CCD. Child classes call this function to update CCD paramaters /** \brief Setup CCD paramters for primary CCD. Child classes call this function to update CCD paramaters
\param x Frame X coordinates in pixels. \param x Frame X coordinates in pixels.
\param y Frame Y coordinates in pixels. \param y Frame Y coordinates in pixels.
\param bpp Bits Per Pixels. \param bpp Bits Per Pixels.
\param xf X pixel size in microns. \param xf X pixel size in microns.
\param yf Y pixel size in microns. \param yf Y pixel size in microns.
*/ */
virtual void SetCCDParams(int x,int y,int bpp,float xf,float yf); virtual void SetCCDParams(int x,int y,int bpp,float xf,float yf);
/** \brief Setup CCD paramters for guide head CCD. Child classes ca ll this function to update CCD paramaters /** \brief Setup CCD paramters for guide head CCD. Child classes ca ll this function to update CCD paramaters
\param x Frame X coordinates in pixels. \param x Frame X coordinates in pixels.
\param y Frame Y coordinates in pixels. \param y Frame Y coordinates in pixels.
\param bpp Bits Per Pixels. \param bpp Bits Per Pixels.
\param xf X pixel size in microns. \param xf X pixel size in microns.
\param yf Y pixel size in microns. \param yf Y pixel size in microns.
*/ */
virtual void SetGuidHeadParams(int x,int y,int bpp,float xf,float y f); virtual void SetGuideHeadParams(int x,int y,int bpp,float xf,float yf);
/** \brief Guide northward for ms milliseconds /** \brief Guide northward for ms milliseconds
\param ms Duration in milliseconds. \param ms Duration in milliseconds.
\note This function is not implemented in INDI::CCD, it must be implemented in the child class \note This function is not implemented in INDI::CCD, it must be implemented in the child class
\return True if successful, false otherwise. \return True if successful, false otherwise.
*/ */
virtual bool GuideNorth(float ms); virtual bool GuideNorth(float ms);
/** \brief Guide southward for ms milliseconds /** \brief Guide southward for ms milliseconds
\param ms Duration in milliseconds. \param ms Duration in milliseconds.
skipping to change at line 278 skipping to change at line 477
<li>DATE-OBS: UTC start date of observation</li> <li>DATE-OBS: UTC start date of observation</li>
</ul> </ul>
To add additional information, override this function in the ch ild class and ensure to call INDI::CCD::addFITSKeywords. To add additional information, override this function in the ch ild class and ensure to call INDI::CCD::addFITSKeywords.
*/ */
virtual void addFITSKeywords(fitsfile *fptr, CCDChip *targetChip); virtual void addFITSKeywords(fitsfile *fptr, CCDChip *targetChip);
/* A function to just remove GCC warnings about deprecated conversi on */ /* A function to just remove GCC warnings about deprecated conversi on */
void fits_update_key_s(fitsfile* fptr, int type, std::string name, void* p, std::string explanation, int* status); void fits_update_key_s(fitsfile* fptr, int type, std::string name, void* p, std::string explanation, int* status);
/**
* @brief activeDevicesUpdated Inform children that ActiveDevices p
roperty was updated so they can snoop on the updated devices if desired.
*/
virtual void activeDevicesUpdated() {}
virtual bool saveConfigItems(FILE *fp); virtual bool saveConfigItems(FILE *fp);
float RA; float RA;
float Dec; float Dec;
bool HasGuideHead; bool HasGuideHead;
bool HasSt4Port; bool HasSt4Port;
bool InExposure; bool InExposure;
bool InGuideExposure;
CCDChip PrimaryCCD; CCDChip PrimaryCCD;
CCDChip GuideCCD; CCDChip GuideCCD;
// We are going to snoop these from a telescope // We are going to snoop these from a telescope
INumberVectorProperty EqNP; INumberVectorProperty EqNP;
INumber EqN[2]; INumber EqN[2];
ITextVectorProperty *ActiveDeviceTP; ITextVectorProperty *ActiveDeviceTP;
IText ActiveDeviceT[2]; IText ActiveDeviceT[2];
 End of changes. 38 change blocks. 
5 lines changed or deleted 229 lines changed or added


 indidevapi.h   indidevapi.h 
skipping to change at line 447 skipping to change at line 447
/** \brief Returns the first ON switch it finds in the vector switch proper ty. /** \brief Returns the first ON switch it finds in the vector switch proper ty.
* \note This is only valid for ISR_1OFMANY mode. That is, when only one s witch out of many is allowed to be ON. Do not use this function if you can have multiple ON switches in the same vector property. * \note This is only valid for ISR_1OFMANY mode. That is, when only one s witch out of many is allowed to be ON. Do not use this function if you can have multiple ON switches in the same vector property.
* *
* \param sp a pointer to a switch vector property. * \param sp a pointer to a switch vector property.
* \return a pointer to the \e first ON ISwitch member if found. If all swit ches are off, NULL is returned. * \return a pointer to the \e first ON ISwitch member if found. If all swit ches are off, NULL is returned.
*/ */
extern ISwitch *IUFindOnSwitch (const ISwitchVectorProperty *sp); extern ISwitch *IUFindOnSwitch (const ISwitchVectorProperty *sp);
/** \brief Returns the index of the string in a string array
*
* \param needle the string to match against each element in the hay
* \param hay a pointer to a string array to search in
* \param n the size of hay
* \return index of needle if found in the hay. Otherwise -1 if not found.
*/
extern int IUFindIndex (const char *needle, char **hay, unsigned int n);
/** \brief Returns the index of first ON switch it finds in the vector swit ch property. /** \brief Returns the index of first ON switch it finds in the vector swit ch property.
* \note This is only valid for ISR_1OFMANY mode. That is, when only one s witch out of many is allowed to be ON. Do not use this function if you can have multiple ON switches in the same vector property. * \note This is only valid for ISR_1OFMANY mode. That is, when only one s witch out of many is allowed to be ON. Do not use this function if you can have multiple ON switches in the same vector property.
* *
* \param sp a pointer to a switch vector property. * \param sp a pointer to a switch vector property.
* \return index to the \e first ON ISwitch member if found. If all switches are off, -1 is returned. * \return index to the \e first ON ISwitch member if found. If all switches are off, -1 is returned.
*/ */
extern int IUFindOnSwitchIndex (const ISwitchVectorProperty *sp); extern int IUFindOnSwitchIndex (const ISwitchVectorProperty *sp);
 End of changes. 1 change blocks. 
0 lines changed or deleted 9 lines changed or added


 indifilterinterface.h   indifilterinterface.h 
skipping to change at line 33 skipping to change at line 33
#include "indibase.h" #include "indibase.h"
/** /**
* \class INDI::FilterInterface * \class INDI::FilterInterface
\brief Provides interface to implement Filter Wheel functionality. \brief Provides interface to implement Filter Wheel functionality.
A filter wheel can be an independent device, or an embedded filter wheel within another device (e.g. CCD camera). Child class must implement all th e A filter wheel can be an independent device, or an embedded filter wheel within another device (e.g. CCD camera). Child class must implement all th e
pure virtual functions and call SelectFilterDone(int) when selection of a new filter position is complete in the hardware. pure virtual functions and call SelectFilterDone(int) when selection of a new filter position is complete in the hardware.
initFilterProperties() must be called before any other function to initi \e IMPORTANT: initFilterProperties() must be called before any other fun
lize the filter properties. ction to initilize the filter properties.
\e IMPORTANT: processFilterSlot() must be called in your driver's ISNewN
umber() function. processFilterSlot() will call the driver's
SelectFilter() accordingly.
\note Filter position starts from 1 and \e not 0 \note Filter position starts from 1 and \e not 0
\author Gerry Rozema, Jasem Mutlaq \author Gerry Rozema, Jasem Mutlaq
*/ */
class INDI::FilterInterface class INDI::FilterInterface
{ {
public: public:
/** \brief Return current filter position */ /** \brief Return current filter position */
virtual int QueryFilter() = 0; virtual int QueryFilter() = 0;
/** \brief Select a new filter position /** \brief Select a new filter position
\return True if operation is successful, false otherwise */ \return True if operation is successful, false otherwise */
virtual bool SelectFilter(int position) = 0; virtual bool SelectFilter(int position) = 0;
/** \brief Set filter names as defined by the client for each filter po sition. /** \brief Set filter names as defined by the client for each filter po sition.
Filter names should be saved in hardware if possible. The desired filter names are stored in FilterNameTP property. Filt
\return True if successful, false if supported or failed operation er names should be saved in hardware if possible.
*/ \return True if successful, false if supported or failed operation
*/
virtual bool SetFilterNames() = 0; virtual bool SetFilterNames() = 0;
/** \brief Obtains a list of filter names from the hardware and initili zes the FilterNameTP property. The function should check for the number of filters /** \brief Obtains a list of filter names from the hardware and initili zes the FilterNameTP property. The function should check for the number of filters
available in the filter wheel and build the FilterNameTP property acc ordingly. available in the filter wheel and build the FilterNameTP property acc ordingly.
\param groupName group name for FilterNameTP property to be created. \param groupName group name for FilterNameTP property to be created.
\return True if successful, false if unsupported or failed operation \return True if successful, false if unsupported or failed operation
\see QSI CCD implementation of the FilterInterface. QSI CCD is availa ble as a 3rd party INDI driver. \see QSI CCD implementation of the FilterInterface. QSI CCD is availa ble as a 3rd party INDI driver.
*/ */
virtual bool GetFilterNames(const char* groupName) = 0; virtual bool GetFilterNames(const char* groupName) = 0;
skipping to change at line 80 skipping to change at line 84
FilterInterface(); FilterInterface();
~FilterInterface(); ~FilterInterface();
/** \brief Initilize filter wheel properties. It is recommended to call this function within initProperties() of your primary device /** \brief Initilize filter wheel properties. It is recommended to call this function within initProperties() of your primary device
\param deviceName Name of the primary device \param deviceName Name of the primary device
\param groupName Group or tab name to be used to define filter whee l properties. \param groupName Group or tab name to be used to define filter whee l properties.
*/ */
void initFilterProperties(const char *deviceName, const char* groupName ); void initFilterProperties(const char *deviceName, const char* groupName );
/** \brief Process client request to change filter position. Call this function in the filter wheel /** \brief Process client request to change filter position. Call this function in the filter wheel
implementation class ISNewNumber function. This is a convenience f implementation class ISNewNumber function.
unction only, you can process FilterSlotNP \param deviceName Name of the primary device
in the child class. \param values values from ISNewNumber().
\param name property name from ISNewNumber(); \param names names from ISNewNumber();
*/
void processFilterSlot(const char *deviceName, double values[], char *n
ames[]);
/** \brief Process client request to change filter name(s). Call this f
unction in the filter wheel
implementation class ISNewNumber() function.
\param deviceName Name of the primary device
\param values values from ISNewNumber(). \param values values from ISNewNumber().
\param names names from ISNewNumber(); \param names names from ISNewNumber();
\param n n from ISNewNumber(); \param n n from ISNewNumber();
*/ */
void processFilterProperties(const char *name, double values[], char *n ames[], int n); void processFilterName(const char *deviceName, char *texts[], char *nam es[], int n);
INumberVectorProperty FilterSlotNP; // A number vector for filter sl ot INumberVectorProperty FilterSlotNP; // A number vector for filter sl ot
INumber FilterSlotN[1]; INumber FilterSlotN[1];
ITextVectorProperty *FilterNameTP; // A text vector that stores out ph ysical port name ITextVectorProperty *FilterNameTP; // A text vector that stores out ph ysical port name
IText *FilterNameT; IText *FilterNameT;
int MinFilter;
int MaxFilter;
int CurrentFilter; int CurrentFilter;
int TargetFilter; int TargetFilter;
}; };
#endif // INDIFILTERINTERFACE_H #endif // INDIFILTERINTERFACE_H
 End of changes. 5 change blocks. 
12 lines changed or deleted 23 lines changed or added


 indifocuser.h   indifocuser.h 
/************************************************************************** ***** /************************************************************************** *****
Copyright(c) 2011 Gerry Rozema. All rights reserved. Copyright(c) 2013 Jasem Mutlaq. All rights reserved.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation. License version 2 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details. Library General Public License for more details.
skipping to change at line 28 skipping to change at line 28
#ifndef INDIFOCUSSER_H #ifndef INDIFOCUSSER_H
#define INDIFOCUSSER_H #define INDIFOCUSSER_H
#include "defaultdevice.h" #include "defaultdevice.h"
/** /**
* \class INDI::Focuser * \class INDI::Focuser
\brief Class to provide general functionality of a focuser device. \brief Class to provide general functionality of a focuser device.
Both relative and absolute focuser supported. Furthermore, if no positio
n feedback is available from the focuser,
an open-loop control is possible using timers, speed presets, and direct
ion of motion.
Developers need to subclass INDI::Focuser to implement any driver for fo cusers within INDI. Developers need to subclass INDI::Focuser to implement any driver for fo cusers within INDI.
\author Jasem Mutlaq
\author Gerry Rozema \author Gerry Rozema
*/ */
class INDI::Focuser : public INDI::DefaultDevice class INDI::Focuser : public INDI::DefaultDevice
{ {
public: public:
Focuser(); Focuser();
virtual ~Focuser(); virtual ~Focuser();
enum FocusDirection { FOCUS_INWARD, FOCUS_OUTWARD }; enum FocusDirection { FOCUS_INWARD, FOCUS_OUTWARD };
 End of changes. 3 change blocks. 
1 lines changed or deleted 6 lines changed or added


 indiguiderinterface.h   indiguiderinterface.h 
skipping to change at line 30 skipping to change at line 30
#ifndef GUIDERINTERFACE_H #ifndef GUIDERINTERFACE_H
#define GUIDERINTERFACE_H #define GUIDERINTERFACE_H
#include "indibase.h" #include "indibase.h"
/** /**
* \class INDI::GuiderInterface * \class INDI::GuiderInterface
\brief Provides interface to implement guider (ST4) port functionality. \brief Provides interface to implement guider (ST4) port functionality.
initGuiderProperties() must be called before any other function to initi \e IMPORTANT: initGuiderProperties() must be called before any other fun
lize the guider properties. ction to initilize the guider properties.
\e IMPORATNT: processGuiderProperties() must be called in your driver's
ISNewNumber(..) function. processGuiderProperties() will call the guide fun
ctions
GuideXXXX functions accordingly to the driver.
\author Jasem Mutlaq \author Jasem Mutlaq
*/ */
class INDI::GuiderInterface class INDI::GuiderInterface
{ {
public: public:
/** \brief Guide north for ms milliseconds /** \brief Guide north for ms milliseconds
\return True if OK, false otherwise \return True if OK, false otherwise
skipping to change at line 70 skipping to change at line 73
GuiderInterface(); GuiderInterface();
~GuiderInterface(); ~GuiderInterface();
/** \brief Initilize guider properties. It is recommended to call this function within initProperties() of your primary device /** \brief Initilize guider properties. It is recommended to call this function within initProperties() of your primary device
\param deviceName Name of the primary device \param deviceName Name of the primary device
\param groupName Group or tab name to be used to define guider prop erties. \param groupName Group or tab name to be used to define guider prop erties.
*/ */
void initGuiderProperties(const char *deviceName, const char* groupName ); void initGuiderProperties(const char *deviceName, const char* groupName );
/** \brief Call this function whenever client updates GuideNSP or Guide WSP properties in the primary device. This function then takes care of issu ing the corresponding /** \brief Call this function whenever client updates GuideNSNP or Guid eWSP properties in the primary device. This function then takes care of iss uing the corresponding
* GuideXXXX function accordingly. * GuideXXXX function accordingly.
* \param name device name * \param name device name
* \param values value as passed by the client * \param values value as passed by the client
* \param names names as passed by the client * \param names names as passed by the client
* \param n number of values and names pair to process. * \param n number of values and names pair to process.
*/ */
void processGuiderProperties(const char *name, double values[], char *n ames[], int n); void processGuiderProperties(const char *name, double values[], char *n ames[], int n);
INumber GuideNS[2]; INumber GuideNSN[2];
INumberVectorProperty GuideNSP; INumberVectorProperty GuideNSNP;
INumber GuideEW[2]; INumber GuideWEN[2];
INumberVectorProperty GuideEWP; INumberVectorProperty GuideWENP;
}; };
#endif // GUIDERINTERFACE_H #endif // GUIDERINTERFACE_H
 End of changes. 3 change blocks. 
7 lines changed or deleted 12 lines changed or added


 indiproperty.h   indiproperty.h 
/**************************************************************************
*****
Copyright(c) 2011 Jasem Mutlaq. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
***************************************************************************
****/
#ifndef INDI_INDIPROPERTY_H #ifndef INDI_INDIPROPERTY_H
#define INDI_INDIPROPERTY_H #define INDI_INDIPROPERTY_H
#include "indibase.h" #include "indibase.h"
namespace INDI namespace INDI
{ {
class BaseDevice; class BaseDevice;
 End of changes. 1 change blocks. 
0 lines changed or deleted 20 lines changed or added


 inditelescope.h   inditelescope.h 
skipping to change at line 22 skipping to change at line 22
You should have received a copy of the GNU Library General Public License You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*************************************************************************** ****/ *************************************************************************** ****/
#ifndef INDI_TELESCOPE_H #ifndef INDI_TELESCOPE_H
#define INDI_TELESCOPE_H #define INDI_TELESCOPE_H
#include <libnova.h>
#include "defaultdevice.h" #include "defaultdevice.h"
/** /**
* \class INDI::Telescope * \class INDI::Telescope
\brief Class to provide general functionality of a telescope device. \brief Class to provide general functionality of a telescope device.
Developers need to subclass INDI::Telescope to implement any driver for telescopes within INDI. Developers need to subclass INDI::Telescope to implement any driver for telescopes within INDI.
Implementing a basic telescope driver involves the child class performin g the following steps: Implementing a basic telescope driver involves the child class performin g the following steps:
<ul> <ul>
skipping to change at line 60 skipping to change at line 62
virtual ~Telescope(); virtual ~Telescope();
enum TelescopeStatus { SCOPE_IDLE, SCOPE_SLEWING, SCOPE_TRACKING, S COPE_PARKING, SCOPE_PARKED }; enum TelescopeStatus { SCOPE_IDLE, SCOPE_SLEWING, SCOPE_TRACKING, S COPE_PARKING, SCOPE_PARKED };
enum TelescopeMotionNS { MOTION_NORTH, MOTION_SOUTH }; enum TelescopeMotionNS { MOTION_NORTH, MOTION_SOUTH };
enum TelescopeMotionWE { MOTION_WEST, MOTION_EAST }; enum TelescopeMotionWE { MOTION_WEST, MOTION_EAST };
virtual bool ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n); virtual bool ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n);
virtual bool ISNewText (const char *dev, const char *name, char *te xts[], char *names[], int n); virtual bool ISNewText (const char *dev, const char *name, char *te xts[], char *names[], int n);
virtual bool ISNewSwitch (const char *dev, const char *name, ISStat e *states, char *names[], int n); virtual bool ISNewSwitch (const char *dev, const char *name, ISStat e *states, char *names[], int n);
virtual void ISGetProperties (const char *dev); virtual void ISGetProperties (const char *dev);
virtual bool ISSnoopDevice(XMLEle *root);
/** \brief Called to initialize basic properties required all the t ime */ /** \brief Called to initialize basic properties required all the t ime */
virtual bool initProperties(); virtual bool initProperties();
/** \brief Called when connected state changes, to add/remove prope rties */ /** \brief Called when connected state changes, to add/remove prope rties */
virtual bool updateProperties(); virtual bool updateProperties();
/** \brief Called when setTimer() time is up */ /** \brief Called when setTimer() time is up */
virtual void TimerHit(); virtual void TimerHit();
/** \brief Connect to the telescope. /** \brief Connect to the telescope.
skipping to change at line 152 skipping to change at line 155
*\note This function defaults to return false unless subclassed by the child class. *\note This function defaults to return false unless subclassed by the child class.
*/ */
virtual bool Park(); virtual bool Park();
/** \brief Abort telescope motion /** \brief Abort telescope motion
\return True if successful, false otherewise \return True if successful, false otherewise
\note This function is not implemented in INDI::Telescope, it m ust be implemented in the child class \note This function is not implemented in INDI::Telescope, it m ust be implemented in the child class
*/ */
virtual bool Abort()=0; virtual bool Abort()=0;
/** \brief Update telescope time, date, and UTC offset.
* \param utc UTC time.
* \param utc_offset UTC offset in hours.
\return True if successful, false otherewise
\note This function performs no action unless subclassed by the
child class if required.
*/
virtual bool updateTime(ln_date *utc, double utc_offset);
/** \brief Update telescope location settings
* \param latitude Site latitude in degrees.
* \param longitude Site latitude in degrees increasing eastward f
rom Greenwich (0 to 360).
* \param elevation Site elevation in meters.
\return True if successful, false otherewise
\note This function performs no action unless subclassed by the
child class if required.
*/
virtual bool updateLocation(double latitude, double longitude, doub
le elevation);
// Since every mount I know of actually uses a serial port for con trol // Since every mount I know of actually uses a serial port for con trol
// We put the serial helper into the base telescope class // We put the serial helper into the base telescope class
// One less piece to worry about in the hardware specific // One less piece to worry about in the hardware specific
// low level stuff // low level stuff
int PortFD; int PortFD;
// This is a variable filled in by the ReadStatus telescope // This is a variable filled in by the ReadStatus telescope
// low level code, used to report current state // low level code, used to report current state
// are we slewing, tracking, or parked. // are we slewing, tracking, or parked.
TelescopeStatus TrackState; TelescopeStatus TrackState;
// All telescopes should produce equatorial co-ordinates // All telescopes should produce equatorial co-ordinates
INumberVectorProperty EqNV; INumberVectorProperty EqNP;
INumber EqN[2]; INumber EqN[2];
ISwitchVectorProperty AbortSV; // Abort motion ISwitchVectorProperty AbortSP; // Abort motion
ISwitch AbortS[1]; ISwitch AbortS[1];
ISwitchVectorProperty CoordSV; // A switch vector that stores how we should readct ISwitchVectorProperty CoordSP; // A switch vector that stores how we should readct
ISwitch CoordS[3]; // On a coord_set message, sync, o r slew ISwitch CoordS[3]; // On a coord_set message, sync, o r slew
ISwitchVectorProperty ConfigSV; // A switch vector that stores how we should readct ISwitchVectorProperty ConfigSP; // A switch vector that stores how we should readct
ISwitch ConfigS[3]; // On a coord_set message, sync, or slew ISwitch ConfigS[3]; // On a coord_set message, sync, or slew
INumberVectorProperty LocationNV; // A number vector that stores INumberVectorProperty LocationNP; // A number vector that stores
lattitude and longitude lattitude and longitude
INumber LocationN[2]; INumber LocationN[3];
ISwitchVectorProperty ParkSV; // A Switch in the client interface to park the scope ISwitchVectorProperty ParkSP; // A Switch in the client interface to park the scope
ISwitch ParkS[1]; ISwitch ParkS[1];
ITextVectorProperty PortTP; // A text vector that stores out physi cal port name ITextVectorProperty PortTP; // A text vector that stores out physi cal port name
IText PortT[1]; IText PortT[1];
ISwitch MovementNSS[2]; // A switch for North/South motion ISwitch MovementNSS[2]; // A switch for North/South motion
ISwitchVectorProperty MovementNSSP; ISwitchVectorProperty MovementNSSP;
ISwitch MovementWES[2]; // A switch for West/East motion ISwitch MovementWES[2]; // A switch for West/East motion
ISwitchVectorProperty MovementWESP; ISwitchVectorProperty MovementWESP;
INumber ScopeParametersN[4]; INumber ScopeParametersN[4];
INumberVectorProperty ScopeParametersNP; INumberVectorProperty ScopeParametersNP;
IText TimeT[2];
ITextVectorProperty TimeTP;
}; };
#endif // INDI::Telescope_H #endif // INDI::Telescope_H
 End of changes. 10 change blocks. 
8 lines changed or deleted 35 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/