basedevice.h   basedevice.h 
skipping to change at line 106 skipping to change at line 106
returned. returned.
*/ */
INDI::Property * getProperty(const char *name, INDI_TYPE type = INDI_UN KNOWN); INDI::Property * getProperty(const char *name, INDI_TYPE type = INDI_UN KNOWN);
/** \brief Return a list of all properties in the device. /** \brief Return a list of all properties in the device.
*/ */
std::vector<INDI::Property *> * getProperties() { return &pAll; } std::vector<INDI::Property *> * getProperties() { return &pAll; }
/** \brief Build driver properties from a skeleton file. /** \brief Build driver properties from a skeleton file.
\param filename full path name of the file. \param filename full path name of the file.
\return true if successful, false otherwise.
A skeloton file defines the properties supported by this driver. It is a list of defXXX elements enclosed by @<INDIDriver>@ A skeloton file defines the properties supported by this driver. It is a list of defXXX elements enclosed by @<INDIDriver>@
and @</INDIDriver>@ opening and closing tags. After the properties are cre ated, they can be rerieved, manipulated, and defined and @</INDIDriver>@ opening and closing tags. After the properties are cre ated, they can be rerieved, manipulated, and defined
to other clients. to other clients.
\see An example skeleton file can be found under examples/tutorial_four_sk .xml \see An example skeleton file can be found under examples/tutorial_four_sk .xml
*/ */
void buildSkeleton(const char *filename); bool buildSkeleton(const char *filename);
/** \return True if the device is connected (CONNECT=ON), False otherwi se */ /** \return True if the device is connected (CONNECT=ON), False otherwi se */
bool isConnected(); bool isConnected();
/** \brief Set the device name /** \brief Set the device name
\param dev new device name \param dev new device name
*/ */
void setDeviceName(const char *dev); void setDeviceName(const char *dev);
/** \return Returns the device name */ /** \return Returns the device name */
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 defaultdevice.h   defaultdevice.h 
skipping to change at line 230 skipping to change at line 230
\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 ISSnoopDevice (XMLEle *root) { return false;} virtual bool ISSnoopDevice (XMLEle *root) { return false;}
protected: protected:
// Configuration // Configuration
/** \brief Load the last saved configuration file /** \brief Load the last saved configuration file
* \param silent if true, don't report any error or messages.
\return True if successful, false otherwise. \return True if successful, false otherwise.
*/ */
virtual bool loadConfig(); virtual bool loadConfig(bool silent=false);
/** \brief Save the current properties in a configuration file /** \brief Save the current properties in a configuration file
\return True if successful, false otherwise. \return True if successful, false otherwise.
*/ */
virtual bool saveConfig(); virtual bool saveConfig();
virtual bool saveConfigItems(FILE *fp); virtual bool saveConfigItems(FILE *fp);
/** \brief Load the default configuration file /** \brief Load the default configuration file
\return True if successful, false otherwise. \return True if successful, false otherwise.
*/ */
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 indibase.h   indibase.h 
skipping to change at line 43 skipping to change at line 43
\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 FocuserInterface;
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 Controller;
class Logger; class Logger;
} }
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 indiccd.h   indiccd.h 
/************************************************************************** ***** /************************************************************************** *****
Copyright(c) 2010, 2011 Gerry Rozema, Jasem Mutlaq. All rights reserved. Copyright(c) 2010, 2011 Gerry Rozema, Jasem Mutlaq. All rights reserved.
Rapid Guide support added by CloudMakers, s. r. o.
Copyright(c) 2013 CloudMakers, s. r. o. All rights reserved.
Star detection algorithm is based on PHD Guiding by Craig Stark
Copyright (c) 2006-2010 Craig Stark. 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 31 skipping to change at line 37
#include <fitsio.h> #include <fitsio.h>
#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 *RAPIDGUIDE_TAB;
/** /**
* @brief The CCDChip class provides functionality of a CCD Chip within a C CD. * @brief The CCDChip class provides functionality of a CCD Chip within a C CD.
* *
*/ */
class CCDChip class CCDChip
{ {
public: public:
CCDChip(); CCDChip();
skipping to change at line 146 skipping to change at line 152
*/ */
const char *getExposureStartTime(); const char *getExposureStartTime();
/** /**
* @brief getFrameBuffer Get raw frame buffer of the CCD chip. * @brief getFrameBuffer Get raw frame buffer of the CCD chip.
* @return 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 setFrameBuffer Set raw frame buffer pointer.
* @param buffer pointer to frame buffer
* /note CCD Chip allocates the frame buffer internally once SetFrameBu
fferSize is called with allocMem set to true which is the default behavior.
* If you allocated the memory yourself (i.e. allocMem is false),
then you must call this function to set the pointer to the raw frame buffe
r.
*/
void setFrameBuffer(char *buffer) { RawFrame = buffer; }
/**
* @brief isCompressed * @brief isCompressed
* @return True if frame is compressed, false otherwise. * @return True if frame is compressed, false otherwise.
*/ */
inline bool isCompressed() { return SendCompressed; } inline bool isCompressed() { return SendCompressed; }
/** /**
* @brief isInterlaced * @brief isInterlaced
* @return True if CCD chip is Interlaced, false otherwise. * @return True if CCD chip is Interlaced, false otherwise.
*/ */
inline bool isInterlaced() { return Interlaced; } inline bool isInterlaced() { return Interlaced; }
skipping to change at line 171 skipping to change at line 185
inline CCD_FRAME getFrameType() { return FrameType; } inline CCD_FRAME getFrameType() { return FrameType; }
/** /**
* @brief getFrameTypeName returns CCD Frame type name * @brief getFrameTypeName returns CCD Frame type name
* @param fType type of frame * @param fType type of frame
* @return CCD Frame type name * @return CCD Frame type name
*/ */
const char *getFrameTypeName(CCD_FRAME fType); const char *getFrameTypeName(CCD_FRAME fType);
/** /**
* @brief setResolutoin set CCD Chip resolution * @brief setResolution set CCD Chip resolution
* @param x width * @param x width
* @param y height * @param y height
*/ */
void setResolutoin(int x, int y); void setResolution(int x, int y);
/** /**
* @brief setFrame Set desired frame resolutoin for an exposure. * @brief setFrame Set desired frame resolutoin for an exposure.
* @param subx Left position. * @param subx Left position.
* @param suby Top position. * @param suby Top position.
* @param subw unbinned width of the frame. * @param subw unbinned width of the frame.
* @param subh unbinned height 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 * @brief setBin Set CCD Chip binnig
* @param hor Horizontal binning. * @param hor Horizontal binning.
* @param ver Vertical binning. * @param ver Vertical binning.
*/ */
void setBin(int hor, int ver); void setBin(int hor, int ver);
/** /**
* @brief setMaxBin Set Maximum CCD Chip binning
* @param max_hor Maximum horizontal binning
* @param max_ver Maximum vertical binning
*/
void setMaxBin(int max_hor, int max_ver);
/**
* @brief setPixelSize Set CCD Chip pixel size * @brief setPixelSize Set CCD Chip pixel size
* @param x Horziontal pixel size in microns. * @param x Horziontal pixel size in microns.
* @param y Vertical 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? * @brief setCompressed Set whether a frame is compressed after exposur e?
* @param cmp If true, compress frame. * @param cmp If true, compress frame.
*/ */
skipping to change at line 217 skipping to change at line 238
* @brief setInterlaced Set whether the CCD chip is interlaced or not? * @brief setInterlaced Set whether the CCD chip is interlaced or not?
* @param intr If true, the CCD chip is interlaced. * @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 * @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 * 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. * any of the prior parameters gets updated.
* @param nbuf size of buffer in bytes. * @param nbuf size of buffer in bytes.
* @param allocMem if True, it will allocate memory of nbut size bytes.
*/ */
void setFrameBufferSize(int nbuf); void setFrameBufferSize(int nbuf, bool allocMem=true);
/** /**
* @brief setBPP Set depth of CCD chip. * @brief setBPP Set depth of CCD chip.
* @param bpp bits per pixel * @param bpp bits per pixel
*/ */
void setBPP(int bpp); void setBPP(int bpp);
/** /**
* @brief setFrameType Set desired frame type for next exposure. * @brief setFrameType Set desired frame type for next exposure.
* @param type desired CCD frame type. * @param type desired CCD frame type.
skipping to change at line 250 skipping to change at line 272
* @brief setExposureLeft Update exposure time left. Inform the client of the new exposure time left value. * @brief setExposureLeft Update exposure time left. Inform the client of the new exposure time left value.
* @param duration exposure duration left in seconds. * @param duration exposure duration left in seconds.
*/ */
void setExposureLeft(double duration); void setExposureLeft(double duration);
/** /**
* @brief setExposureFailed Alert the client that the exposure failed. * @brief setExposureFailed Alert the client that the exposure failed.
*/ */
void setExposureFailed(); void setExposureFailed();
/**
* @return Get number of FITS axis in image. By default 2
*/
int getNAxis() const;
/**
* @brief setNAxis Set FITS number of axis
* @param value number of axis
*/
void setNAxis(int value);
/**
* @brief setImageExtension Set image exntension
* @param ext extension (fits, jpeg, raw..etc)
*/
void setImageExtension(const char *ext);
/**
* @return Return image extension (fits, jpeg, raw..etc)
*/
char *getImageExtension() { return imageExtention;}
/**
* @return True if CCD is currently exposing, false otherwise.
*/
bool isExposing() { return (ImageExposureNP->s == IPS_BUSY); }
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; // UNBINNED width of the subframe int SubW; // UNBINNED width of the subframe
int SubH; // UNBINNED 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
int NAxis; // # of Axis
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;
double exposureDuration; double exposureDuration;
timeval startExposureTime; timeval startExposureTime;
int lastRapidX;
int lastRapidY;
char imageExtention[MAXINDIBLOBFMT];
INumberVectorProperty *ImageExposureNP; INumberVectorProperty *ImageExposureNP;
INumber ImageExposureN[1]; INumber ImageExposureN[1];
ISwitchVectorProperty *AbortExposureSP; ISwitchVectorProperty *AbortExposureSP;
ISwitch AbortExposureS[1]; ISwitch AbortExposureS[1];
INumberVectorProperty *ImageFrameNP; INumberVectorProperty *ImageFrameNP;
INumber ImageFrameN[4]; INumber ImageFrameN[4];
INumberVectorProperty *ImageBinNP; INumberVectorProperty *ImageBinNP;
INumber ImageBinN[2]; INumber ImageBinN[2];
INumberVectorProperty *ImagePixelSizeNP; INumberVectorProperty *ImagePixelSizeNP;
INumber ImagePixelSizeN[6]; INumber ImagePixelSizeN[6];
ISwitch FrameTypeS[4]; ISwitch FrameTypeS[5];
ISwitchVectorProperty *FrameTypeSP; ISwitchVectorProperty *FrameTypeSP;
ISwitch CompressS[2]; ISwitch CompressS[2];
ISwitchVectorProperty *CompressSP; ISwitchVectorProperty *CompressSP;
IBLOB FitsB; IBLOB FitsB;
IBLOBVectorProperty *FitsBP; IBLOBVectorProperty *FitsBP;
ISwitch RapidGuideS[2];
ISwitchVectorProperty *RapidGuideSP;
ISwitch RapidGuideSetupS[3];
ISwitchVectorProperty *RapidGuideSetupSP;
INumber RapidGuideDataN[3];
INumberVectorProperty *RapidGuideDataNP;
friend class INDI::CCD; friend class INDI::CCD;
}; };
/** /**
* \class INDI::CCD * \class INDI::CCD
\brief Class to provide general functionality of CCD cameras with a sing le CCD sensor, or a primary CCD sensor in addition to a secondary CCD guide head. \brief Class to provide general functionality of CCD cameras with a sing le CCD sensor, or a primary CCD sensor in addition to a secondary CCD guide head.
It also implements the interface to perform guiding. The class enable th e ability to \e snoop on telescope equatorial coordinates and record them i n the It also implements the interface to perform guiding. The class enable th e ability to \e snoop on telescope equatorial coordinates and record them i n the
FITS file before upload. Developers need to subclass INDI::CCD to implem ent any driver for CCD cameras within INDI. FITS file before upload. Developers need to subclass INDI::CCD to implem ent any driver for CCD cameras within INDI.
\author Gerry Rozema, Jasem Mutlaq \author Gerry Rozema, Jasem Mutlaq
*/ */
class INDI::CCD : public INDI::DefaultDevice, INDI::GuiderInterface class INDI::CCD : public INDI::DefaultDevice, INDI::GuiderInterface
{ {
public: public:
CCD(); CCD();
virtual ~CCD(); virtual ~CCD();
typedef struct
{
bool hasGuideHead;
bool hasST4Port;
bool hasShutter;
bool hasCooler;
bool canBin;
bool canSubFrame;
bool canAbort;
} Capability;
virtual bool initProperties(); virtual bool initProperties();
virtual bool updateProperties(); virtual bool updateProperties();
virtual void ISGetProperties (const char *dev); virtual void ISGetProperties (const char *dev);
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 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 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 ISSnoopDevice (XMLEle *root); virtual bool ISSnoopDevice (XMLEle *root);
protected: protected:
Capability GetCapability() const { return capability;}
void SetCapability(Capability * cap);
/**
* @return True if CCD can abort exposure. False otherwise.
*/
bool CanAbort() { return capability.canAbort;}
/**
* @return True if CCD supports binning. False otherwise.
*/
bool CanBin() { return capability.canBin;}
/**
* @return True if CCD supports subframing. False otherwise.
*/
bool CanSubFrame() { return capability.canSubFrame;}
/**
* @return True if CCD has guide head. False otherwise.
*/
bool HasGuideHead() { return capability.hasGuideHead; }
/**
* @return True if CCD has mechanical or electronic shutter. False
otherwise.
*/
bool HasShutter() { return capability.hasShutter;}
/**
* @return True if CCD has ST4 port for guiding. False otherwise.
*/
bool HasST4Port() { return capability.hasST4Port;}
/**
* @return True if CCD has cooler and temperature can be controlled
. False otherwise.
*/
bool HasCooler() { return capability.hasCooler;}
/**
* @brief Set CCD temperature
* @param temperature CCD temperature in degrees celcius.
* @return 0 or 1 if setting the temperature call to the hardware i
s successful. -1 if an error is encountered.
* Return 0 if setting the temperature to the requested val
ue takes time. Return 1 if setting the temperature to the
* requested value is complete.
* \note Upon returning 0, the property becomes BUSY. Once the temp
erature reaches the requested value, change the state to OK.
* \note This function is not implemented in INDI::CCD, it must be
implemented in the child class
*/
virtual int SetTemperature(double temperature);
/** \brief Start exposing primary CCD chip /** \brief Start exposing primary CCD chip
\param duration Duration in seconds \param duration Duration in seconds
\return 0 if OK and exposure will take some time to complete, 1 if exposure is short and complete already (e.g. bias), -1 on error. \return true if OK and exposure will take some time to complete , false on error.
\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 int StartExposure(float duration); virtual bool StartExposure(float duration);
/** \brief Uploads target Chip exposed buffer as FITS to the client . Dervied classes should class this function when an exposure is complete. /** \brief Uploads target Chip exposed buffer as FITS to the client . Dervied classes should class this function when an exposure is complete.
\note This function is not implemented in INDI::CCD, it must b e implemented in the child class \note This function is not implemented in INDI::CCD, it must b e implemented in the child class
*/ */
virtual bool ExposureComplete(CCDChip *targetChip); virtual bool ExposureComplete(CCDChip *targetChip);
/** \brief Abort ongoing exposure /** \brief Abort ongoing exposure
\return true is abort is successful, false otherwise. \return true is abort 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 AbortExposure(); virtual bool AbortExposure();
/** \brief Start exposing guide CCD chip /** \brief Start exposing guide CCD chip
\param duration Duration in seconds \param duration Duration in seconds
\return 0 if OK and exposure will take some time to complete, 1 if exposure is short and complete already (e.g. bias), -1 on error. \return true if OK and exposure will take some time to complete , false on error.
\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 int StartGuideExposure(float duration); virtual bool StartGuideExposure(float duration);
/** \brief Abort ongoing exposure /** \brief Abort ongoing exposure
\return true is abort is successful, false otherwise. \return true is abort 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 AbortGuideExposure(); virtual bool AbortGuideExposure();
/** \brief INDI::CCD calls this function when CCD Frame dimension n eeds to be updated in the hardware. Derived classes should implement this f unction /** \brief INDI::CCD calls this function when CCD Frame dimension n eeds to be updated in the hardware. Derived classes should implement this f unction
\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 /** \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 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 updateGuideFrame(int x, int y, int w, int h); virtual bool UpdateGuiderFrame(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 /** \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 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 updateGuideBin(int hor, int ver); virtual bool UpdateGuiderBin(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. /** \brief INDI::CCD calls this function when Guide frame type is u pdated by the client.
\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 updateGuideFrameType(CCDChip::CCD_FRAME fType); virtual bool UpdateGuiderFrameType(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 SetGuideHeadParams(int x,int y,int bpp,float xf,float yf); virtual void SetGuiderParams(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 484 skipping to change at line 607
/* 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. * @brief activeDevicesUpdated Inform children that ActiveDevices p roperty was updated so they can snoop on the updated devices if desired.
*/ */
virtual void activeDevicesUpdated() {} virtual void activeDevicesUpdated() {}
virtual bool saveConfigItems(FILE *fp); virtual bool saveConfigItems(FILE *fp);
float RA; double RA, Dec;
float Dec;
bool HasGuideHead;
bool HasSt4Port;
bool InExposure; bool InExposure;
bool InGuideExposure; bool InGuideExposure;
bool RapidGuideEnabled;
bool GuiderRapidGuideEnabled;
bool AutoLoop;
bool GuiderAutoLoop;
bool SendImage;
bool GuiderSendImage;
bool ShowMarker;
bool GuiderShowMarker;
float ExposureTime;
float GuiderExposureTime;
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];
INumber TemperatureN[1];
INumberVectorProperty TemperatureNP;
private: private:
Capability capability;
bool uploadFile(CCDChip * targetChip, const void *fitsData, size_t
totalBytes);
void getMinMax(double *min, double *max, CCDChip *targetChip); void getMinMax(double *min, double *max, CCDChip *targetChip);
}; };
#endif // INDI:CCD_H #endif // INDI:CCD_H
 End of changes. 30 change blocks. 
