Kstars

commands.h
1/*
2 SPDX-FileCopyrightText: 2018 Jasem Mutlaq <mutlaqja@ikarustech.com>
3
4 Message Channel
5
6 SPDX-License-Identifier: GPL-2.0-or-later
7*/
8
9#pragma once
10
11#include <QMap>
12
13namespace EkosLive
14{
15enum COMMANDS
16{
17 GET_CONNECTION,
18 GET_STATES,
19 GET_STELLARSOLVER_PROFILES,
20 GET_DRIVERS,
21 GET_DEVICES,
22 NEW_CONNECTION_STATE,
23 NEW_INDI_STATE,
24 NEW_MOUNT_STATE,
25 NEW_CAMERA_STATE,
26 NEW_CAPTURE_STATE,
27 NEW_GUIDE_STATE,
28 NEW_FOCUS_STATE,
29 NEW_ALIGN_STATE,
30 NEW_POLAR_STATE,
31 NEW_DOME_STATE,
32 NEW_CAP_STATE,
33 NEW_PREVIEW_IMAGE,
34 NEW_VIDEO_FRAME,
35 NEW_ALIGN_FRAME,
36 NEW_NOTIFICATION,
37 NEW_TEMPERATURE,
38 NEW_SCHEDULER_STATE,
39
40 INVOKE_METHOD,
41 SET_PROPERTY,
42 GET_PROPERTY,
43
44 SET_CLIENT_STATE,
45 LOGOUT,
46
47 // Profiles
48 GET_PROFILES,
49 START_PROFILE,
50 STOP_PROFILE,
51 ADD_PROFILE,
52 GET_PROFILE,
53 DELETE_PROFILE,
54 UPDATE_PROFILE,
55 SET_PROFILE_MAPPING,
56 SET_PROFILE_PORT_SELECTION,
57 GET_PROFILE_PORT_SELECTION,
58
59 // SCOPES
60 GET_SCOPES,
61 ADD_SCOPE,
62 DELETE_SCOPE,
63 UPDATE_SCOPE,
64
65 // Trains
66 TRAIN_GET_ALL,
67 TRAIN_GET_PROFILES,
68 TRAIN_UPDATE,
69 TRAIN_SET,
70 TRAIN_ADD,
71 TRAIN_DELETE,
72 TRAIN_RESET,
73 TRAIN_CONFIGURATION_REQUESTED,
74 TRAIN_ACCEPT,
75
76 // Capture
77 CAPTURE_PREVIEW,
78 CAPTURE_TOGGLE_VIDEO,
79 CAPTURE_TOGGLE_CAMERA,
80 CAPTURE_TOGGLE_FILTER_WHEEL,
81 CAPTURE_START,
82 CAPTURE_STOP,
83 CAPTURE_GET_SEQUENCES,
84 CAPTURE_ADD_SEQUENCE,
85 CAPTURE_REMOVE_SEQUENCE,
86 CAPTURE_CLEAR_SEQUENCES,
87 CAPTURE_SAVE_SEQUENCE_FILE,
88 CAPTURE_LOAD_SEQUENCE_FILE,
89 CAPTURE_SET_ALL_SETTINGS,
90 CAPTURE_GET_ALL_SETTINGS,
91 CAPTURE_GET_PREVIEW_LABEL,
92 CAPTURE_LOOP,
93 CAPTURE_GENERATE_DARK_FLATS,
94
95 // Mount
96 MOUNT_PARK,
97 MOUNT_UNPARK,
98 MOUNT_ABORT,
99 MOUNT_SYNC_RADE,
100 MOUNT_SYNC_TARGET,
101 MOUNT_GOTO_RADE,
102 MOUNT_GOTO_TARGET,
103 MOUNT_GOTO_PIXEL,
104 MOUNT_SET_MOTION,
105 MOUNT_SET_TRACKING,
106 MOUNT_SET_SLEW_RATE,
107 MOUNT_CLEAR,
108 MOUNT_GET_ALL_SETTINGS,
109 MOUNT_SET_ALL_SETTINGS,
110 MOUNT_TOGGLE_AUTOPARK,
111
112 // Dome
113 DOME_PARK,
114 DOME_UNPARK,
115 DOME_GOTO,
116 DOME_STOP,
117
118 // Cap
119 CAP_PARK,
120 CAP_UNPARK,
121 CAP_SET_LIGHT,
122
123 // Focus
124 FOCUS_START,
125 FOCUS_CAPTURE,
126 FOCUS_STOP,
127 FOCUS_RESET,
128 FOCUS_IN,
129 FOCUS_OUT,
130 FOCUS_LOOP,
131 FOCUS_SET_ALL_SETTINGS,
132 FOCUS_GET_ALL_SETTINGS,
133 FOCUS_SET_CROSSHAIR,
134
135 // Guide
136 GUIDE_START,
137 GUIDE_CAPTURE,
138 GUIDE_LOOP,
139 GUIDE_STOP,
140 GUIDE_CLEAR,
141 GUIDE_REPORT,
142 GUIDE_SET_ALL_SETTINGS,
143 GUIDE_GET_ALL_SETTINGS,
144 GUIDE_SET_CALIBRATION_SETTINGS,
145 // Align
146 ALIGN_SOLVE,
147 ALIGN_STOP,
148 ALIGN_LOAD_AND_SLEW,
149 ALIGN_SET_FILE_EXTENSION,
150 ALIGN_SET_ALL_SETTINGS,
151 ALIGN_GET_ALL_SETTINGS,
152 ALIGN_SET_ASTROMETRY_SETTINGS,
153 ALIGN_MANUAL_ROTATOR_STATUS,
154 ALIGN_MANUAL_ROTATOR_TOGGLE,
155
156 // Scheduler
157 SCHEDULER_GET_ALL_SETTINGS,
158 SCHEDULER_SET_ALL_SETTINGS,
159 SCHEDULER_SAVE_FILE,
160 SCHEDULER_LOAD_FILE,
161 SCHEDULER_GET_JOBS,
162 SCHEDULER_ADD_JOBS,
163 SCHEDULER_REMOVE_JOBS,
164 SCHEDULER_START_JOB,
165 SCHEDULER_IMPORT_MOSAIC,
166
167 // Polar Assistant Helper
168 PAH_START,
169 PAH_STOP,
170 PAH_REFRESH,
171 PAH_SET_CROSSHAIR,
172 PAH_SELECT_STAR_DONE,
173 PAH_REFRESHING_DONE,
174 PAH_RESET_VIEW,
175 PAH_SLEW_DONE,
176 PAH_PAH_SET_ZOOM,
177 PAH_SET_ALGORITHM,
178
179 // Options
180 OPTION_SET,
181 OPTION_GET,
182
183 // Storage Options
184 SET_BLOBS,
185
186 // DSLRs
187 DSLR_GET_INFO,
188 DSLR_SET_INFO,
189 DSLR_SET_MODE,
190
191 //DSLR Lens
192 DSLR_ADD_LENS,
193 DSLR_DELETE_LENS,
194 DSLR_UPDATE_LENS,
195 GET_DSLR_LENSES,
196
197 // Low-level device Access
198 DEVICE_GET,
199 DEVICE_RESTART,
200 DEVICE_BLOB_GET,
201 DEVICE_PROPERTY_GET,
202 DEVICE_PROPERTY_SET,
203 DEVICE_PROPERTY_ADD,
204 DEVICE_PROPERTY_REMOVE,
205 DEVICE_PROPERTY_SUBSCRIBE,
206 DEVICE_PROPERTY_UNSUBSCRIBE,
207 DEVICE_MESSAGE,
208
209 // Dialogs
210 DIALOG_GET_INFO,
211 DIALOG_GET_RESPONSE,
212
213 // Filter Manager
214 FM_GET_DATA,
215 FM_SET_DATA,
216
217 // Astronomy Library
218 ASTRO_GET_ALMANC,
219 ASTRO_GET_NAMES,
220 ASTRO_GET_DESIGNATIONS,
221 ASTRO_GET_LOCATION,
222 ASTRO_SEARCH_OBJECTS,
223 ASTRO_GET_OBJECT_INFO,
224 ASTRO_GET_OBJECTS_INFO,
225 ASTRO_GET_OBJECTS_IMAGE,
226 ASTRO_GET_SKYPOINT_IMAGE,
227 ASTRO_GET_OBJECTS_OBSERVABILITY,
228 ASTRO_GET_OBJECTS_RISESET,
229
230 // Dark Library
231 DARK_LIBRARY_START,
232 DARK_LIBRARY_STOP,
233 DARK_LIBRARY_SET_CAMERA_PRESETS,
234 DARK_LIBRARY_GET_CAMERA_PRESETS,
235 DARK_LIBRARY_SET_ALL_SETTINGS,
236 DARK_LIBRARY_GET_ALL_SETTINGS,
237 DARK_LIBRARY_GET_DEFECT_SETTINGS,
238 DARK_LIBRARY_SET_DEFECT_PIXELS,
239 DARK_LIBRARY_SAVE_MAP,
240 DARK_LIBRARY_GET_VIEW_MASTERS,
241 DARK_LIBRARY_GET_MASTERS_IMAGE,
242 DARK_LIBRARY_CLEAR_MASTERS_ROW,
243 DARK_LIBRARY_SET_DEFECT_FRAME,
244};
245
246static QMap<COMMANDS, QString> const commands =
247{
248 {GET_CONNECTION, "get_connection"},
249 {GET_STATES, "get_states"},
250 {GET_STELLARSOLVER_PROFILES, "get_stellarsolver_profiles"},
251 {GET_DRIVERS, "get_drivers"},
252 {GET_DEVICES, "get_devices"},
253 {NEW_CONNECTION_STATE, "new_connection_state"},
254 {NEW_INDI_STATE, "new_indi_state"},
255 {NEW_MOUNT_STATE, "new_mount_state"},
256 {NEW_CAMERA_STATE, "new_camera_state"},
257 {NEW_CAPTURE_STATE, "new_capture_state"},
258 {NEW_GUIDE_STATE, "new_guide_state"},
259 {NEW_FOCUS_STATE, "new_focus_state"},
260 {NEW_ALIGN_STATE, "new_align_state"},
261 {NEW_POLAR_STATE, "new_polar_state"},
262 {NEW_DOME_STATE, "new_dome_state"},
263 {NEW_CAP_STATE, "new_cap_state"},
264 {NEW_PREVIEW_IMAGE, "new_preview_image"},
265 {NEW_VIDEO_FRAME, "new_video_frame"},
266 {NEW_ALIGN_FRAME, "new_align_frame"},
267 {NEW_NOTIFICATION, "new_notification"},
268 {NEW_TEMPERATURE, "new_temperature"},
269 {NEW_SCHEDULER_STATE, "new_scheduler_state"},
270
271 {INVOKE_METHOD, "invoke_method"},
272 {SET_PROPERTY, "set_property"},
273 {GET_PROPERTY, "get_property"},
274
275 {SET_CLIENT_STATE, "set_client_state"},
276 {LOGOUT, "logout"},
277
278 {GET_PROFILES, "get_profiles"},
279 {START_PROFILE, "profile_start"},
280 {STOP_PROFILE, "profile_stop"},
281 {ADD_PROFILE, "profile_add"},
282 {GET_PROFILE, "profile_get"},
283 {DELETE_PROFILE, "profile_delete"},
284 {UPDATE_PROFILE, "profile_update"},
285 {SET_PROFILE_MAPPING, "profile_set_mapping"},
286 {SET_PROFILE_PORT_SELECTION, "profile_set_port_selection"},
287 {GET_PROFILE_PORT_SELECTION, "profile_get_port_selection"},
288
289 {GET_SCOPES, "get_scopes"},
290 {ADD_SCOPE, "scope_add"},
291 {DELETE_SCOPE, "scope_delete"},
292 {UPDATE_SCOPE, "scope_update"},
293
294 {TRAIN_GET_ALL, "train_get_all"},
295 {TRAIN_GET_PROFILES, "train_get_profiles"},
296 {TRAIN_UPDATE, "train_update"},
297 {TRAIN_SET, "train_set"},
298 {TRAIN_ADD, "train_add"},
299 {TRAIN_DELETE, "train_delete"},
300 {TRAIN_RESET, "train_reset"},
301 {TRAIN_CONFIGURATION_REQUESTED, "train_configuration_requested"},
302 {TRAIN_ACCEPT, "train_accept"},
303
304 {CAPTURE_PREVIEW, "capture_preview"},
305 {CAPTURE_TOGGLE_VIDEO, "capture_toggle_video"},
306 {CAPTURE_TOGGLE_CAMERA, "capture_toggle_camera"},
307 {CAPTURE_TOGGLE_FILTER_WHEEL, "capture_toggle_filter_wheel"},
308 {CAPTURE_START, "capture_start"},
309 {CAPTURE_STOP, "capture_stop"},
310 {CAPTURE_GET_SEQUENCES, "capture_get_sequences"},
311 {CAPTURE_ADD_SEQUENCE, "capture_add_sequence"},
312 {CAPTURE_REMOVE_SEQUENCE, "capture_remove_sequence"},
313 {CAPTURE_CLEAR_SEQUENCES, "capture_clear_sequences"},
314 {CAPTURE_SAVE_SEQUENCE_FILE, "capture_save_sequence_file"},
315 {CAPTURE_LOAD_SEQUENCE_FILE, "capture_load_sequence_file"},
316 {CAPTURE_SET_ALL_SETTINGS, "capture_set_all_settings"},
317 {CAPTURE_GET_ALL_SETTINGS, "capture_get_all_settings"},
318 {CAPTURE_GET_PREVIEW_LABEL, "capture_get_preview_label"},
319 {CAPTURE_LOOP, "capture_loop"},
320 {CAPTURE_GENERATE_DARK_FLATS, "capture_generate_dark_flats"},
321
322 {MOUNT_PARK, "mount_park"},
323 {MOUNT_UNPARK, "mount_unpark"},
324 {MOUNT_ABORT, "mount_abort"},
325 {MOUNT_SYNC_RADE, "mount_sync_rade"},
326 {MOUNT_SYNC_TARGET, "mount_sync_target"},
327 {MOUNT_GOTO_RADE, "mount_goto_rade"},
328 {MOUNT_GOTO_TARGET, "mount_goto_target"},
329 {MOUNT_GOTO_PIXEL, "mount_goto_pixel"},
330 {MOUNT_SET_MOTION, "mount_set_motion"},
331 {MOUNT_SET_TRACKING, "mount_set_tracking"},
332 {MOUNT_SET_SLEW_RATE, "mount_set_slew_rate"},
333 {MOUNT_CLEAR, "mount_clear"},
334 {MOUNT_GET_ALL_SETTINGS, "mount_get_all_settings"},
335 {MOUNT_SET_ALL_SETTINGS, "mount_set_all_settings"},
336 {MOUNT_TOGGLE_AUTOPARK, "mount_toggle_autopark"},
337
338 {DOME_PARK, "dome_park"},
339 {DOME_UNPARK, "dome_unpark"},
340 {DOME_GOTO, "dome_goto"},
341 {DOME_STOP, "dome_stop"},
342
343 {CAP_PARK, "cap_park"},
344 {CAP_UNPARK, "cap_unpark"},
345 {CAP_SET_LIGHT, "cap_set_light"},
346
347 {FOCUS_START, "focus_start"},
348 {FOCUS_CAPTURE, "focus_capture"},
349 {FOCUS_STOP, "focus_stop"},
350 {FOCUS_RESET, "focus_reset"},
351 {FOCUS_IN, "focus_in"},
352 {FOCUS_OUT, "focus_out"},
353 {FOCUS_LOOP, "focus_loop"},
354 {FOCUS_SET_ALL_SETTINGS, "focus_set_all_settings"},
355 {FOCUS_GET_ALL_SETTINGS, "focus_get_all_settings"},
356 {FOCUS_SET_CROSSHAIR, "focus_set_crosshair"},
357
358 {SCHEDULER_GET_ALL_SETTINGS, "scheduler_get_all_settings"},
359 {SCHEDULER_SET_ALL_SETTINGS, "scheduler_set_all_settings"},
360 {SCHEDULER_SAVE_FILE, "scheduler_save_file"},
361 {SCHEDULER_LOAD_FILE, "scheduler_load_file"},
362 {SCHEDULER_GET_JOBS, "scheduler_get_jobs"},
363 {SCHEDULER_ADD_JOBS, "scheduler_add_jobs"},
364 {SCHEDULER_REMOVE_JOBS, "scheduler_remove_jobs"},
365 {SCHEDULER_START_JOB, "scheduler_start_job"},
366 {SCHEDULER_IMPORT_MOSAIC, "scheduler_import_mosaic"},
367
368 {GUIDE_START, "guide_start"},
369 {GUIDE_CAPTURE, "guide_capture"},
370 {GUIDE_LOOP, "guide_loop"},
371 {GUIDE_STOP, "guide_stop"},
372 {GUIDE_CLEAR, "guide_clear"},
373 {GUIDE_REPORT, "guide_report"},
374 {GUIDE_SET_ALL_SETTINGS, "guide_set_all_settings"},
375 {GUIDE_GET_ALL_SETTINGS, "guide_get_all_settings"},
376 {GUIDE_SET_CALIBRATION_SETTINGS, "guide_set_calibration_settings"},
377
378 {ALIGN_SOLVE, "align_solve"},
379 {ALIGN_STOP, "align_stop"},
380 {ALIGN_LOAD_AND_SLEW, "align_load_and_slew"},
381 {ALIGN_SET_FILE_EXTENSION, "align_set_file_extension"},
382 {ALIGN_SET_ALL_SETTINGS, "align_set_all_settings"},
383 {ALIGN_GET_ALL_SETTINGS, "align_get_all_settings"},
384 {ALIGN_SET_ASTROMETRY_SETTINGS, "align_set_astrometry_settings"},
385 {ALIGN_MANUAL_ROTATOR_STATUS, "align_manual_rotator_status"},
386 {ALIGN_MANUAL_ROTATOR_TOGGLE, "align_manual_rotator_toggle"},
387
388 {PAH_START, "polar_start"},
389 {PAH_STOP, "polar_stop"},
390 {PAH_REFRESH, "polar_refresh"},
391 {PAH_SET_CROSSHAIR, "polar_set_crosshair"},
392 {PAH_SELECT_STAR_DONE, "polar_star_select_done"},
393 {PAH_REFRESHING_DONE, "polar_refreshing_done"},
394 {PAH_RESET_VIEW, "polar_reset_view"},
395 {PAH_SLEW_DONE, "polar_slew_done"},
396 {PAH_PAH_SET_ZOOM, "polar_set_zoom"},
397 {PAH_SET_ALGORITHM, "polar_set_algorithm"},
398
399 {OPTION_SET, "option_set"},
400 {OPTION_GET, "option_get"},
401
402 {SET_BLOBS, "set_blobs"},
403
404 {DSLR_GET_INFO, "dslr_get_info"},
405 {DSLR_SET_INFO, "dslr_set_info"},
406 {DSLR_SET_MODE, "dslr_set_mode"},
407
408 {GET_DSLR_LENSES, "get_dslr_lenses"},
409 {DSLR_ADD_LENS, "dslr_add_lens"},
410 {DSLR_DELETE_LENS, "dslr_delete_lens"},
411 {DSLR_UPDATE_LENS, "dslr_update_lens"},
412
413 {DEVICE_GET, "device_get"},
414 {DEVICE_RESTART, "device_restart"},
415 {DEVICE_BLOB_GET, "device_blob_get"},
416 {DEVICE_PROPERTY_GET, "device_property_get"},
417 {DEVICE_PROPERTY_SET, "device_property_set"},
418 {DEVICE_PROPERTY_ADD, "device_property_add"},
419 {DEVICE_PROPERTY_REMOVE, "device_property_remove"},
420 {DEVICE_PROPERTY_SUBSCRIBE, "device_property_subscribe"},
421 {DEVICE_PROPERTY_UNSUBSCRIBE, "device_property_unsubscribe"},
422 {DEVICE_MESSAGE, "device_message"},
423
424 {DIALOG_GET_INFO, "dialog_get_info"},
425 {DIALOG_GET_RESPONSE, "dialog_get_response"},
426
427 {FM_GET_DATA, "fm_get_data"},
428 {FM_SET_DATA, "fm_set_data"},
429
430 {ASTRO_GET_ALMANC, "astro_get_almanac"},
431 {ASTRO_GET_NAMES, "astro_get_names"},
432 {ASTRO_GET_DESIGNATIONS, "astro_get_designations"},
433 {ASTRO_GET_LOCATION, "astro_get_location"},
434 {ASTRO_SEARCH_OBJECTS, "astro_search_objects"},
435 {ASTRO_GET_OBJECT_INFO, "astro_get_object_info"},
436 {ASTRO_GET_OBJECTS_INFO, "astro_get_objects_info"},
437 {ASTRO_GET_OBJECTS_IMAGE, "astro_get_objects_image"},
438 {ASTRO_GET_SKYPOINT_IMAGE, "astro_get_skypoint_image"},
439 {ASTRO_GET_OBJECTS_OBSERVABILITY, "astro_get_objects_observability"},
440 {ASTRO_GET_OBJECTS_RISESET, "astro_get_objects_riseset"},
441
442 {DARK_LIBRARY_START, "dark_library_start"},
443 {DARK_LIBRARY_STOP, "dark_library_stop"},
444 {DARK_LIBRARY_SET_CAMERA_PRESETS, "dark_library_set_camera_presets"},
445 {DARK_LIBRARY_GET_CAMERA_PRESETS, "dark_library_get_camera_presets"},
446 {DARK_LIBRARY_SET_ALL_SETTINGS, "dark_library_set_all_settings"},
447 {DARK_LIBRARY_GET_ALL_SETTINGS, "dark_library_get_all_settings"},
448 {DARK_LIBRARY_GET_DEFECT_SETTINGS, "dark_library_get_defect_settings"},
449 {DARK_LIBRARY_SET_DEFECT_PIXELS, "dark_library_set_defect_pixels"},
450 {DARK_LIBRARY_GET_VIEW_MASTERS, "dark_library_get_view_masters"},
451 {DARK_LIBRARY_GET_MASTERS_IMAGE, "dark_library_get_masters_image"},
452 {DARK_LIBRARY_CLEAR_MASTERS_ROW, "dark_library_clear_masters_row"},
453 {DARK_LIBRARY_SET_DEFECT_FRAME, "dark_library_set_defect_frame"},
454 {DARK_LIBRARY_SAVE_MAP, "dark_library_save_map"}
455};
456
457}
Generic record interfaces and implementations.
Definition cloud.cpp:23
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:48:25 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.