baseclient.h   baseclient.h 
skipping to change at line 40 skipping to change at line 40
#define MAXRBUF 2048 #define MAXRBUF 2048
using namespace std; using namespace std;
/** /**
* \class INDI::BaseClient * \class INDI::BaseClient
\brief Class to provide basic client functionality. \brief Class to provide basic client functionality.
BaseClient enables accelerated development of INDI Clients by providing a framework that facilitates communication, device BaseClient enables accelerated development of INDI Clients by providing a framework that facilitates communication, device
handling, and event notification. By subclassing BaseClient, clients can quickly connect to an INDI server, and query for handling, and event notification. By subclassing BaseClient, clients can quickly connect to an INDI server, and query for
a set of INDI::BaseDriver devices, and read and write properties seamles sly. Event driven programming is possible due to a set of INDI::BaseDevice devices, and read and write properties seamles sly. Event driven programming is possible due to
notifications upon reception of new devices or properties. notifications upon reception of new devices or properties.
\attention All notifications functions defined in INDI::BaseMediator mus t be implemented in the client class even if \attention All notifications functions defined in INDI::BaseMediator mus t be implemented in the client class even if
they are not used because these are pure virtual functions. they are not used because these are pure virtual functions.
\see <a href=http://indilib.org/index.php?title=Learn_how_to_write_INDI_ clients>INDI Client Tutorial</a> for more details. \see <a href=http://indilib.org/index.php?title=Learn_how_to_write_INDI_ clients>INDI Client Tutorial</a> for more details.
\author Jasem Mutlaq \author Jasem Mutlaq
*/ */
class INDI::BaseClient : public INDI::BaseMediator class INDI::BaseClient : public INDI::BaseMediator
{ {
public: public:
enum { INDI_DEVICE_NOT_FOUND=-1, INDI_PROPERTY_INVALID=-2, INDI_PROPERT Y_DUPLICATED = -3, INDI_DISPATCH_ERROR=-4 }; enum { INDI_DEVICE_NOT_FOUND=-1, INDI_PROPERTY_INVALID=-2, INDI_PROPERT Y_DUPLICATED = -3, INDI_DISPATCH_ERROR=-4 };
//typedef boost::shared_ptr<INDI::BaseDriver> devicePtr; //typedef boost::shared_ptr<INDI::BaseDevice> devicePtr;
BaseClient(); BaseClient();
~BaseClient(); ~BaseClient();
/** \brief Set the server host name and port /** \brief Set the server host name and port
\param hostname INDI server host name or IP address. \param hostname INDI server host name or IP address.
\param port INDI server port. \param port INDI server port.
*/ */
void setServer(const char * hostname, unsigned int port); void setServer(const char * hostname, unsigned int port);
/** \brief Add a device to the watch list. /** \brief Add a device to the watch list.
A client may select to receive notifications of only a specific dev ice or a set of devices. A client may select to receive notifications of only a specific dev ice or a set of devices.
If the client encounters any of the devices set via this function, it will create a corresponding If the client encounters any of the devices set via this function, it will create a corresponding
INDI::BaseDriver object to handle them. If no devices are watched, then all devices owned by INDI server INDI::BaseDevice object to handle them. If no devices are watched, then all devices owned by INDI server
will be created and handled. will be created and handled.
*/ */
void watchDevice(const char * deviceName); void watchDevice(const char * deviceName);
/** \brief Connect to INDI server. /** \brief Connect to INDI server.
\returns True if the connection is successful, false otherwise. \returns True if the connection is successful, false otherwise.
\note This function blocks until connection is either successull or unsuccessful. \note This function blocks until connection is either successull or unsuccessful.
*/ */
bool connectServer(); bool connectServer();
/** \brief Disconnect from INDI server. /** \brief Disconnect from INDI server.
Disconnects from INDI servers. Any devices previously created will be deleted and memory cleared. Disconnects from INDI servers. Any devices previously created will be deleted and memory cleared.
\return True if disconnection is successful, false otherwise. \return True if disconnection is successful, false otherwise.
*/ */
bool disconnectServer(); bool disconnectServer();
/** \brief Connect/Disconnect to INDI driver /** \brief Connect to INDI driver
\param status If true, the client will attempt to turn on CONNECTIO
N property within the driver (i.e. turn on the device).
Otherwise, CONNECTION will be turned off.
\param deviceName Name of the device to connect to. \param deviceName Name of the device to connect to.
*/ */
void setDriverConnection(bool status, const char *deviceName); void connectDevice(const char *deviceName);
/** \brief Disconnect INDI driver
\param deviceName Name of the device to disconnect.
*/
void disconnectDevice(const char *deviceName);
/** \param deviceName Name of device to search for in the list of devic es owned by INDI server, /** \param deviceName Name of device to search for in the list of devic es owned by INDI server,
\returns If \e deviceName exists, it returns an instance of the de vice. Otherwise, it returns NULL. \returns If \e deviceName exists, it returns an instance of the de vice. Otherwise, it returns NULL.
*/ */
INDI::BaseDriver * getDriver(const char * deviceName); INDI::BaseDevice * getDevice(const char * deviceName);
/** \returns Returns a vector of all devices created in the client. /** \returns Returns a vector of all devices created in the client.
*/ */
const vector<INDI::BaseDriver *> & getDrivers() const { return cDevices ; } const vector<INDI::BaseDevice *> & getDevices() const { return cDevices ; }
/** \brief Set Binary Large Object policy mode /** \brief Set Binary Large Object policy mode
Set the BLOB handling mode for the client. The client may either reci eve: Set the BLOB handling mode for the client. The client may either reci eve:
<ul> <ul>
<li>Only BLOBS</li> <li>Only BLOBS</li>
<li>BLOBs mixed with normal messages</li> <li>BLOBs mixed with normal messages</li>
<li>Normal messages only, no BLOBs</li> <li>Normal messages only, no BLOBs</li>
</ul> </ul>
skipping to change at line 125 skipping to change at line 128
\param blobH BLOB handling policy \param blobH BLOB handling policy
\param dev name of device, required. \param dev name of device, required.
\param prop name of property, optional. \param prop name of property, optional.
*/ */
void setBLOBMode(BLOBHandling blobH, const char *dev, const char *prop = NULL); void setBLOBMode(BLOBHandling blobH, const char *dev, const char *prop = NULL);
// Update // Update
static void * listenHelper(void *context); static void * listenHelper(void *context);
const char * getHost() { return cServer.c_str();}
int getPort() { return cPort; }
/** \brief Send new Text command to server */
void sendNewText (ITextVectorProperty *pp);
/** \brief Send new Text command to server */
void sendNewText (const char * deviceName, const char * propertyName, c
onst char* elementName, const char *text);
/** \brief Send new Number command to server */
void sendNewNumber (INumberVectorProperty *pp);
/** \brief Send new Number command to server */
void sendNewNumber (const char * deviceName, const char *propertyName,
const char* elementName, double value);
/** \brief Send new Switch command to server */
void sendNewSwitch (ISwitchVectorProperty *pp);
/** \brief Send new Switch command to server */
void sendNewSwitch (const char * deviceName, const char *propertyName,
const char *elementName);
/** \brief Send opening tag for BLOB command to server */
void startBlob( const char *devName, const char *propName, const char *
timestamp);
/** \brief Send ONE blob content to server */
void sendOneBlob( const char *blobName, unsigned int blobSize, const ch
ar *blobFormat, void * blobBuffer);
/** \brief Send closing tag for BLOB command to server */
void finishBlob();
protected: protected:
/** \brief Dispatch command received from INDI server to respective dev ices handled by the client */ /** \brief Dispatch command received from INDI server to respective dev ices handled by the client */
int dispatchCommand(XMLEle *root, char* errmsg); int dispatchCommand(XMLEle *root, char* errmsg);
/** \brief Remove device */ /** \brief Remove device */
int removeDevice( const char * devName, char * errmsg ); int removeDevice( const char * devName, char * errmsg );
/** \brief Delete property command */ /** \brief Delete property command */
int delPropertyCmd (XMLEle *root, char * errmsg); int delPropertyCmd (XMLEle *root, char * errmsg);
/** \brief Find and return a particular device */ /** \brief Find and return a particular device */
INDI::BaseDriver * findDev( const char * devName, char * errmsg); INDI::BaseDevice * findDev( const char * devName, char * errmsg);
/** \brief Add a new device */ /** \brief Add a new device */
INDI::BaseDriver * addDevice (XMLEle *dep, char * errmsg); INDI::BaseDevice * addDevice (XMLEle *dep, char * errmsg);
/** \brief Find a device, and if it doesn't exist, create it if create is set to 1 */ /** \brief Find a device, and if it doesn't exist, create it if create is set to 1 */
INDI::BaseDriver * findDev (XMLEle *root, int create, char * errmsg); INDI::BaseDevice * findDev (XMLEle *root, int create, char * errmsg);
/** Process messages */ /** Process messages */
int messageCmd (XMLEle *root, char * errmsg); int messageCmd (XMLEle *root, char * errmsg);
/** Process messages */
void checkMsg (XMLEle *root, INDI::BaseDriver *dp);
/** Process messages */
void doMsg (XMLEle *msg, INDI::BaseDriver *dp);
/** \brief Send new Text command to server */
void sendNewText (ITextVectorProperty *pp);
/** \brief Send new Number command to server */
void sendNewNumber (INumberVectorProperty *pp);
/** \brief Send new Switch command to server */
void sendNewSwitch (ISwitchVectorProperty *pp, ISwitch *lp);
/** \brief Send opening tag for BLOB command to server */
void startBlob( const char *devName, const char *propName, const char *
timestamp);
/** \brief Send ONE blob content to server */
void sendOneBlob( const char *blobName, unsigned int blobSize, const ch
ar *blobFormat, unsigned char * blobBuffer);
/** \brief Send closing tag for BLOB command to server */
void finishBlob();
private: private:
/** \brief Connect/Disconnect to INDI driver
\param status If true, the client will attempt to turn on CONNECTIO
N property within the driver (i.e. turn on the device).
Otherwise, CONNECTION will be turned off.
\param deviceName Name of the device to connect to.
*/
void setDriverConnection(bool status, const char *deviceName);
// Listen to INDI server and process incoming messages // Listen to INDI server and process incoming messages
void listenINDI(); void listenINDI();
// Thread for listenINDI() // Thread for listenINDI()
pthread_t listen_thread; pthread_t listen_thread;
vector<INDI::BaseDriver *> cDevices; vector<INDI::BaseDevice *> cDevices;
vector<string> cDeviceNames; vector<string> cDeviceNames;
string cServer; string cServer;
unsigned int cPort; unsigned int cPort;
bool sConnected; bool sConnected;
// Parse & FILE buffers for IO // Parse & FILE buffers for IO
int sockfd; int sockfd;
LilXML *lillp; /* XML parser context */ LilXML *lillp; /* XML parser context */
FILE *svrwfp; /* FILE * to talk to server */ FILE *svrwfp; /* FILE * to talk to server */
 End of changes. 14 change blocks. 
33 lines changed or deleted 52 lines changed or added


 indibase.h   indibase.h 
skipping to change at line 35 skipping to change at line 35
<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>
</ul> </ul>
*/ */
namespace INDI namespace INDI
{ {
class BaseMediator; class BaseMediator;
class BaseClient; class BaseClient;
class BaseDriver; class BaseDevice;
class DefaultDriver; 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;
} }
/*! INDI property type */
typedef enum
{
INDI_NUMBER, /*!< INumberVectorProperty. */
INDI_SWITCH, /*!< ISwitchVectorProperty. */
INDI_TEXT, /*!< ITextVectorProperty. */
INDI_LIGHT, /*!< ILightVectorProperty. */
INDI_BLOB, /*!< IBLOBVectorProperty. */
INDI_UNKNOWN
} INDI_TYPE;
/** /**
* \class INDI::BaseMediator * \class INDI::BaseMediator
\brief Meditates event notification as generated by driver and passed to clients. \brief Meditates event notification as generated by driver and passed to clients.
*/ */
class INDI::BaseMediator class INDI::BaseMediator
{ {
public: public:
/** \brief Emmited when a new device is created from INDI server. /** \brief Emmited when a new device is created from INDI server.
\param device_name Name of the new device \param device_name Name of the new device
*/ */
virtual void newDevice(const char *device_name) =0; virtual void newDevice(INDI::BaseDevice *dp) =0;
/** \brief Emmited when a new property is created for an INDI driver. /** \brief Emmited when a new property is created for an INDI driver.
\param device_name Name of the device \param property Pointer to the Property Container
\param property_name Name of the new property
*/
virtual void newProperty(INDI::Property *property) =0;
/** \brief Emmited when a property is deleted for an INDI driver.
\param property Pointer to the Property Container to remove.
*/ */
virtual void newProperty(const char *device_name, const char *property_ name) =0; virtual void removeProperty(INDI::Property *property) =0;
/** \brief Emmited when a new BLOB value arrives from INDI server. /** \brief Emmited when a new BLOB value arrives from INDI server.
\param bp Pointer to filled and process BLOB. \param bp Pointer to filled and process BLOB.
*/ */
virtual void newBLOB(IBLOB *bp) =0; virtual void newBLOB(IBLOB *bp) =0;
/** \brief Emmited when a new switch value arrives from INDI server. /** \brief Emmited when a new switch value arrives from INDI server.
\param svp Pointer to a switch vector property. \param svp Pointer to a switch vector property.
*/ */
virtual void newSwitch(ISwitchVectorProperty *svp) =0; virtual void newSwitch(ISwitchVectorProperty *svp) =0;
skipping to change at line 90 skipping to change at line 108
/** \brief Emmited when a new text value arrives from INDI server. /** \brief Emmited when a new text value arrives from INDI server.
\param tvp Pointer to a text vector property. \param tvp Pointer to a text vector property.
*/ */
virtual void newText(ITextVectorProperty *tvp) =0; virtual void newText(ITextVectorProperty *tvp) =0;
/** \brief Emmited when a new light value arrives from INDI server. /** \brief Emmited when a new light value arrives from INDI server.
\param lvp Pointer to a light vector property. \param lvp Pointer to a light vector property.
*/ */
virtual void newLight(ILightVectorProperty *lvp) =0; virtual void newLight(ILightVectorProperty *lvp) =0;
/** \brief Emmited when a new message arrives from INDI server.
\param dp pointer to the INDI device the message is sent to.
*/
virtual void newMessage(INDI::BaseDevice *dp) =0;
/** \brief Emmited when the server is connected. /** \brief Emmited when the server is connected.
*/ */
virtual void serverConnected() =0; virtual void serverConnected() =0;
/** \brief Emmited when the server gets disconnected. /** \brief Emmited when the server gets disconnected.
\param exit_code 0 if client was requested to disconnect from serve r. -1 if connection to server is terminated due to remote server disconnect ion.
*/ */
virtual void serverDisconnected() =0; virtual void serverDisconnected(int exit_code) =0;
}; };
#endif // INDIBASE_H #endif // INDIBASE_H
 End of changes. 9 change blocks. 
7 lines changed or deleted 31 lines changed or added


 indiccd.h   indiccd.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 INDI_CCD_H #ifndef INDI_CCD_H
#define INDI_CCD_H #define INDI_CCD_H
#include <fitsio.h> #include <fitsio.h>
#include "defaultdriver.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;
class CCDChip class CCDChip
{ {
skipping to change at line 123 skipping to change at line 123
/** /**
* \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::DefaultDriver, INDI::GuiderInterface class INDI::CCD : public INDI::DefaultDevice, INDI::GuiderInterface
{ {
public: public:
CCD(); CCD();
virtual ~CCD(); virtual ~CCD();
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 void ISSnoopDevice (XMLEle *root); virtual bool ISSnoopDevice (XMLEle *root);
protected: protected:
/** \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 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.
\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 int StartExposure(float duration);
/** \brief Uploads primary CCD exposed buffer as FITS to the client . Dervied classes should class this function when an exposure is complete. /** \brief Uploads primary CCD exposed buffer as FITS to the client . Dervied classes should class this function when an exposure is complete.
skipping to change at line 259 skipping to change at line 259
bool InExposure; bool InExposure;
CCDChip PrimaryCCD; CCDChip PrimaryCCD;
CCDChip GuideCCD; CCDChip GuideCCD;
private: private:
// 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 *TelescopeTP; ITextVectorProperty *ActiveDeviceTP;
IText TelescopeT[1]; IText ActiveDeviceT[2];
int uploadfile(void *fitsdata,int total); int uploadfile(void *fitsdata,int total);
}; };
#endif // INDI:CCD_H #endif // INDI:CCD_H
 End of changes. 4 change blocks. 
5 lines changed or deleted 5 lines changed or added


 indidevapi.h   indidevapi.h 
skipping to change at line 446 skipping to change at line 446
/** \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 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.
*
* \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.
*/
extern int IUFindOnSwitchIndex (const ISwitchVectorProperty *sp);
/** \brief Reset all switches in a switch vector property to OFF. /** \brief Reset all switches in a switch vector property to OFF.
* *
* \param svp a pointer to a switch vector property. * \param svp a pointer to a switch vector property.
*/ */
extern void IUResetSwitch(ISwitchVectorProperty *svp); extern void IUResetSwitch(ISwitchVectorProperty *svp);
/** \brief Update all switches in a switch vector property. /** \brief Update all switches in a switch vector property.
* *
* \param svp a pointer to a switch vector property. * \param svp a pointer to a switch vector property.
* \param states the states of the new ISwitch members. * \param states the states of the new ISwitch members.
skipping to change at line 482 skipping to change at line 492
/** \brief Update all text members in a text vector property. /** \brief Update all text members in a text vector property.
* *
* \param tvp a pointer to a text vector property. * \param tvp a pointer to a text vector property.
* \param texts a pointer to the text members * \param texts a pointer to the text members
* \param names the names of the IText members to update. * \param names the names of the IText members to update.
* \param n the number of IText members to update. * \param n the number of IText members to update.
* \return 0 if update successful, -1 otherwise. Update will fail in case of property name mismatch. * \return 0 if update successful, -1 otherwise. Update will fail in case of property name mismatch.
*/ */
extern int IUUpdateText(ITextVectorProperty *tvp, char * texts[], char *nam es[], int n); extern int IUUpdateText(ITextVectorProperty *tvp, char * texts[], char *nam es[], int n);
/** \brief Update all BLOB members in a BLOB vector property.
*
* \param bvp a pointer to a BLOB vector property.
* \param BLOBs a pointer to the BLOB members
* \param names the names of the IBLOB members to update.
* \param n the number of IBLOB members to update.
* \return 0 if update successful, -1 otherwise. Update will fail in case of
property name mismatch.
*/
extern int IUUpdateBLOB(IBLOBVectorProperty *bvp, int sizes[], int blobsize
s[], char *blobs[], char *formats[], char *names[], int n);
/** \brief Function to save blob metadata in the corresponding blob.
\param tb pointer to an IBLOB member.
\param size size of the blob buffer encoded in base64
\param blobsize actual size of the buffer after base64 decoding. This i
s the actual byte count used in drivers.
\param blob pointer to the blob buffer
\param format format of the blob buffer
\note Do not call this function directly, it is called internally by IU
UpdateBLOB.
*/
extern int IUSaveBLOB(IBLOB *bp, int size, int blobsize, char *blob, char *
format);
/** \brief Function to update the min and max elements of a number in the c lient /** \brief Function to update the min and max elements of a number in the c lient
\param nvp pointer to an INumberVectorProperty. \param nvp pointer to an INumberVectorProperty.
*/ */
extern void IUUpdateMinMax(const INumberVectorProperty *nvp); extern void IUUpdateMinMax(const INumberVectorProperty *nvp);
/** \brief Function to reliably save new text in a IText. /** \brief Function to reliably save new text in a IText.
\param tp pointer to an IText member. \param tp pointer to an IText member.
\param newtext the new text to be saved \param newtext the new text to be saved
*/ */
extern void IUSaveText (IText *tp, const char *newtext); extern void IUSaveText (IText *tp, const char *newtext);
 End of changes. 2 change blocks. 
0 lines changed or deleted 39 lines changed or added


 indifilterinterface.h   indifilterinterface.h 
skipping to change at line 55 skipping to change at line 55
\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. Filter names should be saved in hardware if possible.
\return True if successful, false if supported or failed operation */ \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.
\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 *deviceName, const char* groupNa me) = 0; virtual bool GetFilterNames(const char* groupName) = 0;
/** \brief The child class calls this function when the hardware succes sfully finished selecting a new filter wheel position /** \brief The child class calls this function when the hardware succes sfully finished selecting a new filter wheel position
\param newpos New position of the filter wheel \param newpos New position of the filter wheel
*/ */
void SelectFilterDone(int newpos); void SelectFilterDone(int newpos);
protected: protected:
FilterInterface(); FilterInterface();
~FilterInterface(); ~FilterInterface();
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 indifilterwheel.h   indifilterwheel.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_FILTERWHEEL_H #ifndef INDI_FILTERWHEEL_H
#define INDI_FILTERWHEEL_H #define INDI_FILTERWHEEL_H
#include "defaultdriver.h" #include "defaultdevice.h"
#include "indifilterinterface.h" #include "indifilterinterface.h"
/** /**
* \class INDI::FilterWheel * \class INDI::FilterWheel
\brief Class to provide general functionality of a filter wheel device. \brief Class to provide general functionality of a filter wheel device.
Developers need to subclass INDI::FilterWheel to implement any driver fo r filter wheels within INDI. Developers need to subclass INDI::FilterWheel to implement any driver fo r filter wheels within INDI.
\author Gerry Rozema, Jasem Mutlaq \author Gerry Rozema, Jasem Mutlaq
\see INDI::FilterInterface \see INDI::FilterInterface
*/ */
class INDI::FilterWheel: public INDI::DefaultDriver, public INDI::FilterInt erface class INDI::FilterWheel: public INDI::DefaultDevice, public INDI::FilterInt erface
{ {
protected: protected:
FilterWheel(); FilterWheel();
virtual ~FilterWheel(); virtual ~FilterWheel();
public: public:
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 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 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 void ISSnoopDevice (XMLEle *root);
protected: protected:
virtual int QueryFilter(); virtual int QueryFilter();
virtual bool SelectFilter(int); virtual bool SelectFilter(int);
virtual bool SetFilterNames(); virtual bool SetFilterNames();
virtual bool GetFilterNames(const char *deviceName, const char* groupNa me); virtual bool GetFilterNames(const char* groupName);
}; };
#endif // INDI::FilterWheel_H #endif // INDI::FilterWheel_H
 End of changes. 4 change blocks. 
4 lines changed or deleted 3 lines changed or added


 indifocuser.h   indifocuser.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 INDIFOCUSSER_H #ifndef INDIFOCUSSER_H
#define INDIFOCUSSER_H #define INDIFOCUSSER_H
#include "defaultdriver.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.
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 Gerry Rozema \author Gerry Rozema
*/ */
class INDI::Focuser : public INDI::DefaultDriver 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 };
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 void 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 Move the focuser in a particular direction with a specif ic speed for a finite duration.
\param dir Direction of focuser, either FOCUS_INWARD or FOCUS_O UTWARD. \param dir Direction of focuser, either FOCUS_INWARD or FOCUS_O UTWARD.
\param speed Speed of focuser if supported by the focuser. \param speed Speed of focuser if supported by the focuser.
\param duration The timeout in milliseconds before the focus mo tion halts. \param duration The timeout in milliseconds before the focus mo tion halts.
\return True if succssfull, false otherwise. \return True if succssfull, false otherwise.
*/ */
virtual bool Move(FocusDirection dir, int speed, int duration); virtual bool Move(FocusDirection dir, int speed, int duration);
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 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 "defaultdriver.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>
<li>If the telescope has additional properties, the child class should o verride initProperties and initilize the respective additional properties.< /li> <li>If the telescope has additional properties, the child class should o verride initProperties and initilize the respective additional properties.< /li>
skipping to change at line 44 skipping to change at line 44
<li>INDI::Telescope calls updateProperties() to enable the child class t o define which properties to send to the client upon connection</li> <li>INDI::Telescope calls updateProperties() to enable the child class t o define which properties to send to the client upon connection</li>
<li>INDI::Telescope calls ReadScopeStatus() to check the link to the tel escope and update its state and position. The child class should call newRa Dec() whenever <li>INDI::Telescope calls ReadScopeStatus() to check the link to the tel escope and update its state and position. The child class should call newRa Dec() whenever
a new value is read from the telescope.</li> a new value is read from the telescope.</li>
<li>The child class should implmenet Goto() and Sync(), and Park() if ap plicable.</li> <li>The child class should implmenet Goto() and Sync(), and Park() if ap plicable.</li>
<li>INDI::Telescope calls disconnect() when the client request a disconn ection. The child class should remove any additional properties it defined in updateProperties() if applicable</li> <li>INDI::Telescope calls disconnect() when the client request a disconn ection. The child class should remove any additional properties it defined in updateProperties() if applicable</li>
</ul> </ul>
\author Gerry Rozema, Jasem Mutlaq \author Gerry Rozema, Jasem Mutlaq
\see TelescopeSimulator and SynScan drivers for examples of implementations of INDI::Telescope. \see TelescopeSimulator and SynScan drivers for examples of implementations of INDI::Telescope.
*/ */
class INDI::Telescope : public INDI::DefaultDriver class INDI::Telescope : public INDI::DefaultDevice
{ {
private: private:
public: public:
Telescope(); Telescope();
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 };
skipping to change at line 174 skipping to change at line 174
ITextVectorProperty *PortTV; // A text vector that stores out phys ical port name ITextVectorProperty *PortTV; // A text vector that stores out phys ical 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[2];
INumberVectorProperty *ScopeParametersNP;
}; };
#endif // INDI::Telescope_H #endif // INDI::Telescope_H
 End of changes. 3 change blocks. 
2 lines changed or deleted 5 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/