21 lines changed or deleted 169 lines changed or added


 indifocuser.h   indifocuser.h 
skipping to change at line 23 skipping to change at line 23
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 INDIFOCUSSER_H #ifndef INDIFOCUSSER_H
#define INDIFOCUSSER_H #define INDIFOCUSSER_H
#include "defaultdevice.h" #include "defaultdevice.h"
#include "indifocuserinterface.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, 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. 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 Jasem Mutlaq
\author Gerry Rozema \author Gerry Rozema
*/ */
class INDI::Focuser : public INDI::DefaultDevice class INDI::Focuser : public INDI::DefaultDevice, public INDI::FocuserInter face
{ {
public: public:
Focuser(); Focuser();
virtual ~Focuser(); virtual ~Focuser();
enum FocusDirection { FOCUS_INWARD, FOCUS_OUTWARD };
virtual bool initProperties(); virtual bool initProperties();
virtual void ISGetProperties (const char *dev); virtual void ISGetProperties (const char *dev);
virtual bool updateProperties(); virtual bool updateProperties();
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 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 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 ISSnoopDevice (XMLEle *root); virtual bool ISSnoopDevice (XMLEle *root);
protected: protected:
/** \brief Move the focuser in a particular direction with a specif /**
ic speed for a finite duration. * @brief saveConfigItems Saves the Device Port and Focuser Presets
\param dir Direction of focuser, either FOCUS_INWARD or FOCUS_O in the configuration file
UTWARD. * @param fp pointer to configuration file
\param speed Speed of focuser if supported by the focuser. * @return true if successful, false otherwise.
\param duration The timeout in milliseconds before the focus mo */
tion halts. virtual bool saveConfigItems(FILE *fp);
\return True if succssfull, false otherwise.
*/ ITextVectorProperty PortTP;
virtual bool Move(FocusDirection dir, int speed, int duration); IText PortT[1];
/** \brief Move the focuser to an absolute position. INumber PresetN[3];
\param ticks The new position of the focuser. INumberVectorProperty PresetNP;
\return Return 0 if motion is completed and focuser reached req ISwitch PresetGotoS[3];
uested position. Return 1 if focuser started motion to requested position a ISwitchVectorProperty PresetGotoSP;
nd is in progress.
Return -1 if there is an error.
*/
virtual int MoveAbs(int ticks);
/** \brief Move the focuser to an relative position.
\param dir Direction of focuser, either FOCUS_INWARD or FOCUS_O
UTWARD.
\param ticks The relative ticks to move.
\return Return 0 if motion is completed and focuser reached req
uested position. Return 1 if focuser started motion to requested position a
nd is in progress.
Return -1 if there is an error.
*/
virtual int MoveRel(FocusDirection dir, unsigned int ticks);
INumberVectorProperty FocusSpeedNP;
INumber FocusSpeedN[1];
ISwitchVectorProperty FocusMotionSP; // A Switch in the client int
erface to park the scope
ISwitch FocusMotionS[2];
INumberVectorProperty FocusTimerNP;
INumber FocusTimerN[1];
INumberVectorProperty FocusAbsPosNP;
INumber FocusAbsPosN[1];
INumberVectorProperty FocusRelPosNP;
INumber FocusRelPosN[1];
}; };
#endif // INDIFOCUSSER_H #endif // INDIFOCUSSER_H
 End of changes. 4 change blocks. 
