Changeset 642 for BAORadio/libindi/libindi/libs/indibase/defaultdriver.h
- Timestamp:
- Feb 24, 2012, 12:37:36 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BAORadio/libindi/libindi/libs/indibase/defaultdriver.h
r504 r642 1 /******************************************************************************* 2 Copyright(c) 2011 Jasem Mutlaq. All rights reserved. 3 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. 7 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. 12 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. 17 *******************************************************************************/ 18 1 19 #ifndef INDIDEFAULTDRIVER_H 2 20 #define INDIDEFAULTDRIVER_H … … 5 23 #include "indidriver.h" 6 24 25 #include <auto_ptr.h> 26 27 extern const char *COMMUNICATION_TAB; 28 extern const char *MAIN_CONTROL_TAB; 29 extern const char *MOTION_TAB; 30 extern const char *DATETIME_TAB; 31 extern const char *SITE_TAB; 32 extern const char *OPTIONS_TAB; 33 extern const char *FILTER_TAB; 34 extern const char *GUIDER_TAB; 35 7 36 /** 8 37 * \class INDI::DefaultDriver 9 \brief Class to provide extended functiona ry for drivers in addition38 \brief Class to provide extended functionality for drivers in addition 10 39 to the functionality provided by INDI::BaseDriver. This class should \e only be subclassed by 11 40 drivers directly as it is linked with main(). Virtual drivers cannot employ INDI::DefaultDriver. … … 21 50 public: 22 51 DefaultDriver(); 23 virtual ~DefaultDriver() {}52 virtual ~DefaultDriver(); 24 53 25 54 /** \brief Add Debug, Simulation, and Configuration options to the driver */ … … 74 103 virtual bool deleteProperty(const char *propertyName); 75 104 76 /** \brief Connect or Disconnect a device. 105 106 /** \brief Set connection switch status in the client. 77 107 \param status If true, the driver will attempt to connect to the device (CONNECT=ON). If false, it will attempt 78 108 to disconnect the device. 79 \param msg A message to be sent along with connect/disconnect command. 109 \param status True to set CONNECT on, false to set DISCONNECT on. 110 \param state State of CONNECTION properti, by default IPS_OK. 111 \param msg A message to be sent along with connect/disconnect command, by default NULL. 80 112 */ 81 113 virtual void setConnected(bool status, IPState state=IPS_OK, const char *msg = NULL); 82 114 83 int SetTimer(int); 84 void RemoveTimer(int); 115 /** \brief Set a timer to call the function TimerHit after ms milliseconds 116 \param ms timer duration in milliseconds. 117 \return id of the timer to be used with RemoveTimer 118 */ 119 int SetTimer(int ms); 120 121 /** \brief Remove timer added with SetTimer 122 \param id ID of the timer as returned from SetTimer 123 */ 124 void RemoveTimer(int id); 125 126 /** \brief Callback function to be called once SetTimer duration elapses. */ 85 127 virtual void TimerHit(); 86 128 … … 116 158 \return True if successful, false otherwise. 117 159 */ 118 bool loadConfig();160 virtual bool loadConfig(); 119 161 120 162 /** \brief Save the current properties in a configuration file 121 163 \return True if successful, false otherwise. 122 164 */ 123 bool saveConfig(); 165 virtual bool saveConfig(); 166 virtual bool saveConfigItems(FILE *fp); 124 167 125 168 /** \brief Load the default configuration file 126 169 \return True if successful, false otherwise. 127 170 */ 128 bool loadDefaultConfig(); 171 virtual bool loadDefaultConfig(); 172 129 173 130 174 // Simulatin & Debug
Note: See TracChangeset
for help on using the changeset viewer.