Changeset 642 for BAORadio/libindi/libindi/libs/indibase/indifocuser.h
- Timestamp:
- Feb 24, 2012, 12:37:36 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BAORadio/libindi/libindi/libs/indibase/indifocuser.h
r504 r642 1 1 /******************************************************************************* 2 Copyright(c) 201 0Gerry Rozema. All rights reserved.2 Copyright(c) 2011 Gerry Rozema. All rights reserved. 3 3 4 This program is free software; you can redistribute it and/or modify it 5 under the terms of the GNU General Public License as published by the Free 6 Software Foundation; either version 2 of the License, or (at your option) 7 any later version. 4 This library is free software; you can redistribute it and/or 5 modify it under the terms of the GNU Library General Public 6 License version 2 as published by the Free Software Foundation. 8 7 9 This program is distributed in the hope that it will be useful, but WITHOUT10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for12 more details.8 This library is distributed in the hope that it will be useful, 9 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 Library General Public License for more details. 13 12 14 You should have received a copy of the GNU General Public License along with 15 this program; if not, write to the Free Software Foundation, Inc., 59 16 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 18 The full GNU General Public License is included in this distribution in the 19 file called LICENSE. 13 You should have received a copy of the GNU Library General Public License 14 along with this library; see the file COPYING.LIB. If not, write to 15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 16 Boston, MA 02110-1301, USA. 20 17 *******************************************************************************/ 21 18 … … 25 22 #include "defaultdriver.h" 26 23 24 /** 25 * \class INDI::Focuser 26 \brief Class to provide general functionality of a focuser device. 27 28 Developers need to subclass INDI::Focuser to implement any driver for focusers within INDI. 29 30 \author Gerry Rozema 31 */ 27 32 class INDI::Focuser : public INDI::DefaultDriver 28 33 { 29 30 protected:31 private:32 33 34 public: 34 35 Focuser(); 35 36 virtual ~Focuser(); 36 37 37 INumberVectorProperty FocusspeedNV; 38 INumber FocusspeedN[1]; 39 ISwitchVectorProperty FocusmotionSV; // A Switch in the client interface to park the scope 40 ISwitch FocusmotionS[2]; 41 INumberVectorProperty FocustimerNV; 42 INumber FocustimerN[1]; 43 38 enum FocusDirection { FOCUS_INWARD, FOCUS_OUTWARD }; 44 39 45 40 virtual bool initProperties(); 46 41 virtual void ISGetProperties (const char *dev); 47 bool updateProperties(); 48 49 50 // Ok, we do need our virtual functions from the base class for processing 51 // client requests 52 // We process Numbers in a focusser 42 virtual bool updateProperties(); 53 43 virtual bool ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n); 54 44 virtual bool ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n); 45 virtual bool ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n); 46 virtual void ISSnoopDevice (XMLEle *root); 55 47 56 // And here are the virtual functions we will have for easy overrides 57 virtual int Move(int, int, int); 48 protected: 49 50 /** \brief Move the focuser in a particular direction with a specific speed for a finite duration. 51 \param dir Direction of focuser, either FOCUS_INWARD or FOCUS_OUTWARD. 52 \param speed Speed of focuser if supported by the focuser. 53 \param duration The timeout in milliseconds before the focus motion halts. 54 \return True if succssfull, false otherwise. 55 */ 56 virtual bool Move(FocusDirection dir, int speed, int duration); 57 58 INumberVectorProperty *FocusSpeedNP; 59 INumber FocusSpeedN[1]; 60 ISwitchVectorProperty *FocusMotionSP; // A Switch in the client interface to park the scope 61 ISwitch FocusMotionS[2]; 62 INumberVectorProperty *FocusTimerNP; 63 INumber FocusTimerN[1]; 58 64 59 65 };
Note: See TracChangeset
for help on using the changeset viewer.