3
Copyright (C) 2003 Jasem Mutlaq (mutlaqja@ikarustech.com)
5
This library is free software; you can redistribute it and/or
6
modify it under the terms of the GNU Lesser General Public
7
License as published by the Free Software Foundation; either
8
version 2.1 of the License, or (at your option) any later version.
10
This library is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
Lesser General Public License for more details.
15
You should have received a copy of the GNU Lesser General Public
16
License along with this library; if not, write to the Free Software
17
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
#ifndef LX200GENERIC_H
22
#define LX200GENERIC_H
24
#include "indidevapi.h"
27
#define POLLMS 1000 /* poll period, ms */
28
#define mydev "LX200 Generic" /* The device name */
34
virtual ~LX200Generic();
36
virtual void ISGetProperties (const char *dev);
37
virtual void ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n);
38
virtual void ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n);
39
virtual void ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n);
40
virtual void ISSnoopDevice (XMLEle *root);
41
virtual void ISPoll ();
42
virtual void getBasicData();
44
int checkPower(INumberVectorProperty *np);
45
int checkPower(ISwitchVectorProperty *sp);
46
int checkPower(ITextVectorProperty *tp);
47
void handleError(ISwitchVectorProperty *svp, int err, const char *msg);
48
void handleError(INumberVectorProperty *nvp, int err, const char *msg);
49
void handleError(ITextVectorProperty *tvp, int err, const char *msg);
50
bool isTelescopeOn(void);
51
void connectTelescope();
52
void slewError(int slewCode);
55
int getOnSwitch(ISwitchVectorProperty *sp);
56
void setCurrentDeviceName(const char * devName);
58
void enableSimulation(bool enable);
60
void updateLocation();
63
static void updateFocusTimer(void *p);
64
static void guideTimeout(void *p);
86
void changeLX200GenericDeviceName(const char * newName);
87
void changeAllDeviceNames(const char *newName);