Instrument Neutral Distributed Interface INDI  1.9.5
ieqprolegacydriver.h
Go to the documentation of this file.
1 /*
2  IEQ Pro driver
3 
4  Copyright (C) 2015 Jasem Mutlaq
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public
17  License along with this library; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20 
21 #pragma once
22 
23 #include <string>
24 
26 typedef enum {
37 typedef enum { SR_1, SR_2, SR_3, SR_4, SR_5, SR_6, SR_7, SR_8, SR_MAX } IEQ_SLEW_RATE;
41 typedef enum { RA_AXIS, DEC_AXIS } IEQ_AXIS;
42 typedef enum { IEQ_N, IEQ_S, IEQ_W, IEQ_E } IEQ_DIRECTION;
44 
45 typedef struct
46 {
54 } IEQInfo;
55 
56 typedef struct
57 {
58  std::string Model;
59  std::string MainBoardFirmware;
60  std::string ControllerFirmware;
61  std::string RAFirmware;
62  std::string DEFirmware;
63 } FirmwareInfo;
64 
65 /**************************************************************************
66  Misc.
67 **************************************************************************/
68 
69 void set_ieqpro_debug(bool enable);
70 void set_ieqpro_simulation(bool enable);
71 void set_ieqpro_device(const char *name);
72 
73 /**************************************************************************
74  Simulation
75 **************************************************************************/
82 void set_sim_ra(double ra);
83 void set_sim_dec(double dec);
84 void set_sim_guide_rate(double rate);
85 
86 /**************************************************************************
87  Diagnostics
88 **************************************************************************/
89 bool check_ieqpro_connection(int fd);
90 
91 /**************************************************************************
92  Get Info
93 **************************************************************************/
95 bool get_ieqpro_status(int fd, IEQInfo *info);
97 bool get_ieqpro_firmware(int fd, FirmwareInfo *info);
101 bool get_ieqpro_radec_firmware(int fd, FirmwareInfo *info);
103 bool get_ieqpro_model(int fd, FirmwareInfo *info);
105 bool get_ieqpro_coords(int fd, double *ra, double *dec);
107 bool get_ieqpro_utc_date_time(int fd, double *utc_hours, int *yy, int *mm, int *dd, int *hh, int *minute, int *ss);
108 
109 /**************************************************************************
110  Motion
111 **************************************************************************/
112 bool start_ieqpro_motion(int fd, IEQ_DIRECTION dir);
113 bool stop_ieqpro_motion(int fd, IEQ_DIRECTION dir);
114 bool set_ieqpro_slew_rate(int fd, IEQ_SLEW_RATE rate);
115 bool set_ieqpro_custom_ra_track_rate(int fd, double rate);
116 bool set_ieqpro_custom_de_track_rate(int fd, double rate);
117 bool set_ieqpro_track_mode(int fd, IEQ_TRACK_RATE rate);
118 bool set_ieqpro_track_enabled(int fd, bool enabled);
119 bool abort_ieqpro(int fd);
120 bool slew_ieqpro(int fd);
121 bool sync_ieqpro(int fd);
122 bool set_ieqpro_ra(int fd, double ra);
123 bool set_ieqpro_dec(int fd, double dec);
124 
125 /**************************************************************************
126  Home
127 **************************************************************************/
128 bool find_ieqpro_home(int fd);
129 bool goto_ieqpro_home(int fd);
130 bool set_ieqpro_current_home(int fd);
131 
132 /**************************************************************************
133  Park
134 **************************************************************************/
135 bool park_ieqpro(int fd);
136 bool unpark_ieqpro(int fd);
137 
138 /**************************************************************************
139  Guide
140 **************************************************************************/
141 bool set_ieqpro_guide_rate(int fd, double raRate, double deRate);
142 bool get_ieqpro_guide_rate(int fd, double *raRate, double *deRate);
143 bool start_ieqpro_guide(int fd, IEQ_DIRECTION dir, uint32_t ms);
144 
145 /**************************************************************************
146  Time & Location
147 **************************************************************************/
148 bool set_ieqpro_longitude(int fd, double longitude);
149 bool set_ieqpro_latitude(int fd, double latitude);
150 bool get_ieqpro_longitude(int fd, double *longitude);
151 bool get_ieqpro_latitude(int fd, double *latitude);
152 bool set_ieqpro_local_date(int fd, int yy, int mm, int dd);
153 bool set_ieqpro_local_time(int fd, int hh, int mm, int ss);
154 bool set_ieqpro_utc_offset(int fd, double offset_hours);
155 bool set_ieqpro_daylight_saving(int fd, bool enabled);
IEQ_FIND_HOME
@ IEQ_FIND_HOME
Definition: ieqprolegacydriver.h:43
set_ieqpro_local_date
bool set_ieqpro_local_date(int fd, int yy, int mm, int dd)
Definition: ieqprolegacydriver.cpp:1747
get_ieqpro_latitude
bool get_ieqpro_latitude(int fd, double *latitude)
Definition: ieqprolegacydriver.cpp:1688
GPS_DATA_OK
@ GPS_DATA_OK
Definition: ieqprolegacydriver.h:25
get_ieqpro_model
bool get_ieqpro_model(int fd, FirmwareInfo *info)
Definition: ieqprolegacydriver.cpp:248
IEQ_SYSTEM_STATUS
IEQ_SYSTEM_STATUS
Definition: ieqprolegacydriver.h:26
IEQ_HEMISPHERE
IEQ_HEMISPHERE
Definition: ieqprolegacydriver.h:39
check_ieqpro_connection
bool check_ieqpro_connection(int fd)
Definition: ieqprolegacydriver.cpp:115
TR_SIDEREAL
@ TR_SIDEREAL
Definition: ieqprolegacydriver.h:36
set_ieqpro_latitude
bool set_ieqpro_latitude(int fd, double latitude)
Definition: ieqprolegacydriver.cpp:1572
fd
int fd
Definition: indiserver.c:117
set_ieqpro_current_home
bool set_ieqpro_current_home(int fd)
Definition: ieqprolegacydriver.cpp:652
IEQ_SET_HOME
@ IEQ_SET_HOME
Definition: ieqprolegacydriver.h:43
stop_ieqpro_motion
bool stop_ieqpro_motion(int fd, IEQ_DIRECTION dir)
Definition: ieqprolegacydriver.cpp:495
set_sim_dec
void set_sim_dec(double dec)
Definition: ieqprolegacydriver.cpp:104
SR_4
@ SR_4
Definition: ieqprolegacydriver.h:37
IEQInfo
Definition: ieqprolegacydriver.h:45
set_ieqpro_guide_rate
bool set_ieqpro_guide_rate(int fd, double raRate, double deRate)
Definition: ieqprolegacydriver.cpp:931
set_sim_hemisphere
void set_sim_hemisphere(IEQ_HEMISPHERE value)
Definition: ieqprolegacydriver.cpp:94
set_ieqpro_longitude
bool set_ieqpro_longitude(int fd, double longitude)
Definition: ieqprolegacydriver.cpp:1515
get_ieqpro_radec_firmware
bool get_ieqpro_radec_firmware(int fd, FirmwareInfo *info)
Definition: ieqprolegacydriver.cpp:387
sync_ieqpro
bool sync_ieqpro(int fd)
Definition: ieqprolegacydriver.cpp:1302
set_sim_time_source
void set_sim_time_source(IEQ_TIME_SOURCE value)
Definition: ieqprolegacydriver.cpp:89
IEQ_S
@ IEQ_S
Definition: ieqprolegacydriver.h:42
start_ieqpro_motion
bool start_ieqpro_motion(int fd, IEQ_DIRECTION dir)
Definition: ieqprolegacydriver.cpp:447
SR_1
@ SR_1
Definition: ieqprolegacydriver.h:37
TR_LUNAR
@ TR_LUNAR
Definition: ieqprolegacydriver.h:36
set_sim_ra
void set_sim_ra(double ra)
Definition: ieqprolegacydriver.cpp:99
TR_SOLAR
@ TR_SOLAR
Definition: ieqprolegacydriver.h:36
slew_ieqpro
bool slew_ieqpro(int fd)
Definition: ieqprolegacydriver.cpp:1243
TR_KING
@ TR_KING
Definition: ieqprolegacydriver.h:36
FirmwareInfo::MainBoardFirmware
std::string MainBoardFirmware
Definition: ieqprolegacydriver.h:59
FirmwareInfo::ControllerFirmware
std::string ControllerFirmware
Definition: ieqprolegacydriver.h:60
set_ieqpro_simulation
void set_ieqpro_simulation(bool enable)
Definition: ieqprolegacydriver.cpp:54
set_ieqpro_custom_de_track_rate
bool set_ieqpro_custom_de_track_rate(int fd, double rate)
Definition: ieqprolegacydriver.cpp:875
set_ieqpro_daylight_saving
bool set_ieqpro_daylight_saving(int fd, bool enabled)
Definition: ieqprolegacydriver.cpp:1847
FW_BOARD
@ FW_BOARD
Definition: ieqprolegacydriver.h:40
set_ieqpro_debug
void set_ieqpro_debug(bool enable)
Definition: ieqprolegacydriver.cpp:49
IEQ_E
@ IEQ_E
Definition: ieqprolegacydriver.h:42
set_ieqpro_slew_rate
bool set_ieqpro_slew_rate(int fd, IEQ_SLEW_RATE rate)
Definition: ieqprolegacydriver.cpp:700
ST_TRACKING_PEC_OFF
@ ST_TRACKING_PEC_OFF
Definition: ieqprolegacydriver.h:28
set_ieqpro_dec
bool set_ieqpro_dec(int fd, double dec)
Definition: ieqprolegacydriver.cpp:1455
find_ieqpro_home
bool find_ieqpro_home(int fd)
Definition: ieqprolegacydriver.cpp:556
set_ieqpro_track_enabled
bool set_ieqpro_track_enabled(int fd, bool enabled)
Definition: ieqprolegacydriver.cpp:1350
HEMI_NORTH
@ HEMI_NORTH
Definition: ieqprolegacydriver.h:39
IEQ_HOME_OPERATION
IEQ_HOME_OPERATION
Definition: ieqprolegacydriver.h:43
GPS_OFF
@ GPS_OFF
Definition: ieqprolegacydriver.h:25
TS_RS232
@ TS_RS232
Definition: ieqprolegacydriver.h:38
IEQInfo::trackRate
IEQ_TRACK_RATE trackRate
Definition: ieqprolegacydriver.h:50
set_sim_slew_rate
void set_sim_slew_rate(IEQ_SLEW_RATE value)
Definition: ieqprolegacydriver.cpp:84
ST_STOPPED
@ ST_STOPPED
Definition: ieqprolegacydriver.h:27
FW_RA
@ FW_RA
Definition: ieqprolegacydriver.h:40
IEQ_TRACK_RATE
IEQ_TRACK_RATE
Definition: ieqprolegacydriver.h:36
ra
double ra
Definition: ieqprolegacydriver.cpp:43
get_ieqpro_firmware
bool get_ieqpro_firmware(int fd, FirmwareInfo *info)
Definition: ieqprolegacydriver.cpp:229
ST_SLEWING
@ ST_SLEWING
Definition: ieqprolegacydriver.h:29
ST_HOME
@ ST_HOME
Definition: ieqprolegacydriver.h:34
IEQInfo::systemStatus
IEQ_SYSTEM_STATUS systemStatus
Definition: ieqprolegacydriver.h:48
IEQInfo::timeSource
IEQ_TIME_SOURCE timeSource
Definition: ieqprolegacydriver.h:52
get_ieqpro_guide_rate
bool get_ieqpro_guide_rate(int fd, double *raRate, double *deRate)
Definition: ieqprolegacydriver.cpp:983
dec
double dec
Definition: ieqprolegacydriver.cpp:44
IEQ_GOTO_HOME
@ IEQ_GOTO_HOME
Definition: ieqprolegacydriver.h:43
FW_MODEL
@ FW_MODEL
Definition: ieqprolegacydriver.h:40
RA_AXIS
@ RA_AXIS
Definition: ieqprolegacydriver.h:41
IEQInfo::rememberSystemStatus
IEQ_SYSTEM_STATUS rememberSystemStatus
Definition: ieqprolegacydriver.h:49
TS_GPS
@ TS_GPS
Definition: ieqprolegacydriver.h:38
ST_MERIDIAN_FLIPPING
@ ST_MERIDIAN_FLIPPING
Definition: ieqprolegacydriver.h:31
ST_GUIDING
@ ST_GUIDING
Definition: ieqprolegacydriver.h:30
SR_2
@ SR_2
Definition: ieqprolegacydriver.h:37
IEQ_AXIS
IEQ_AXIS
Definition: ieqprolegacydriver.h:41
set_ieqpro_device
void set_ieqpro_device(const char *name)
Definition: ieqprolegacydriver.cpp:64
IEQ_GPS_STATUS
IEQ_GPS_STATUS
Definition: ieqprolegacydriver.h:25
TS_CONTROLLER
@ TS_CONTROLLER
Definition: ieqprolegacydriver.h:38
get_ieqpro_longitude
bool get_ieqpro_longitude(int fd, double *longitude)
Definition: ieqprolegacydriver.cpp:1629
IEQ_FIRMWARE
IEQ_FIRMWARE
Definition: ieqprolegacydriver.h:40
SR_5
@ SR_5
Definition: ieqprolegacydriver.h:37
SR_8
@ SR_8
Definition: ieqprolegacydriver.h:37
HEMI_SOUTH
@ HEMI_SOUTH
Definition: ieqprolegacydriver.h:39
IEQInfo::hemisphere
IEQ_HEMISPHERE hemisphere
Definition: ieqprolegacydriver.h:53
name
const char * name
Definition: indiserver.c:116
SR_MAX
@ SR_MAX
Definition: ieqprolegacydriver.h:37
abort_ieqpro
bool abort_ieqpro(int fd)
Definition: ieqprolegacydriver.cpp:1193
SR_6
@ SR_6
Definition: ieqprolegacydriver.h:37
set_ieqpro_utc_offset
bool set_ieqpro_utc_offset(int fd, double offset_hours)
Definition: ieqprolegacydriver.cpp:1900
set_sim_system_status
void set_sim_system_status(IEQ_SYSTEM_STATUS value)
Definition: ieqprolegacydriver.cpp:74
IEQInfo::slewRate
IEQ_SLEW_RATE slewRate
Definition: ieqprolegacydriver.h:51
TR_CUSTOM
@ TR_CUSTOM
Definition: ieqprolegacydriver.h:36
FW_CONTROLLER
@ FW_CONTROLLER
Definition: ieqprolegacydriver.h:40
goto_ieqpro_home
bool goto_ieqpro_home(int fd)
Definition: ieqprolegacydriver.cpp:604
IEQ_DIRECTION
IEQ_DIRECTION
Definition: ieqprolegacydriver.h:42
GPS_ON
@ GPS_ON
Definition: ieqprolegacydriver.h:25
IEQInfo::gpsStatus
IEQ_GPS_STATUS gpsStatus
Definition: ieqprolegacydriver.h:47
unpark_ieqpro
bool unpark_ieqpro(int fd)
Definition: ieqprolegacydriver.cpp:1144
SR_7
@ SR_7
Definition: ieqprolegacydriver.h:37
set_ieqpro_track_mode
bool set_ieqpro_track_mode(int fd, IEQ_TRACK_RATE rate)
Definition: ieqprolegacydriver.cpp:751
set_ieqpro_local_time
bool set_ieqpro_local_time(int fd, int hh, int mm, int ss)
Definition: ieqprolegacydriver.cpp:1797
FirmwareInfo
Definition: celestrondriver.h:156
IEQ_N
@ IEQ_N
Definition: ieqprolegacydriver.h:42
set_sim_track_rate
void set_sim_track_rate(IEQ_TRACK_RATE value)
Definition: ieqprolegacydriver.cpp:79
get_ieqpro_main_firmware
bool get_ieqpro_main_firmware(int fd, FirmwareInfo *info)
Definition: ieqprolegacydriver.cpp:327
FW_DEC
@ FW_DEC
Definition: ieqprolegacydriver.h:40
SR_3
@ SR_3
Definition: ieqprolegacydriver.h:37
IEQ_W
@ IEQ_W
Definition: ieqprolegacydriver.h:42
set_sim_gps_status
void set_sim_gps_status(IEQ_GPS_STATUS value)
Definition: ieqprolegacydriver.cpp:69
get_ieqpro_coords
bool get_ieqpro_coords(int fd, double *ra, double *dec)
Definition: ieqprolegacydriver.cpp:1958
FirmwareInfo
struct FirmwareInfo FirmwareInfo
IEQ_TIME_SOURCE
IEQ_TIME_SOURCE
Definition: ieqprolegacydriver.h:38
DEC_AXIS
@ DEC_AXIS
Definition: ieqprolegacydriver.h:41
ST_PARKED
@ ST_PARKED
Definition: ieqprolegacydriver.h:33
get_ieqpro_status
bool get_ieqpro_status(int fd, IEQInfo *info)
Definition: ieqprolegacydriver.cpp:169
set_ieqpro_custom_ra_track_rate
bool set_ieqpro_custom_ra_track_rate(int fd, double rate)
Definition: ieqprolegacydriver.cpp:819
ST_TRACKING_PEC_ON
@ ST_TRACKING_PEC_ON
Definition: ieqprolegacydriver.h:32
park_ieqpro
bool park_ieqpro(int fd)
Definition: ieqprolegacydriver.cpp:1086
IEQ_SLEW_RATE
IEQ_SLEW_RATE
Definition: ieqprolegacydriver.h:37
get_ieqpro_utc_date_time
bool get_ieqpro_utc_date_time(int fd, double *utc_hours, int *yy, int *mm, int *dd, int *hh, int *minute, int *ss)
Definition: ieqprolegacydriver.cpp:2032
set_ieqpro_ra
bool set_ieqpro_ra(int fd, double ra)
Definition: ieqprolegacydriver.cpp:1401
start_ieqpro_guide
bool start_ieqpro_guide(int fd, IEQ_DIRECTION dir, uint32_t ms)
Definition: ieqprolegacydriver.cpp:1036
set_sim_guide_rate
void set_sim_guide_rate(double rate)