Ignore:
Timestamp:
Feb 24, 2012, 12:37:36 PM (12 years ago)
Author:
frichard
Message:

-Alignement des antennes
-Version 0.0.9 de libindi

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BAORadio/libindi/libindi/libs/indibase/indifocuser.h

    r504 r642  
    11/*******************************************************************************
    2   Copyright(c) 2010 Gerry Rozema. All rights reserved.
     2  Copyright(c) 2011 Gerry Rozema. All rights reserved.
    33
    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.
    87
    9   This program is distributed in the hope that it will be useful, but WITHOUT
    10   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    11   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
    12   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.
    1312
    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.
    2017*******************************************************************************/
    2118
     
    2522#include "defaultdriver.h"
    2623
     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*/
    2732class INDI::Focuser : public INDI::DefaultDriver
    2833{
    29 
    30     protected:
    31     private:
    32 
    3334    public:
    3435        Focuser();
    3536        virtual ~Focuser();
    3637
    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 };
    4439
    4540        virtual bool initProperties();
    4641        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();
    5343        virtual bool ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n);
    5444        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);
    5547
    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];
    5864
    5965};
Note: See TracChangeset for help on using the changeset viewer.