Instrument Neutral Distributed Interface INDI  2.0.2
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 #include <cstdint>
25 
27 typedef enum
28 {
36  ST_HOME
39 typedef enum { SR_1, SR_2, SR_3, SR_4, SR_5, SR_6, SR_7, SR_8, SR_MAX } IEQ_SLEW_RATE;
43 typedef enum { RA_AXIS, DEC_AXIS } IEQ_AXIS;
44 typedef enum { IEQ_N, IEQ_S, IEQ_W, IEQ_E } IEQ_DIRECTION;
46 
47 typedef struct
48 {
56 } IEQInfo;
57 
58 typedef struct
59 {
60  std::string Model;
61  std::string MainBoardFirmware;
62  std::string ControllerFirmware;
63  std::string RAFirmware;
64  std::string DEFirmware;
65 } FirmwareInfo;
66 
67 /**************************************************************************
68  Misc.
69 **************************************************************************/
70 
71 void set_ieqpro_debug(bool enable);
72 void set_ieqpro_simulation(bool enable);
73 void set_ieqpro_device(const char *name);
74 
75 /**************************************************************************
76  Simulation
77 **************************************************************************/
84 void set_sim_ra(double ra);
85 void set_sim_dec(double dec);
86 void set_sim_guide_rate(double rate);
87 
88 /**************************************************************************
89  Diagnostics
90 **************************************************************************/
91 bool check_ieqpro_connection(int fd);
92 
93 /**************************************************************************
94  Get Info
95 **************************************************************************/
97 bool get_ieqpro_status(int fd, IEQInfo *info);
99 bool get_ieqpro_firmware(int fd, FirmwareInfo *info);
101 bool get_ieqpro_main_firmware(int fd, FirmwareInfo *info);
103 bool get_ieqpro_radec_firmware(int fd, FirmwareInfo *info);
105 bool get_ieqpro_model(int fd, FirmwareInfo *info);
107 bool get_ieqpro_coords(int fd, double *ra, double *dec);
109 bool get_ieqpro_utc_date_time(int fd, double *utc_hours, int *yy, int *mm, int *dd, int *hh, int *minute, int *ss);
110 
111 /**************************************************************************
112  Motion
113 **************************************************************************/
114 bool start_ieqpro_motion(int fd, IEQ_DIRECTION dir);
115 bool stop_ieqpro_motion(int fd, IEQ_DIRECTION dir);
116 bool set_ieqpro_slew_rate(int fd, IEQ_SLEW_RATE rate);
117 bool set_ieqpro_custom_ra_track_rate(int fd, double rate);
118 bool set_ieqpro_custom_de_track_rate(int fd, double rate);
119 bool set_ieqpro_track_mode(int fd, IEQ_TRACK_RATE rate);
120 bool set_ieqpro_track_enabled(int fd, bool enabled);
121 bool abort_ieqpro(int fd);
122 bool slew_ieqpro(int fd);
123 bool sync_ieqpro(int fd);
124 bool set_ieqpro_ra(int fd, double ra);
125 bool set_ieqpro_dec(int fd, double dec);
126 
127 /**************************************************************************
128  Home
129 **************************************************************************/
130 bool find_ieqpro_home(int fd);
131 bool goto_ieqpro_home(int fd);
132 bool set_ieqpro_current_home(int fd);
133 
134 /**************************************************************************
135  Park
136 **************************************************************************/
137 bool park_ieqpro(int fd);
138 bool unpark_ieqpro(int fd);
139 
140 /**************************************************************************
141  Guide
142 **************************************************************************/
143 bool set_ieqpro_guide_rate(int fd, double raRate, double deRate);
144 bool get_ieqpro_guide_rate(int fd, double *raRate, double *deRate);
145 bool start_ieqpro_guide(int fd, IEQ_DIRECTION dir, uint32_t ms);
146 
147 /**************************************************************************
148  Time & Location
149 **************************************************************************/
150 bool set_ieqpro_longitude(int fd, double longitude);
151 bool set_ieqpro_latitude(int fd, double latitude);
152 bool get_ieqpro_longitude(int fd, double *longitude);
153 bool get_ieqpro_latitude(int fd, double *latitude);
154 bool set_ieqpro_local_date(int fd, int yy, int mm, int dd);
155 bool set_ieqpro_local_time(int fd, int hh, int mm, int ss);
156 bool set_ieqpro_utc_offset(int fd, double offset_hours);
157 bool set_ieqpro_daylight_saving(int fd, bool enabled);
double ra
double dec
bool set_ieqpro_custom_de_track_rate(int fd, double rate)
bool goto_ieqpro_home(int fd)
bool set_ieqpro_latitude(int fd, double latitude)
bool sync_ieqpro(int fd)
bool set_ieqpro_current_home(int fd)
void set_sim_gps_status(IEQ_GPS_STATUS value)
bool start_ieqpro_guide(int fd, IEQ_DIRECTION dir, uint32_t ms)
void set_sim_dec(double dec)
@ DEC_AXIS
@ RA_AXIS
bool get_ieqpro_main_firmware(int fd, FirmwareInfo *info)
bool find_ieqpro_home(int fd)
bool slew_ieqpro(int fd)
IEQ_HOME_OPERATION
@ IEQ_FIND_HOME
@ IEQ_SET_HOME
@ IEQ_GOTO_HOME
void set_sim_hemisphere(IEQ_HEMISPHERE value)
bool set_ieqpro_local_date(int fd, int yy, int mm, int dd)
bool get_ieqpro_utc_date_time(int fd, double *utc_hours, int *yy, int *mm, int *dd, int *hh, int *minute, int *ss)
IEQ_TRACK_RATE
@ TR_SIDEREAL
@ TR_LUNAR
@ TR_KING
@ TR_SOLAR
@ TR_CUSTOM
IEQ_TIME_SOURCE
@ TS_RS232
@ TS_GPS
@ TS_CONTROLLER
bool get_ieqpro_status(int fd, IEQInfo *info)
IEQ_HEMISPHERE
@ HEMI_NORTH
@ HEMI_SOUTH
IEQ_SLEW_RATE
@ SR_1
@ SR_6
@ SR_8
@ SR_5
@ SR_MAX
@ SR_4
@ SR_2
@ SR_7
@ SR_3
bool set_ieqpro_daylight_saving(int fd, bool enabled)
bool set_ieqpro_local_time(int fd, int hh, int mm, int ss)
void set_ieqpro_debug(bool enable)
bool get_ieqpro_coords(int fd, double *ra, double *dec)
bool park_ieqpro(int fd)
bool get_ieqpro_radec_firmware(int fd, FirmwareInfo *info)
void set_ieqpro_device(const char *name)
void set_ieqpro_simulation(bool enable)
bool get_ieqpro_firmware(int fd, FirmwareInfo *info)
bool set_ieqpro_custom_ra_track_rate(int fd, double rate)
bool set_ieqpro_dec(int fd, double dec)
IEQ_FIRMWARE
@ FW_CONTROLLER
@ FW_MODEL
@ FW_BOARD
@ FW_DEC
@ FW_RA
bool set_ieqpro_guide_rate(int fd, double raRate, double deRate)
bool abort_ieqpro(int fd)
bool unpark_ieqpro(int fd)
bool set_ieqpro_track_mode(int fd, IEQ_TRACK_RATE rate)
void set_sim_system_status(IEQ_SYSTEM_STATUS value)
bool get_ieqpro_model(int fd, FirmwareInfo *info)
void set_sim_slew_rate(IEQ_SLEW_RATE value)
bool get_ieqpro_latitude(int fd, double *latitude)
bool check_ieqpro_connection(int fd)
IEQ_DIRECTION
@ IEQ_E
@ IEQ_S
@ IEQ_N
@ IEQ_W
bool set_ieqpro_ra(int fd, double ra)
IEQ_GPS_STATUS
@ GPS_DATA_OK
@ GPS_OFF
@ GPS_ON
bool set_ieqpro_slew_rate(int fd, IEQ_SLEW_RATE rate)
IEQ_SYSTEM_STATUS
@ ST_STOPPED
@ ST_MERIDIAN_FLIPPING
@ ST_PARKED
@ ST_TRACKING_PEC_ON
@ ST_TRACKING_PEC_OFF
@ ST_SLEWING
@ ST_GUIDING
@ ST_HOME
bool get_ieqpro_guide_rate(int fd, double *raRate, double *deRate)
bool start_ieqpro_motion(int fd, IEQ_DIRECTION dir)
bool set_ieqpro_utc_offset(int fd, double offset_hours)
void set_sim_time_source(IEQ_TIME_SOURCE value)
bool set_ieqpro_longitude(int fd, double longitude)
bool get_ieqpro_longitude(int fd, double *longitude)
void set_sim_guide_rate(double rate)
void set_sim_ra(double ra)
bool set_ieqpro_track_enabled(int fd, bool enabled)
bool stop_ieqpro_motion(int fd, IEQ_DIRECTION dir)
void set_sim_track_rate(IEQ_TRACK_RATE value)
int fd
Definition: intelliscope.c:43
struct FirmwareInfo FirmwareInfo
std::string ControllerFirmware
std::string MainBoardFirmware
IEQ_GPS_STATUS gpsStatus
IEQ_SYSTEM_STATUS rememberSystemStatus
IEQ_SLEW_RATE slewRate
IEQ_TIME_SOURCE timeSource
IEQ_SYSTEM_STATUS systemStatus
IEQ_TRACK_RATE trackRate
IEQ_HEMISPHERE hemisphere