3
Copyright (C) 2005 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
24
#include "indidevapi.h"
33
void ISGetProperties (const char *dev);
34
void ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n);
35
void ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n);
36
void ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n);
39
void connection_lost();
40
void connection_resumed();
44
enum LX200_STATUS { LX200_SLEW, LX200_TRACK, LX200_SYNC, LX200_PARK };
48
ISwitch OnCoordSetS[3];
49
ISwitch AbortSlewS[1];
56
INumber EquatorialCoordsRN[2];
57
INumber EquatorialCoordsWN[2];
58
INumber SlewAccuracyN[2];
59
INumber TrackAccuracyN[2];
62
ISwitchVectorProperty ConnectSP;
63
ISwitchVectorProperty OnCoordSetSP;
64
ISwitchVectorProperty AbortSlewSP;
67
INumberVectorProperty EquatorialCoordsRNP;
68
INumberVectorProperty EquatorialCoordsWNP;
69
INumberVectorProperty SlewAccuracyNP;
70
INumberVectorProperty TrackAccuracyNP;
73
ITextVectorProperty PortTP;
74
ITextVectorProperty ObjectTP;
76
/*******************************************************/
77
/* Connection Routines
78
********************************************************/
79
void init_properties();
80
void get_initial_data();
81
void connect_telescope();
82
bool is_connected(void);
84
/*******************************************************/
86
********************************************************/
87
bool process_coords();
88
int get_switch_index(ISwitchVectorProperty *sp);
90
/*******************************************************/
91
/* Simulation Routines
92
********************************************************/
93
void enable_simulation(bool enable);
95
/*******************************************************/
96
/* Error handling routines
97
********************************************************/
98
void slew_error(int slewCode);
99
void reset_all_properties();
100
void handle_error(INumberVectorProperty *nvp, int err, const char *msg);
101
void correct_fault();
105
double JD; /* Julian Date */
110
int fd; /* Telescope tty file descriptor */