Debian Codegraph @

libs/indibase/inditelescope.h

raw symbols SCIP
1 /*******************************************************************************
2 Copyright(c) 2011 Gerry Rozema, 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
19 #pragma once
20
21 #include "defaultdevice.h"cxx . . $ `<file>/libs/indibase/defaultdevice.h`/
22 #include "libastro.h"cxx . . $ `<file>/libs/indicore/libastro.h`/
23 #include "indipropertyswitch.h"cxx . . $ `<file>/libs/indidevice/property/indipropertyswitch.h`/
24 #include <libnova/julian_day.h>
25
26 #include <string>
27
28 /**
29 * \class Telescope
30 * \brief Class to provide general functionality of a telescope device.
31 *
32 * Developers need to subclass Telescope to implement any driver for telescopes within INDI.
33 *
34 * Implementing a basic telescope driver involves the child class performing the following steps:
35 * <ul>
36 * <li>The child class should define the telescope capabilities via the TelescopeCapability structure
37 * and sets in the default constructor.</li>
38 * <li>If the telescope has additional properties, the child class should override initProperties and
39 * initialize the respective additional properties.</li>
40 * <li>The child class can optionally set the connection mode in initProperties(). By default the driver
41 * provide controls for both serial and TCP/IP connections.</li>
42 * <li>Once the parent class calls Connect(), the child class attempts to connect to the telescope and
43 * return either success of failure</li>
44 * <li>Telescope calls updateProperties() to enable the child class to define which properties to
45 * send to the client upon connection</li>
46 * <li>Telescope calls ReadScopeStatus() to check the link to the telescope and update its state
47 * and position. The child class should call newRaDec() whenever
48 * a new value is read from the telescope.</li>
49 * <li>The child class should implement Goto() and Sync(), and Park()/UnPark() if applicable.</li>
50 * <li>Telescope calls disconnect() when the client request a disconnection. The child class
51 * should remove any additional properties it defined in updateProperties() if applicable</li>
52 * </ul>
53 *
54 * TrackState is used to monitor changes in Tracking state. There are three main tracking properties:
55 * + TrackMode: Changes tracking mode or rate. Common modes are TRACK_SIDEREAL, TRACK_LUNAR, TRACK_SOLAR, and TRACK_CUSTOM
56 * + TrackRate: If the mount supports custom tracking rates, it should set the capability flag TELESCOPE_HAS_TRACK_RATE. If the user
57 * changes the custom tracking rates while the mount is tracking, it it sent to the child class via SetTrackRate(...) function.
58 * The base class will reject any track rates that switch from positive to negative (reverse) tracking rates as the mount must be stopped before
59 * such change takes place.
60 * + TrackState: Engages or Disengages tracking. When engaging tracking, the child class should take the necessary steps to set the appropiate TrackMode and TrackRate
61 * properties before or after engaging tracking as governed by the mount protocol.
62 *
63 * Ideally, the child class should avoid changing property states directly within a function call from the base class as such state changes take place in the base class
64 * after checking the return values of such functions.
65 * \author Jasem Mutlaq, Gerry Rozema
66 * \see TelescopeSimulator and SynScan drivers for examples of implementations of Telescope.
67 */
68 namespace INDIcxx . . $ INDI/
69 {
70
71 class Telescopecxx . . $ INDI/Telescope# : public DefaultDevicecxx . . $ INDI/DefaultDevice#
72 {
73 public:
74 enum TelescopeStatuscxx . . $ INDI/Telescope#TelescopeStatus#
75 {
76 SCOPE_IDLEcxx . . $ INDI/Telescope#SCOPE_IDLE.,
77 SCOPE_SLEWINGcxx . . $ INDI/Telescope#SCOPE_SLEWING.,
78 SCOPE_TRACKINGcxx . . $ INDI/Telescope#SCOPE_TRACKING.,
79 SCOPE_PARKINGcxx . . $ INDI/Telescope#SCOPE_PARKING.,
80 SCOPE_PARKEDcxx . . $ INDI/Telescope#SCOPE_PARKED.
81 };
82 enum TelescopeMotionCommandcxx . . $ INDI/Telescope#TelescopeMotionCommand#
83 {
84 MOTION_STARTcxx . . $ INDI/Telescope#MOTION_START. = 0,
85 MOTION_STOPcxx . . $ INDI/Telescope#MOTION_STOP.
86 };
87 enum TelescopeSlewRatecxx . . $ INDI/Telescope#TelescopeSlewRate#
88 {
89 SLEW_GUIDEcxx . . $ INDI/Telescope#SLEW_GUIDE.,
90 SLEW_CENTERINGcxx . . $ INDI/Telescope#SLEW_CENTERING.,
91 SLEW_FINDcxx . . $ INDI/Telescope#SLEW_FIND.,
92 SLEW_MAXcxx . . $ INDI/Telescope#SLEW_MAX.
93 };
94 enum TelescopeTrackModecxx . . $ INDI/Telescope#TelescopeTrackMode#
95 {
96 TRACK_SIDEREALcxx . . $ INDI/Telescope#TRACK_SIDEREAL.,
97 TRACK_SOLARcxx . . $ INDI/Telescope#TRACK_SOLAR.,
98 TRACK_LUNARcxx . . $ INDI/Telescope#TRACK_LUNAR.,
99 TRACK_CUSTOMcxx . . $ INDI/Telescope#TRACK_CUSTOM.
100 };
101 enum TelescopeTrackStatecxx . . $ INDI/Telescope#TelescopeTrackState#
102 {
103 TRACK_ONcxx . . $ INDI/Telescope#TRACK_ON.,
104 TRACK_OFFcxx . . $ INDI/Telescope#TRACK_OFF.,
105 TRACK_UNKNOWNcxx . . $ INDI/Telescope#TRACK_UNKNOWN.
106 };
107 enum TelescopeParkDatacxx . . $ INDI/Telescope#TelescopeParkData#
108 {
109 PARK_NONEcxx . . $ INDI/Telescope#PARK_NONE.,
110 PARK_RA_DECcxx . . $ INDI/Telescope#PARK_RA_DEC.,
111 PARK_HA_DECcxx . . $ INDI/Telescope#PARK_HA_DEC.,
112 PARK_AZ_ALTcxx . . $ INDI/Telescope#PARK_AZ_ALT.,
113 PARK_RA_DEC_ENCODERcxx . . $ INDI/Telescope#PARK_RA_DEC_ENCODER.,
114 PARK_AZ_ALT_ENCODERcxx . . $ INDI/Telescope#PARK_AZ_ALT_ENCODER.
115 };
116 enum TelescopeLocationcxx . . $ INDI/Telescope#TelescopeLocation#
117 {
118 LOCATION_LATITUDEcxx . . $ INDI/Telescope#LOCATION_LATITUDE.,
119 LOCATION_LONGITUDEcxx . . $ INDI/Telescope#LOCATION_LONGITUDE.,
120 LOCATION_ELEVATIONcxx . . $ INDI/Telescope#LOCATION_ELEVATION.
121 };
122 enum TelescopePierSidecxx . . $ INDI/Telescope#TelescopePierSide#
123 {
124 PIER_UNKNOWNcxx . . $ INDI/Telescope#PIER_UNKNOWN. = -1,
125 PIER_WESTcxx . . $ INDI/Telescope#PIER_WEST. = 0,
126 PIER_EASTcxx . . $ INDI/Telescope#PIER_EAST. = 1
127 };
128
129 enum TelescopePECStatecxx . . $ INDI/Telescope#TelescopePECState#
130 {
131 PEC_UNKNOWNcxx . . $ INDI/Telescope#PEC_UNKNOWN. = -1,
132 PEC_OFFcxx . . $ INDI/Telescope#PEC_OFF. = 0,
133 PEC_ONcxx . . $ INDI/Telescope#PEC_ON. = 1
134 };
135
136 /*! Dome Locking Policy */
137 enum DomeLockingPolicycxx . . $ INDI/Telescope#DomeLockingPolicy#
138 {
139 DOME_IGNOREDcxx . . $ INDI/Telescope#DOME_IGNORED., /*!< Dome is ignored. Mount can park or unpark irrespective of dome parking status. */
140 DOME_LOCKScxx . . $ INDI/Telescope#DOME_LOCKS., /*!< Dome locks. Mount can only unpark if dome is already unparked. */
141 };
142
143 /**
144 * \struct TelescopeConnection
145 * \brief Holds the connection mode of the telescope.
146 */
147 enumcxx . . $ INDI/Telescope#$anonymous_type_0#
148 {
149 CONNECTION_NONEcxx . . $ INDI/Telescope#CONNECTION_NONE. = 1 << 0, /** Do not use any connection plugin */
150 CONNECTION_SERIALcxx . . $ INDI/Telescope#CONNECTION_SERIAL. = 1 << 1, /** For regular serial and bluetooth connections */
151 CONNECTION_TCPcxx . . $ INDI/Telescope#CONNECTION_TCP. = 1 << 2 /** For Wired and WiFI connections */
152 } TelescopeConnectioncxx . . $ INDI/Telescope#TelescopeConnection.;
153
154 /**
155 * \struct TelescopeCapability
156 * \brief Holds the capabilities of a telescope.
157 */
158 enumcxx . . $ INDI/Telescope#$anonymous_type_1#
159 {
160 TELESCOPE_CAN_GOTOcxx . . $ INDI/Telescope#TELESCOPE_CAN_GOTO. = 1 << 0, /** Can the telescope go to to specific coordinates? */
161 TELESCOPE_CAN_SYNCcxx . . $ INDI/Telescope#TELESCOPE_CAN_SYNC. = 1 << 1, /** Can the telescope sync to specific coordinates? */
162 TELESCOPE_CAN_PARKcxx . . $ INDI/Telescope#TELESCOPE_CAN_PARK. = 1 << 2, /** Can the telescope park? */
163 TELESCOPE_CAN_ABORTcxx . . $ INDI/Telescope#TELESCOPE_CAN_ABORT. = 1 << 3, /** Can the telescope abort motion? */
164 TELESCOPE_HAS_TIMEcxx . . $ INDI/Telescope#TELESCOPE_HAS_TIME. = 1 << 4, /** Does the telescope have configurable date and time settings? */
165 TELESCOPE_HAS_LOCATIONcxx . . $ INDI/Telescope#TELESCOPE_HAS_LOCATION. = 1 << 5, /** Does the telescope have configuration location settings? */
166 TELESCOPE_HAS_PIER_SIDEcxx . . $ INDI/Telescope#TELESCOPE_HAS_PIER_SIDE. = 1 << 6, /** Does the telescope have pier side property? */
167 TELESCOPE_HAS_PECcxx . . $ INDI/Telescope#TELESCOPE_HAS_PEC. = 1 << 7, /** Does the telescope have PEC playback? */
168 TELESCOPE_HAS_TRACK_MODEcxx . . $ INDI/Telescope#TELESCOPE_HAS_TRACK_MODE. = 1 << 8, /** Does the telescope have track modes (sidereal, lunar, solar..etc)? */
169 TELESCOPE_CAN_CONTROL_TRACKcxx . . $ INDI/Telescope#TELESCOPE_CAN_CONTROL_TRACK. = 1 << 9, /** Can the telescope engage and disengage tracking? */
170 TELESCOPE_HAS_TRACK_RATEcxx . . $ INDI/Telescope#TELESCOPE_HAS_TRACK_RATE. = 1 << 10, /** Does the telescope have custom track rates? */
171 TELESCOPE_HAS_PIER_SIDE_SIMULATIONcxx . . $ INDI/Telescope#TELESCOPE_HAS_PIER_SIDE_SIMULATION. = 1 << 11, /** Does the telescope simulate the pier side property? */
172 TELESCOPE_CAN_TRACK_SATELLITEcxx . . $ INDI/Telescope#TELESCOPE_CAN_TRACK_SATELLITE. = 1 << 12, /** Can the telescope track satellites? */
173 } TelescopeCapabilitycxx . . $ INDI/Telescope#TelescopeCapability.;
174
175 Telescopecxx . . $ INDI/Telescope#Telescope(49f6e7a06ebc5aa8).();
176 virtual ~cxx . . $ INDI/Telescope#`~Telescope`(49f6e7a06ebc5aa8).Telescopecxx . . $ INDI/Telescope#();
177
178 virtual bool ISNewNumbercxx . . $ INDI/Telescope#ISNewNumber(b910d3521abb33fb).(const char *dev, const char *name, double values[], char *names[], int n) override;
179 virtual bool ISNewTextcxx . . $ INDI/Telescope#ISNewText(1f3dbebc116ed926).(const char *dev, const char *name, char *texts[], char *names[], int n) override;
180 virtual bool ISNewSwitchcxx . . $ INDI/Telescope#ISNewSwitch(e439c05866add404).(const char *dev, const char *name, ISStatecxx . . $ ISState# *states, char *names[], int n) override;
181 virtual void ISGetPropertiescxx . . $ INDI/Telescope#ISGetProperties(85c52e162fed56f9).(const char *dev) override;
182 virtual bool ISSnoopDevicecxx . . $ INDI/Telescope#ISSnoopDevice(4c5c830808cba56b).(XMLEle *root) override;
183
184 /**
185 * @brief GetTelescopeCapability returns the capability of the Telescope
186 */
187 uint32_tcxx . . $ uint32_t# GetTelescopeCapabilitycxx . . $ INDI/Telescope#GetTelescopeCapability(ddd8539a2fcdd4ce).() const
188 {
189 return capabilitycxx . . $ INDI/Telescope#capability.;
190 }
191
192 /**
193 * @brief SetTelescopeCapability sets the Telescope capabilities. All capabilities must be initialized.
194 * @param cap ORed list of telescope capabilities.
195 * @param slewRateCount Number of slew rates supported by the telescope. If < 4,
196 * no slew rate properties will be defined to the client. If >=4, the driver will construct the default
197 * slew rate property TELESCOPE_SLEW_RATE with SLEW_GUIDE, SLEW_CENTERING, SLEW_FIND, and SLEW_MAX
198 * members where SLEW_GUIDE is the at the lowest setting and SLEW_MAX is at the highest.
199 */
200 void SetTelescopeCapabilitycxx . . $ INDI/Telescope#SetTelescopeCapability(cc289a6b3dfc48da).(uint32_tcxx . . $ uint32_t# cap, uint8_tcxx . . $ uint8_t# slewRateCount);
201
202 /**
203 * @return True if telescope support goto operations
204 */
205 bool CanGOTOcxx . . $ INDI/Telescope#CanGOTO(c9857a73d68e59ba).()
206 {
207 return capabilitycxx . . $ INDI/Telescope#capability. & TELESCOPE_CAN_GOTOcxx . . $ INDI/Telescope#TELESCOPE_CAN_GOTO.;
208 }
209
210 /**
211 * @return True if telescope support sync operations
212 */
213 bool CanSynccxx . . $ INDI/Telescope#CanSync(c9857a73d68e59ba).()
214 {
215 return capabilitycxx . . $ INDI/Telescope#capability. & TELESCOPE_CAN_SYNCcxx . . $ INDI/Telescope#TELESCOPE_CAN_SYNC.;
216 }
217
218 /**
219 * @return True if telescope can abort motion.
220 */
221 bool CanAbortcxx . . $ INDI/Telescope#CanAbort(c9857a73d68e59ba).()
222 {
223 return capabilitycxx . . $ INDI/Telescope#capability. & TELESCOPE_CAN_ABORTcxx . . $ INDI/Telescope#TELESCOPE_CAN_ABORT.;
224 }
225
226 /**
227 * @return True if telescope can park.
228 */
229 bool CanParkcxx . . $ INDI/Telescope#CanPark(c9857a73d68e59ba).()
230 {
231 return capabilitycxx . . $ INDI/Telescope#capability. & TELESCOPE_CAN_PARKcxx . . $ INDI/Telescope#TELESCOPE_CAN_PARK.;
232 }
233
234 /**
235 * @return True if telescope can enagle and disengage tracking.
236 */
237 bool CanControlTrackcxx . . $ INDI/Telescope#CanControlTrack(c9857a73d68e59ba).()
238 {
239 return capabilitycxx . . $ INDI/Telescope#capability. & TELESCOPE_CAN_CONTROL_TRACKcxx . . $ INDI/Telescope#TELESCOPE_CAN_CONTROL_TRACK.;
240 }
241
242 /**
243 * @return True if telescope time can be updated.
244 */
245 bool HasTimecxx . . $ INDI/Telescope#HasTime(c9857a73d68e59ba).()
246 {
247 return capabilitycxx . . $ INDI/Telescope#capability. & TELESCOPE_HAS_TIMEcxx . . $ INDI/Telescope#TELESCOPE_HAS_TIME.;
248 }
249
250 /**
251 * @return True if telescope location can be updated.
252 */
253 bool HasLocationcxx . . $ INDI/Telescope#HasLocation(c9857a73d68e59ba).()
254 {
255 return capabilitycxx . . $ INDI/Telescope#capability. & TELESCOPE_HAS_LOCATIONcxx . . $ INDI/Telescope#TELESCOPE_HAS_LOCATION.;
256 }
257
258 /**
259 * @return True if telescope supports pier side property
260 */
261 bool HasPierSidecxx . . $ INDI/Telescope#HasPierSide(c9857a73d68e59ba).()
262 {
263 return capabilitycxx . . $ INDI/Telescope#capability. & TELESCOPE_HAS_PIER_SIDEcxx . . $ INDI/Telescope#TELESCOPE_HAS_PIER_SIDE.;
264 }
265
266 /**
267 * @return True if telescope simulates pier side property
268 */
269 bool HasPierSideSimulationcxx . . $ INDI/Telescope#HasPierSideSimulation(c9857a73d68e59ba).()
270 {
271 return capabilitycxx . . $ INDI/Telescope#capability. & TELESCOPE_HAS_PIER_SIDE_SIMULATIONcxx . . $ INDI/Telescope#TELESCOPE_HAS_PIER_SIDE_SIMULATION.;
272 }
273 /**
274 * @return True if telescope can track satellites
275 */
276 bool CanTrackSatellitecxx . . $ INDI/Telescope#CanTrackSatellite(c9857a73d68e59ba).()
277 {
278 return capabilitycxx . . $ INDI/Telescope#capability. & TELESCOPE_CAN_TRACK_SATELLITEcxx . . $ INDI/Telescope#TELESCOPE_CAN_TRACK_SATELLITE.;
279 }
280 /**
281 * @return True if telescope supports PEC playback property
282 */
283 bool HasPECStatecxx . . $ INDI/Telescope#HasPECState(c9857a73d68e59ba).()
284 {
285 return capabilitycxx . . $ INDI/Telescope#capability. & TELESCOPE_HAS_PECcxx . . $ INDI/Telescope#TELESCOPE_HAS_PEC.;
286 }
287
288 /**
289 * @return True if telescope supports track modes
290 */
291 bool HasTrackModecxx . . $ INDI/Telescope#HasTrackMode(c9857a73d68e59ba).()
292 {
293 return capabilitycxx . . $ INDI/Telescope#capability. & TELESCOPE_HAS_TRACK_MODEcxx . . $ INDI/Telescope#TELESCOPE_HAS_TRACK_MODE.;
294 }
295
296 /**
297 * @return True if telescope supports custom tracking rates.
298 */
299 bool HasTrackRatecxx . . $ INDI/Telescope#HasTrackRate(c9857a73d68e59ba).()
300 {
301 return capabilitycxx . . $ INDI/Telescope#capability. & TELESCOPE_HAS_TRACK_RATEcxx . . $ INDI/Telescope#TELESCOPE_HAS_TRACK_RATE.;
302 }
303
304 /** \brief Called to initialize basic properties required all the time */
305 virtual bool initPropertiescxx . . $ INDI/Telescope#initProperties(c9857a73d68e59ba).() override;
306 /** \brief Called when connected state changes, to add/remove properties */
307 virtual bool updatePropertiescxx . . $ INDI/Telescope#updateProperties(c9857a73d68e59ba).() override;
308
309 /** \brief perform handshake with device to check communication */
310 virtual bool Handshakecxx . . $ INDI/Telescope#Handshake(c9857a73d68e59ba).();
311
312 /** \brief Called when setTimer() time is up */
313 virtual void TimerHitcxx . . $ INDI/Telescope#TimerHit(49f6e7a06ebc5aa8).() override;
314
315 /**
316 * \brief setParkDataType Sets the type of parking data stored in the park data file and
317 * presented to the user.
318 * \param type parking data type. If PARK_NONE then no properties will be presented to the
319 * user for custom parking position.
320 */
321 void SetParkDataTypecxx . . $ INDI/Telescope#SetParkDataType(155a06dc8b4a1636).(TelescopeParkDatacxx . . $ INDI/Telescope#TelescopeParkData# type);
322
323 /**
324 * @brief InitPark Loads parking data (stored in ~/.indi/ParkData.xml) that contains parking status
325 * and parking position.
326 * @return True if loading is successful and data is read, false otherwise. On success, you must call
327 * SetAxis1ParkDefault() and SetAxis2ParkDefault() to set the default parking values. On failure,
328 * you must call SetAxis1ParkDefault() and SetAxis2ParkDefault() to set the default parking values
329 * in addition to SetAxis1Park() and SetAxis2Park() to set the current parking position.
330 */
331 bool InitParkcxx . . $ INDI/Telescope#InitPark(c9857a73d68e59ba).();
332
333 /**
334 * @brief isParked is mount currently parked?
335 * @return True if parked, false otherwise.
336 */
337 bool isParkedcxx . . $ INDI/Telescope#isParked(c9857a73d68e59ba).();
338
339 /**
340 * @brief SetParked Change the mount parking status. The data park file (stored in
341 * ~/.indi/ParkData.xml) is updated in the process.
342 * @param isparked set to true if parked, false otherwise.
343 */
344 virtual void SetParkedcxx . . $ INDI/Telescope#SetParked(b45ddcbc8423892c).(bool isparked);
345
346 /**
347 * @return Get current RA/AZ parking position.
348 */
349 double GetAxis1Parkcxx . . $ INDI/Telescope#GetAxis1Park(21b6c25e127938e2).() const;
350
351 /**
352 * @return Get default RA/AZ parking position.
353 */
354 double GetAxis1ParkDefaultcxx . . $ INDI/Telescope#GetAxis1ParkDefault(21b6c25e127938e2).() const;
355
356 /**
357 * @return Get current DEC/ALT parking position.
358 */
359 double GetAxis2Parkcxx . . $ INDI/Telescope#GetAxis2Park(21b6c25e127938e2).() const;
360
361 /**
362 * @return Get defailt DEC/ALT parking position.
363 */
364 double GetAxis2ParkDefaultcxx . . $ INDI/Telescope#GetAxis2ParkDefault(21b6c25e127938e2).() const;
365
366 /**
367 * @brief SetRAPark Set current RA/AZ parking position. The data park file (stored in
368 * ~/.indi/ParkData.xml) is updated in the process.
369 * @param value current Axis 1 value (RA or AZ either in angles or encoder values as specified
370 * by the TelescopeParkData type).
371 */
372 void SetAxis1Parkcxx . . $ INDI/Telescope#SetAxis1Park(ba8836b59fb42830).(double value);
373
374 /**
375 * @brief SetRAPark Set default RA/AZ parking position.
376 * @param value Default Axis 1 value (RA or AZ either in angles or encoder values as specified
377 * by the TelescopeParkData type).
378 */
379 void SetAxis1ParkDefaultcxx . . $ INDI/Telescope#SetAxis1ParkDefault(ba8836b59fb42830).(double steps);
380
381 /**
382 * @brief SetDEPark Set current DEC/ALT parking position. The data park file (stored in
383 * ~/.indi/ParkData.xml) is updated in the process.
384 * @param value current Axis 1 value (DEC or ALT either in angles or encoder values as specified
385 * by the TelescopeParkData type).
386 */
387 void SetAxis2Parkcxx . . $ INDI/Telescope#SetAxis2Park(ba8836b59fb42830).(double steps);
388
389 /**
390 * @brief SetDEParkDefault Set default DEC/ALT parking position.
391 * @param value Default Axis 2 value (DEC or ALT either in angles or encoder values as specified
392 * by the TelescopeParkData type).
393 */
394 void SetAxis2ParkDefaultcxx . . $ INDI/Telescope#SetAxis2ParkDefault(ba8836b59fb42830).(double steps);
395
396 /**
397 * @brief isLocked is mount currently locked?
398 * @return true if lock status equals true and Dome Policy is Dome Locks.
399 */
400 bool isLockedcxx . . $ INDI/Telescope#isLocked(50ce9a9e25b4a850).() const;
401
402 // Joystick helpers
403 static void joystickHelpercxx . . $ INDI/Telescope#joystickHelper(1e492085a1d522a7).(const char *joystick_n, double mag, double angle, void *context);
404 static void axisHelpercxx . . $ INDI/Telescope#axisHelper(5bbf07bc428014b).(const char *axis_n, double value, void *context);
405 static void buttonHelpercxx . . $ INDI/Telescope#buttonHelper(a239845c4cee3c3a).(const char *button_n, ISStatecxx . . $ ISState# state, void *context);
406
407 /**
408 * @brief setTelescopeConnection Set telescope connection mode. Child class should call this
409 * in the constructor before Telescope registers any connection interfaces
410 * @param value ORed combination of TelescopeConnection values.
411 */
412 void setTelescopeConnectioncxx . . $ INDI/Telescope#setTelescopeConnection(bd13939ee53222b8).(const uint8_tcxx . . $ uint8_t# &value);
413
414 /**
415 * @return Get current telescope connection mode
416 */
417 uint8_tcxx . . $ uint8_t# getTelescopeConnectioncxx . . $ INDI/Telescope#getTelescopeConnection(bd807b21b9713a30).() const;
418
419 void setPierSidecxx . . $ INDI/Telescope#setPierSide(ca2f721bf425513d).(TelescopePierSidecxx . . $ INDI/Telescope#TelescopePierSide# side);
420 TelescopePierSidecxx . . $ INDI/Telescope#TelescopePierSide# getPierSidecxx . . $ INDI/Telescope#getPierSide(3a13e73dd21529c0).()
421 {
422 return currentPierSidecxx . . $ INDI/Telescope#currentPierSide.;
423 }
424
425 void setPECStatecxx . . $ INDI/Telescope#setPECState(53c0f9cab08feb9e).(TelescopePECStatecxx . . $ INDI/Telescope#TelescopePECState# state);
426 TelescopePECStatecxx . . $ INDI/Telescope#TelescopePECState# getPECStatecxx . . $ INDI/Telescope#getPECState(2a81a8a5747f48c3).()
427 {
428 return currentPECStatecxx . . $ INDI/Telescope#currentPECState.;
429 }
430
431 protected:
432 virtual bool saveConfigItemscxx . . $ INDI/Telescope#saveConfigItems(dc9e5a301483124c).(FILEcxx . . $ FILE# *fp) override;
433
434 /** \brief The child class calls this function when it has updates */
435 void NewRaDeccxx . . $ INDI/Telescope#NewRaDec(bc12c9ec15586e6a).(double ra, double dec);
436
437 /**
438 * \brief Read telescope status.
439 *
440 * This function checks the following:
441 * <ol>
442 * <li>Check if the link to the telescope is alive.</li>
443 * <li>Update telescope status: Idle, Slewing, Parking..etc.</li>
444 * <li>Read coordinates</li>
445 * </ol>
446 * \return True if reading scope status is OK, false if an error is encounterd.
447 * \note This function is not implemented in Telescope, it must be implemented in the
448 * child class
449 */
450 virtual bool ReadScopeStatuscxx . . $ INDI/Telescope#ReadScopeStatus(c9857a73d68e59ba).() = 0;
451
452 /**
453 * \brief Move the scope to the supplied RA and DEC coordinates
454 * \return True if successful, false otherwise
455 * \note If not implemented by the child class, this function by default returns false with a
456 * warning message.
457 */
458 virtual bool Gotocxx . . $ INDI/Telescope#Goto(828b76dce88fac).(double ra, double dec);
459
460 /**
461 * \brief Set the telescope current RA and DEC coordinates to the supplied RA and DEC coordinates
462 * \return True if successful, false otherwise
463 * \note If not implemented by the child class, this function by default returns false with a
464 * warning message.
465 */
466 virtual bool Synccxx . . $ INDI/Telescope#Sync(828b76dce88fac).(double ra, double dec);
467
468 /**
469 * \brief Start or Stop the telescope motion in the direction dir.
470 * \param dir direction of motion
471 * \param command Start or Stop command
472 * \return True if successful, false otherwise
473 * \note If not implemented by the child class, this function by default returns false with a
474 * warning message.
475 */
476 virtual bool MoveNScxx . . $ INDI/Telescope#MoveNS(ffb1bb92c4b05851).(INDI_DIR_NScxx . . $ INDI_DIR_NS# dir, TelescopeMotionCommandcxx . . $ INDI/Telescope#TelescopeMotionCommand# command);
477
478 /**
479 * \brief Move the telescope in the direction dir.
480 * \param dir direction of motion
481 * \param command Start or Stop command
482 * \return True if successful, false otherwise
483 * \note If not implemented by the child class, this function by default returns false with a
484 * warning message.
485 */
486 virtual bool MoveWEcxx . . $ INDI/Telescope#MoveWE(a98f225cdad633ca).(INDI_DIR_WEcxx . . $ INDI_DIR_WE# dir, TelescopeMotionCommandcxx . . $ INDI/Telescope#TelescopeMotionCommand# command);
487
488 /**
489 * \brief Park the telescope to its home position.
490 * \return True if successful, false otherwise
491 * \note If not implemented by the child class, this function by default returns false with a
492 * warning message.
493 */
494 virtual bool Parkcxx . . $ INDI/Telescope#Park(c9857a73d68e59ba).();
495
496 /**
497 * \brief Unpark the telescope if already parked.
498 * \return True if successful, false otherwise
499 * \note If not implemented by the child class, this function by default returns false with a
500 * warning message.
501 */
502 virtual bool UnParkcxx . . $ INDI/Telescope#UnPark(c9857a73d68e59ba).();
503
504 /**
505 * \brief Abort any telescope motion including tracking if possible.
506 * \return True if successful, false otherwise
507 * \note If not implemented by the child class, this function by default returns false with a
508 * warning message.
509 */
510 virtual bool Abortcxx . . $ INDI/Telescope#Abort(c9857a73d68e59ba).();
511
512 /**
513 * @brief SetTrackMode Set active tracking mode. Do not change track state.
514 * @param mode Index of track mode.
515 * @return True if successful, false otherwise
516 * @note If not implemented by the child class, this function by default returns false with a
517 * warning message.
518 */
519 virtual bool SetTrackModecxx . . $ INDI/Telescope#SetTrackMode(cef82f9be00a201a).(uint8_tcxx . . $ uint8_t# mode);
520
521 /**
522 * @brief SetTrackRate Set custom tracking rates.
523 * @param raRate RA tracking rate in arcsecs/s
524 * @param deRate DEC tracking rate in arcsecs/s
525 * @return True if successful, false otherwise
526 * @note If not implemented by the child class, this function by default returns false with a
527 * warning message.
528 */
529 virtual bool SetTrackRatecxx . . $ INDI/Telescope#SetTrackRate(828b76dce88fac).(double raRate, double deRate);
530
531 /**
532 * @brief AddTrackMode
533 * @param name Name of track mode. It is recommended to use standard properties names such as TRACK_SIDEREAL..etc.
534 * @param label Label of track mode that appears at the client side.
535 * @param isDefault Set to true to mark the track mode as the default. Only one mode should be marked as default.
536 * @return Index of added track mode
537 * @note Child class should add all track modes be
538 */
539 virtual int AddTrackModecxx . . $ INDI/Telescope#AddTrackMode(ef8467ff91128e55).(const char *name, const char *label, bool isDefault = false);
540
541 /**
542 * @brief SetTrackEnabled Engages or disengages mount tracking. If there are no tracking modes available, it is assumed sidereal. Otherwise,
543 * whatever tracking mode should be activated or deactivated accordingly.
544 * @param enabled True to engage tracking, false to stop tracking completely.
545 * @return True if successful, false otherwise
546 * @note If not implemented by the child class, this function by default returns false with a
547 * warning message.
548 */
549 virtual bool SetTrackEnabledcxx . . $ INDI/Telescope#SetTrackEnabled(efaadfb7dc14930a).(bool enabled);
550
551 /**
552 * \brief Update telescope time, date, and UTC offset.
553 * \param utc UTC time.
554 * \param utc_offset UTC offset in hours.
555 * \return True if successful, false otherwise
556 * \note If not implemented by the child class, this function by default returns false with a
557 * warning message.
558 */
559 virtual bool updateTimecxx . . $ INDI/Telescope#updateTime(8f5ba5a5ba688cb1).(ln_datecxx . . $ ln_date# *utc, double utc_offset);
560
561 /**
562 * \brief Update telescope location settings
563 * \param latitude Site latitude in degrees.
564 * \param longitude Site latitude in degrees increasing eastward from Greenwich (0 to 360).
565 * \param elevation Site elevation in meters.
566 * \return True if successful, false otherwise
567 * \note If not implemented by the child class, this function by default returns false with a
568 * warning message.
569 */
570 virtual bool updateLocationcxx . . $ INDI/Telescope#updateLocation(c3c51e0645da350e).(double latitude, double longitude, double elevation);
571
572 /**
573 * \brief Update location settings of the observer
574 * \param latitude Site latitude in degrees.
575 * \param longitude Site latitude in degrees increasing eastward from Greenwich (0 to 360).
576 * \param elevation Site elevation in meters.
577 * \return True if successful, false otherwise
578 * \note If not implemented by the child class, this function by default returns false with a
579 * warning message.
580 */
581 void updateObserverLocationcxx . . $ INDI/Telescope#updateObserverLocation(98dd472ac7e5c3d4).(double latitude, double longitude, double elevation);
582
583 /**
584 * \brief SetParkPosition Set desired parking position to the supplied value. This ONLY sets the
585 * desired park position value and does not perform parking.
586 * \param Axis1Value First axis value
587 * \param Axis2Value Second axis value
588 * \return True if desired parking position is accepted and set. False otherwise.
589 * \note If not implemented by the child class, this function by default returns false with a
590 * warning message.
591 */
592 virtual bool SetParkPositioncxx . . $ INDI/Telescope#SetParkPosition(828b76dce88fac).(double Axis1Value, double Axis2Value);
593
594 /**
595 * @brief SetCurrentPark Set current coordinates/encoders value as the desired parking position
596 * @return True if current mount coordinates are set as parking position, false on error.
597 * \note If not implemented by the child class, this function by default returns false with a
598 * warning message.
599 */
600 virtual bool SetCurrentParkcxx . . $ INDI/Telescope#SetCurrentPark(c9857a73d68e59ba).();
601
602 /**
603 * @brief SetDefaultPark Set default coordinates/encoders value as the desired parking position
604 * @return True if default park coordinates are set as parking position, false on error.
605 * \note If not implemented by the child class, this function by default returns false with a
606 * warning message.
607 */
608 virtual bool SetDefaultParkcxx . . $ INDI/Telescope#SetDefaultPark(c9857a73d68e59ba).();
609
610
611 /**
612 * @brief SyncParkStatus Update the state and switches for parking
613 * @param isparked True if parked, false otherwise.
614 */
615 virtual void SyncParkStatuscxx . . $ INDI/Telescope#SyncParkStatus(b45ddcbc8423892c).(bool isparked);
616
617 /**
618 * @brief SetSlewRate Set desired slew rate index.
619 * @param index Index of slew rate where 0 is slowest rate and capability.nSlewRate-1 is maximum rate.
620 * @return True is operation successful, false otherwise.
621 *
622 * \note This function as implemented in Telescope performs no function and always return
623 * true. Only reimplement it if you need to issue a command to change the slew rate at the hardware
624 * level. Most telescope drivers only utilize slew rate when issuing a motion command.
625 */
626 virtual bool SetSlewRatecxx . . $ INDI/Telescope#SetSlewRate(83c267b20bac841a).(int index);
627
628 /**
629 * @brief callHandshake Helper function that sets the port file descriptor before calling the
630 * actual Handshake function implenented in drivers
631 * @return Result of actual device Handshake()
632 */
633 bool callHandshakecxx . . $ INDI/Telescope#callHandshake(c9857a73d68e59ba).();
634
635 // Joystick
636 void processNSWEcxx . . $ INDI/Telescope#processNSWE(bc12c9ec15586e6a).(double mag, double angle);
637 void processJoystickcxx . . $ INDI/Telescope#processJoystick(a20772c5417125a1).(const char *joystick_n, double mag, double angle);
638 void processAxiscxx . . $ INDI/Telescope#processAxis(d6fe15e337e23cca).(const char *axis_n, double value);
639 void processSlewPresetscxx . . $ INDI/Telescope#processSlewPresets(bc12c9ec15586e6a).(double mag, double angle);
640 void processButtoncxx . . $ INDI/Telescope#processButton(cb066ec8e542d228).(const char *button_n, ISStatecxx . . $ ISState# state);
641
642 /**
643 * @brief Calculate the expected pier side for scopes that do not report
644 * this property themselves.
645 */
646 TelescopePierSidecxx . . $ INDI/Telescope#TelescopePierSide# expectedPierSidecxx . . $ INDI/Telescope#expectedPierSide(8a898b63dca044cd).(double ra);
647
648 // Geographic Location
649 IGeographicCoordinatescxx . . $ INDI/IGeographicCoordinates# m_Locationcxx . . $ INDI/Telescope#m_Location. { 0, 0, 0 };
650
651 /**
652 * @brief Load scope settings from XML files.
653 * @return True if all config values were loaded otherwise false.
654 */
655 bool LoadScopeConfigcxx . . $ INDI/Telescope#LoadScopeConfig(c9857a73d68e59ba).();
656
657 /**
658 * @brief Load scope settings from XML files.
659 * @return True if Config #1 exists otherwise false.
660 */
661 bool HasDefaultScopeConfigcxx . . $ INDI/Telescope#HasDefaultScopeConfig(c9857a73d68e59ba).();
662
663 /**
664 * \brief Save scope settings to XML files.
665 */
666 bool UpdateScopeConfigcxx . . $ INDI/Telescope#UpdateScopeConfig(c9857a73d68e59ba).();
667
668 /**
669 * @brief Validate a file name
670 * @param file_name File name
671 * @return True if the file name is valid otherwise false.
672 */
673 stdcxx . . $ std/::stringcxx . . $ std/string# GetHomeDirectorycxx . . $ INDI/Telescope#GetHomeDirectory(219584694fe2b248).() const;
674
675 /**
676 * @brief Get the scope config index
677 * @return The scope config index
678 */
679 int GetScopeConfigIndexcxx . . $ INDI/Telescope#GetScopeConfigIndex(455f465bc33b4cdf).() const;
680
681 /**
682 * @brief Check if a file exists and it is readable
683 * @param file_name File name
684 * @param writable Additional check if the file is writable
685 * @return True if the checks are successful otherwise false.
686 */
687 bool CheckFilecxx . . $ INDI/Telescope#CheckFile(85e89a68220db9cd).(const stdcxx . . $ std/::stringcxx . . $ std/string# &file_name, bool writable) const;
688
689 /**
690 * This is a variable filled in by the ReadStatus telescope
691 * low level code, used to report current state
692 * are we slewing, tracking, or parked.
693 */
694 TelescopeStatuscxx . . $ INDI/Telescope#TelescopeStatus# TrackStatecxx . . $ INDI/Telescope#TrackState. {SCOPE_IDLEcxx . . $ INDI/Telescope#SCOPE_IDLE.};
695
696 /**
697 * @brief RememberTrackState Remember last state of Track State to fall back to in case of errors or aborts.
698 */
699 TelescopeStatuscxx . . $ INDI/Telescope#TelescopeStatus# RememberTrackStatecxx . . $ INDI/Telescope#RememberTrackState. {SCOPE_IDLEcxx . . $ INDI/Telescope#SCOPE_IDLE.};
700
701 // All telescopes should produce equatorial co-ordinates
702 INumberVectorPropertycxx . . $ INumberVectorProperty# EqNPcxx . . $ INDI/Telescope#EqNP.;
703 INumbercxx . . $ INumber# EqNcxx . . $ INDI/Telescope#EqN.[2];
704
705 // When a goto is issued, domes will snoop the target property
706 // to start moving the dome when a telescope moves
707 INumberVectorPropertycxx . . $ INumberVectorProperty# TargetNPcxx . . $ INDI/Telescope#TargetNP.;
708 INumbercxx . . $ INumber# TargetNcxx . . $ INDI/Telescope#TargetN.[2];
709
710 // Abort motion
711 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# AbortSPcxx . . $ INDI/Telescope#AbortSP.;
712 ISwitchcxx . . $ ISwitch# AbortScxx . . $ INDI/Telescope#AbortS.[1];
713
714 // On a coord_set message, sync, or slew
715 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# CoordSPcxx . . $ INDI/Telescope#CoordSP.;
716 ISwitchcxx . . $ ISwitch# CoordScxx . . $ INDI/Telescope#CoordS.[3];
717
718 // A number vector that stores lattitude and longitude
719 INumberVectorPropertycxx . . $ INumberVectorProperty# LocationNPcxx . . $ INDI/Telescope#LocationNP.;
720 INumbercxx . . $ INumber# LocationNcxx . . $ INDI/Telescope#LocationN.[3];
721
722 // A Switch in the client interface to park the scope
723 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# ParkSPcxx . . $ INDI/Telescope#ParkSP.;
724 ISwitchcxx . . $ ISwitch# ParkScxx . . $ INDI/Telescope#ParkS.[2];
725
726 // Custom parking position
727 INumbercxx . . $ INumber# ParkPositionNcxx . . $ INDI/Telescope#ParkPositionN.[2];
728 INumberVectorPropertycxx . . $ INumberVectorProperty# ParkPositionNPcxx . . $ INDI/Telescope#ParkPositionNP.;
729
730 // Custom parking options
731 ISwitchcxx . . $ ISwitch# ParkOptionScxx . . $ INDI/Telescope#ParkOptionS.[4];
732 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# ParkOptionSPcxx . . $ INDI/Telescope#ParkOptionSP.;
733 enumcxx . . $ INDI/Telescope#$anonymous_type_2#
734 {
735 PARK_CURRENTcxx . . $ INDI/Telescope#PARK_CURRENT.,
736 PARK_DEFAULTcxx . . $ INDI/Telescope#PARK_DEFAULT.,
737 PARK_WRITE_DATAcxx . . $ INDI/Telescope#PARK_WRITE_DATA.,
738 PARK_PURGE_DATAcxx . . $ INDI/Telescope#PARK_PURGE_DATA.,
739 };
740
741 // A switch for North/South motion
742 ISwitchcxx . . $ ISwitch# MovementNSScxx . . $ INDI/Telescope#MovementNSS.[2];
743 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# MovementNSSPcxx . . $ INDI/Telescope#MovementNSSP.;
744
745 // A switch for West/East motion
746 ISwitchcxx . . $ ISwitch# MovementWEScxx . . $ INDI/Telescope#MovementWES.[2];
747 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# MovementWESPcxx . . $ INDI/Telescope#MovementWESP.;
748
749 // Reverse NS or WE
750 INDIcxx . . $ INDI/::PropertySwitchcxx . . $ INDI/PropertySwitch# ReverseMovementSPcxx . . $ INDI/Telescope#ReverseMovementSP. {cxx . . $ INDI/PropertySwitch#PropertySwitch(2c44cd906ae4e829).2};
751 enumcxx . . $ INDI/Telescope#$anonymous_type_3#
752 {
753 REVERSE_NScxx . . $ INDI/Telescope#REVERSE_NS.,
754 REVERSE_WEcxx . . $ INDI/Telescope#REVERSE_WE.
755 };
756
757 // Slew Rate
758 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# SlewRateSPcxx . . $ INDI/Telescope#SlewRateSP.;
759 ISwitchcxx . . $ ISwitch# *SlewRateScxx . . $ INDI/Telescope#SlewRateS. {nullptr};
760
761 // Telescope & guider aperture and focal length
762 INumbercxx . . $ INumber# ScopeParametersNcxx . . $ INDI/Telescope#ScopeParametersN.[4];
763 INumberVectorPropertycxx . . $ INumberVectorProperty# ScopeParametersNPcxx . . $ INDI/Telescope#ScopeParametersNP.;
764
765 // UTC and UTC Offset
766 ITextcxx . . $ IText# TimeTcxx . . $ INDI/Telescope#TimeT.[2] {};
767 ITextVectorPropertycxx . . $ ITextVectorProperty# TimeTPcxx . . $ INDI/Telescope#TimeTP.;
768 void sendTimeFromSystemcxx . . $ INDI/Telescope#sendTimeFromSystem(49f6e7a06ebc5aa8).();
769
770 // Active GPS/Dome device to snoop
771 ITextVectorPropertycxx . . $ ITextVectorProperty# ActiveDeviceTPcxx . . $ INDI/Telescope#ActiveDeviceTP.;
772 ITextcxx . . $ IText# ActiveDeviceTcxx . . $ INDI/Telescope#ActiveDeviceT.[2] {};
773
774 // Switch to lock if dome is closed.
775 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# DomePolicySPcxx . . $ INDI/Telescope#DomePolicySP.;
776 ISwitchcxx . . $ ISwitch# DomePolicyScxx . . $ INDI/Telescope#DomePolicyS.[2];
777
778 // Switch for choosing between motion control by 4-way joystick or two seperate axes
779 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# MotionControlModeTPcxx . . $ INDI/Telescope#MotionControlModeTP.;
780 ISwitchcxx . . $ ISwitch# MotionControlModeTcxx . . $ INDI/Telescope#MotionControlModeT.[2];
781 enumcxx . . $ INDI/Telescope#$anonymous_type_4#
782 {
783 MOTION_CONTROL_JOYSTICKcxx . . $ INDI/Telescope#MOTION_CONTROL_JOYSTICK.,
784 MOTION_CONTROL_AXEScxx . . $ INDI/Telescope#MOTION_CONTROL_AXES.
785 };
786
787 // Lock Joystick Axis to one direciton only
788 ISwitchcxx . . $ ISwitch# LockAxisScxx . . $ INDI/Telescope#LockAxisS.[2];
789 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# LockAxisSPcxx . . $ INDI/Telescope#LockAxisSP.;
790
791 // Pier Side
792 ISwitchcxx . . $ ISwitch# PierSideScxx . . $ INDI/Telescope#PierSideS.[2];
793 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# PierSideSPcxx . . $ INDI/Telescope#PierSideSP.;
794
795 // Pier Side Simulation
796 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# SimulatePierSideSPcxx . . $ INDI/Telescope#SimulatePierSideSP.;
797 ISwitchcxx . . $ ISwitch# SimulatePierSideScxx . . $ INDI/Telescope#SimulatePierSideS.[2];
798 bool getSimulatePierSidecxx . . $ INDI/Telescope#getSimulatePierSide(50ce9a9e25b4a850).() const;
799 void setSimulatePierSidecxx . . $ INDI/Telescope#setSimulatePierSide(b45ddcbc8423892c).(bool value);
800
801 // Pier Side
802 TelescopePierSidecxx . . $ INDI/Telescope#TelescopePierSide# lastPierSidecxx . . $ INDI/Telescope#lastPierSide., currentPierSidecxx . . $ INDI/Telescope#currentPierSide.;
803
804 const char * getPierSideStrcxx . . $ INDI/Telescope#getPierSideStr(fbcacb1512de7fbd).(TelescopePierSidecxx . . $ INDI/Telescope#TelescopePierSide# ps);
805
806 // Satellite tracking
807 /**
808 * \brief Text Vector property defining the orbital elements of an artificial satellite (TLE).
809 * \ref drivers/telescope/lx200_10micron.cpp "Example implementation"
810 */
811 ITextVectorPropertycxx . . $ ITextVectorProperty# TLEtoTrackTPcxx . . $ INDI/Telescope#TLEtoTrackTP.;
812 ITextcxx . . $ IText# TLEtoTrackTcxx . . $ INDI/Telescope#TLEtoTrackT.[1] {};
813 /**
814 * \struct SatelliteWindow
815 * \brief Satellite pass: window start and end.
816 */
817 enumcxx . . $ INDI/Telescope#$anonymous_type_5#
818 {
819 SAT_PASS_WINDOW_STARTcxx . . $ INDI/Telescope#SAT_PASS_WINDOW_START., ///< Index for start of the window
820 SAT_PASS_WINDOW_ENDcxx . . $ INDI/Telescope#SAT_PASS_WINDOW_END., ///< Index for end of the window
821 SAT_PASS_WINDOW_COUNTcxx . . $ INDI/Telescope#SAT_PASS_WINDOW_COUNT. ///< Number of indices
822 } SatelliteWindowcxx . . $ INDI/Telescope#SatelliteWindow.;
823 /**
824 * \brief Text Vector property defining the start and end of a satellite pass (window contains pass).
825 * \ref drivers/telescope/lx200_10micron.cpp "Example implementation"
826 */
827 ITextVectorPropertycxx . . $ ITextVectorProperty# SatPassWindowTPcxx . . $ INDI/Telescope#SatPassWindowTP.;
828 ITextcxx . . $ IText# SatPassWindowTcxx . . $ INDI/Telescope#SatPassWindowT.[SAT_PASS_WINDOW_COUNTcxx . . $ INDI/Telescope#SAT_PASS_WINDOW_COUNT.] {};
829 /**
830 * \struct SatelliteTracking
831 * \brief Possible states for the satellite tracking.
832 */
833 enumcxx . . $ INDI/Telescope#$anonymous_type_6#
834 {
835 SAT_TRACKcxx . . $ INDI/Telescope#SAT_TRACK., ///< Track signal
836 SAT_HALTcxx . . $ INDI/Telescope#SAT_HALT., ///< Halt signal (abort)
837 SAT_TRACK_COUNTcxx . . $ INDI/Telescope#SAT_TRACK_COUNT. ///< State counter
838 } SatelliteTrackingcxx . . $ INDI/Telescope#SatelliteTracking.;
839 /**
840 * \brief Switch Vector property defining the state of the satellite tracking of the mount.
841 * \ref drivers/telescope/lx200_10micron.cpp "Example implementation"
842 */
843 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# TrackSatSPcxx . . $ INDI/Telescope#TrackSatSP.;
844 ISwitchcxx . . $ ISwitch# TrackSatScxx . . $ INDI/Telescope#TrackSatS.[SAT_TRACK_COUNTcxx . . $ INDI/Telescope#SAT_TRACK_COUNT.];
845
846 // PEC State
847 ISwitchcxx . . $ ISwitch# PECStateScxx . . $ INDI/Telescope#PECStateS.[2];
848 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# PECStateSPcxx . . $ INDI/Telescope#PECStateSP.;
849
850 // Track Mode
851 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# TrackModeSPcxx . . $ INDI/Telescope#TrackModeSP.;
852 ISwitchcxx . . $ ISwitch# *TrackModeScxx . . $ INDI/Telescope#TrackModeS. { nullptr };
853
854 // Track State
855 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# TrackStateSPcxx . . $ INDI/Telescope#TrackStateSP.;
856 ISwitchcxx . . $ ISwitch# TrackStateScxx . . $ INDI/Telescope#TrackStateS.[2];
857
858 // Track Rate
859 INumberVectorPropertycxx . . $ INumberVectorProperty# TrackRateNPcxx . . $ INDI/Telescope#TrackRateNP.;
860 INumbercxx . . $ INumber# TrackRateNcxx . . $ INDI/Telescope#TrackRateN.[2];
861
862 // PEC State
863 TelescopePECStatecxx . . $ INDI/Telescope#TelescopePECState# lastPECStatecxx . . $ INDI/Telescope#lastPECState. {PEC_UNKNOWNcxx . . $ INDI/Telescope#PEC_UNKNOWN.}, currentPECStatecxx . . $ INDI/Telescope#currentPECState. {PEC_UNKNOWNcxx . . $ INDI/Telescope#PEC_UNKNOWN.};
864
865 uint32_tcxx . . $ uint32_t# capabilitycxx . . $ INDI/Telescope#capability. {0};
866 int last_we_motioncxx . . $ INDI/Telescope#last_we_motion. {-1}, last_ns_motioncxx . . $ INDI/Telescope#last_ns_motion. {-1};
867
868 //Park
869 const char *LoadParkDatacxx . . $ INDI/Telescope#LoadParkData(33a1f659e94feb42).();
870 bool WriteParkDatacxx . . $ INDI/Telescope#WriteParkData(c9857a73d68e59ba).();
871 bool PurgeParkDatacxx . . $ INDI/Telescope#PurgeParkData(c9857a73d68e59ba).();
872
873 int PortFDcxx . . $ INDI/Telescope#PortFD. = -1;
874 Connectioncxx . . $ Connection/::Serialcxx . . $ Connection/Serial# *serialConnectioncxx . . $ INDI/Telescope#serialConnection. = nullptr;
875 Connectioncxx . . $ Connection/::TCPcxx . . $ Connection/TCP# *tcpConnectioncxx . . $ INDI/Telescope#tcpConnection. = nullptr;
876
877 // XML node names for scope config
878 const stdcxx . . $ std/::stringcxx . . $ std/string# ScopeConfigRootXmlNodecxx . . $ INDI/Telescope#ScopeConfigRootXmlNode. {cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d). "scopeconfig" };
879 const stdcxx . . $ std/::stringcxx . . $ std/string# ScopeConfigDeviceXmlNodecxx . . $ INDI/Telescope#ScopeConfigDeviceXmlNode. {cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d). "device" };
880 const stdcxx . . $ std/::stringcxx . . $ std/string# ScopeConfigNameXmlNodecxx . . $ INDI/Telescope#ScopeConfigNameXmlNode. {cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d). "name" };
881 const stdcxx . . $ std/::stringcxx . . $ std/string# ScopeConfigScopeFocXmlNodecxx . . $ INDI/Telescope#ScopeConfigScopeFocXmlNode. {cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d). "scopefoc" };
882 const stdcxx . . $ std/::stringcxx . . $ std/string# ScopeConfigScopeApXmlNodecxx . . $ INDI/Telescope#ScopeConfigScopeApXmlNode. {cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d). "scopeap" };
883 const stdcxx . . $ std/::stringcxx . . $ std/string# ScopeConfigGScopeFocXmlNodecxx . . $ INDI/Telescope#ScopeConfigGScopeFocXmlNode. {cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d). "gscopefoc" };
884 const stdcxx . . $ std/::stringcxx . . $ std/string# ScopeConfigGScopeApXmlNodecxx . . $ INDI/Telescope#ScopeConfigGScopeApXmlNode. {cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d). "gscopeap" };
885 const stdcxx . . $ std/::stringcxx . . $ std/string# ScopeConfigLabelApXmlNodecxx . . $ INDI/Telescope#ScopeConfigLabelApXmlNode. {cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d). "label" };
886
887 // A switch to apply custom aperture/focal length config
888 enumcxx . . $ INDI/Telescope#$anonymous_type_7#
889 {
890 SCOPE_CONFIG1cxx . . $ INDI/Telescope#SCOPE_CONFIG1.,
891 SCOPE_CONFIG2cxx . . $ INDI/Telescope#SCOPE_CONFIG2.,
892 SCOPE_CONFIG3cxx . . $ INDI/Telescope#SCOPE_CONFIG3.,
893 SCOPE_CONFIG4cxx . . $ INDI/Telescope#SCOPE_CONFIG4.,
894 SCOPE_CONFIG5cxx . . $ INDI/Telescope#SCOPE_CONFIG5.,
895 SCOPE_CONFIG6cxx . . $ INDI/Telescope#SCOPE_CONFIG6.
896 };
897 ISwitchcxx . . $ ISwitch# ScopeConfigscxx . . $ INDI/Telescope#ScopeConfigs.[6];
898 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# ScopeConfigsSPcxx . . $ INDI/Telescope#ScopeConfigsSP.;
899
900 // Scope config name
901 ITextVectorPropertycxx . . $ ITextVectorProperty# ScopeConfigNameTPcxx . . $ INDI/Telescope#ScopeConfigNameTP.;
902 ITextcxx . . $ IText# ScopeConfigNameTcxx . . $ INDI/Telescope#ScopeConfigNameT.[1] {};
903
904 /// The telescope/guide scope configuration file name
905 const stdcxx . . $ std/::stringcxx . . $ std/string# ScopeConfigFileNamecxx . . $ INDI/Telescope#ScopeConfigFileName.;
906
907 bool IsParkedcxx . . $ INDI/Telescope#IsParked. {false};
908 TelescopeParkDatacxx . . $ INDI/Telescope#TelescopeParkData# parkDataTypecxx . . $ INDI/Telescope#parkDataType. {PARK_NONEcxx . . $ INDI/Telescope#PARK_NONE.};
909
910 private:
911 bool processTimeInfocxx . . $ INDI/Telescope#processTimeInfo(b7a7aa4a824b7595).(const char *utc, const char *offset);
912 bool processLocationInfocxx . . $ INDI/Telescope#processLocationInfo(c3c51e0645da350e).(double latitude, double longitude, double elevation);
913 void triggerSnoopcxx . . $ INDI/Telescope#triggerSnoop(2fa786934fe80e24).(const char *driverName, const char *propertyName);
914
915 /**
916 * @brief LoadParkXML Read and process park XML data.
917 * @return error string if there is problem opening the file
918 */
919 const char *LoadParkXMLcxx . . $ INDI/Telescope#LoadParkXML(33a1f659e94feb42).();
920
921 bool IsLockedcxx . . $ INDI/Telescope#IsLocked. {true};
922 const char *ParkDeviceNamecxx . . $ INDI/Telescope#ParkDeviceName. {nullptr};
923 const stdcxx . . $ std/::stringcxx . . $ std/string# ParkDataFileNamecxx . . $ INDI/Telescope#ParkDataFileName.;
924 XMLEle *ParkdataXmlRootcxx . . $ INDI/Telescope#ParkdataXmlRoot. {nullptr}, *ParkdeviceXmlcxx . . $ INDI/Telescope#ParkdeviceXml. {nullptr}, *ParkstatusXmlcxx . . $ INDI/Telescope#ParkstatusXml. {nullptr}, *ParkpositionXmlcxx . . $ INDI/Telescope#ParkpositionXml. {nullptr},
925 *ParkpositionAxis1Xmlcxx . . $ INDI/Telescope#ParkpositionAxis1Xml. {nullptr}, *ParkpositionAxis2Xmlcxx . . $ INDI/Telescope#ParkpositionAxis2Xml. {nullptr};
926
927 double Axis1ParkPositioncxx . . $ INDI/Telescope#Axis1ParkPosition. {0};
928 double Axis1DefaultParkPositioncxx . . $ INDI/Telescope#Axis1DefaultParkPosition. {0};
929 double Axis2ParkPositioncxx . . $ INDI/Telescope#Axis2ParkPosition. {0};
930 double Axis2DefaultParkPositioncxx . . $ INDI/Telescope#Axis2DefaultParkPosition. {0};
931
932 uint8_tcxx . . $ uint8_t# nSlewRatecxx . . $ INDI/Telescope#nSlewRate. {0};
933 IPStatecxx . . $ IPState# lastEqStatecxx . . $ INDI/Telescope#lastEqState. { IPS_IDLEcxx . . $ IPS_IDLE. };
934
935 uint8_tcxx . . $ uint8_t# telescopeConnectioncxx . . $ INDI/Telescope#telescopeConnection. = (CONNECTION_SERIALcxx . . $ INDI/Telescope#CONNECTION_SERIAL. | CONNECTION_TCPcxx . . $ INDI/Telescope#CONNECTION_TCP.);
936
937 Controllercxx . . $ INDI/Controller# *controllercxx . . $ INDI/Telescope#controller. {nullptr};
938
939 float motionDirNSValuecxx . . $ INDI/Telescope#motionDirNSValue. {0};
940 float motionDirWEValuecxx . . $ INDI/Telescope#motionDirWEValue. {0};
941
942 bool m_simulatePierSidecxx . . $ INDI/Telescope#m_simulatePierSide.; // use setSimulatePierSide and getSimulatePierSide for public access
943
944 // 100 millisecond of arc or time.
945 static constexpr double EQ_NOTIFY_THRESHOLDcxx . . $ INDI/Telescope#EQ_NOTIFY_THRESHOLD. {1.0 / (60 * 60 * 10)};
946 };
947
948 }