45 lines changed or deleted 17 lines changed or added


 indiusbdevice.h   indiusbdevice.h 
/************************************************************************** ***** /************************************************************************** *****
Copyright(c) 2011 Gerry Rozema. All rights reserved. Copyright(c) 2011 Gerry Rozema. All rights reserved.
Upgrade to libusb 1.0 by CloudMakers, s. r. o.
Copyright(c) 2013 CloudMakers, s. r. o. 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 29 skipping to change at line 32
#ifndef USBDEVICE_H #ifndef USBDEVICE_H
#define USBDEVICE_H #define USBDEVICE_H
#pragma once #pragma once
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>
#include <usb.h> #include <libusb-1.0/libusb.h>
#include "indibase.h" #include "indibase.h"
/** /**
* \class INDI::USBDevice * \class INDI::USBDevice
\brief Class to provide general functionality of a generic USB device. \brief Class to provide general functionality of a generic USB device.
Developers need to subclass INDI::USBDevice to implement any driver with in INDI that requires direct read/write/control over USB. Developers need to subclass INDI::USBDevice to implement any driver with in INDI that requires direct read/write/control over USB.
\author Gerry Rozema
\note This class implements legacy libusb API v0.1
*/ */
class INDI::USBDevice class INDI::USBDevice
{ {
protected: protected:
struct usb_device *dev; libusb_device *dev;
struct usb_dev_handle *usb_handle; libusb_device_handle *usb_handle;
int ProductId; int ProductId;
int VendorId; int VendorId;
int OutputType; int OutputType;
int OutputEndpoint; int OutputEndpoint;
int InputType; int InputType;
int InputEndpoint; int InputEndpoint;
struct usb_device * FindDevice(int,int,int); libusb_device *FindDevice(int,int,int);
public: public:
int WriteInterrupt(char *,int,int); int WriteInterrupt(unsigned char *, int, int);
int ReadInterrupt(char *,int,int); int ReadInterrupt(unsigned char *, int, int);
int ControlMessage(unsigned char request_type, unsigned char request, u int WriteBulk(unsigned char *buf, int nbytes, int timeout);
nsigned int value, unsigned int index, char *data, unsigned char len); int ReadBulk(unsigned char *buf, int nbytes, int timeout);
int ControlMessage(unsigned char request_type, unsigned char request, uns
int WriteBulk(char *buf,int nbytes,int timeout); igned int value, unsigned int index, unsigned char *data, unsigned char len
int ReadBulk(char *buf,int nbytes,int timeout); );
int FindEndpoints(); int FindEndpoints();
int Open(); int Open();
USBDevice(void); void Close();
USBDevice(struct usb_device *); USBDevice(void);
virtual ~USBDevice(void); USBDevice(libusb_device *dev);
virtual ~USBDevice(void);
}; };
#endif // USBDEVICE_H #endif // USBDEVICE_H
 End of changes. 7 change blocks. 
18 lines changed or deleted 19 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/