Kstars

commands.h
1 /*
2  SPDX-FileCopyrightText: 2018 Jasem Mutlaq <[email protected]>
3 
4  Message Channel
5 
6  SPDX-License-Identifier: GPL-2.0-or-later
7 */
8 
9 #pragma once
10 
11 #include <QMap>
12 
13 namespace EkosLive
14 {
15 enum COMMANDS
16 {
17  GET_CONNECTION,
18  GET_STATES,
19  GET_CAMERAS,
20  GET_MOUNTS,
21  GET_FILTER_WHEELS,
22  GET_DOMES,
23  GET_CAPS,
24  GET_STELLARSOLVER_PROFILES,
25  GET_DRIVERS,
26  GET_DEVICES,
27  NEW_CONNECTION_STATE,
28  NEW_MOUNT_STATE,
29  NEW_CAMERA_STATE,
30  NEW_CAPTURE_STATE,
31  NEW_GUIDE_STATE,
32  NEW_FOCUS_STATE,
33  NEW_ALIGN_STATE,
34  NEW_POLAR_STATE,
35  NEW_DOME_STATE,
36  NEW_CAP_STATE,
37  NEW_PREVIEW_IMAGE,
38  NEW_VIDEO_FRAME,
39  NEW_ALIGN_FRAME,
40  NEW_NOTIFICATION,
41  NEW_TEMPERATURE,
42  NEW_SCHEDULER_STATE,
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  // Capture
66  CAPTURE_PREVIEW,
67  CAPTURE_TOGGLE_VIDEO,
68  CAPTURE_TOGGLE_CAMERA,
69  CAPTURE_TOGGLE_FILTER_WHEEL,
70  CAPTURE_START,
71  CAPTURE_STOP,
72  CAPTURE_GET_SEQUENCES,
73  CAPTURE_ADD_SEQUENCE,
74  CAPTURE_REMOVE_SEQUENCE,
75  CAPTURE_CLEAR_SEQUENCES,
76  CAPTURE_SET_SETTINGS,
77  CAPTURE_SET_LIMITS,
78  CAPTURE_GET_LIMITS,
79  CAPTURE_SAVE_SEQUENCE_FILE,
80  CAPTURE_LOAD_SEQUENCE_FILE,
81  CAPTURE_GET_CALIBRATION_SETTINGS,
82  CAPTURE_GET_FILE_SETTINGS,
83  CAPTURE_LOOP,
84  CAPTURE_GENERATE_DARK_FLATS,
85 
86  // Mount
87  MOUNT_PARK,
88  MOUNT_UNPARK,
89  MOUNT_ABORT,
90  MOUNT_SYNC_RADE,
91  MOUNT_SYNC_TARGET,
92  MOUNT_GOTO_RADE,
93  MOUNT_GOTO_TARGET,
94  MOUNT_GOTO_PIXEL,
95  MOUNT_SET_MOTION,
96  MOUNT_SET_TRACKING,
97  MOUNT_SET_SLEW_RATE,
98  MOUNT_SET_ALTITUDE_LIMITS,
99  MOUNT_SET_HA_LIMIT,
100  MOUNT_SET_MERIDIAN_FLIP,
101  MOUNT_SET_AUTO_PARK,
102  MOUNT_SET_EVERYDAY_AUTO_PARK,
103  MOUNT_CLEAR,
104  MOUNT_GET_SETTINGS,
105 
106  // Dome
107  DOME_PARK,
108  DOME_UNPARK,
109  DOME_GOTO,
110  DOME_STOP,
111 
112  // Cap
113  CAP_PARK,
114  CAP_UNPARK,
115  CAP_SET_LIGHT,
116 
117  // Focus
118  FOCUS_START,
119  FOCUS_CAPTURE,
120  FOCUS_STOP,
121  FOCUS_RESET,
122  FOCUS_IN,
123  FOCUS_OUT,
124  FOCUS_LOOP,
125  FOCUS_SET_SETTINGS,
126  FOCUS_SET_CROSSHAIR,
127  FOCUS_SET_PRIMARY_SETTINGS,
128  FOCUS_SET_PROCESS_SETTINGS,
129  FOCUS_SET_MECHANICS_SETTINGS,
130  FOCUS_GET_PRIMARY_SETTINGS,
131  FOCUS_GET_PROCESS_SETTINGS,
132  FOCUS_GET_MECHANICS_SETTINGS,
133 
134  // Guide
135  GUIDE_START,
136  GUIDE_CAPTURE,
137  GUIDE_LOOP,
138  GUIDE_STOP,
139  GUIDE_CLEAR,
140  GUIDE_REPORT,
141  GUIDE_SET_SETTINGS,
142 
143  // Align
144  ALIGN_SOLVE,
145  ALIGN_STOP,
146  ALIGN_LOAD_AND_SLEW,
147  ALIGN_SET_FILE_EXTENSION,
148  ALIGN_SET_SETTINGS,
149  ALIGN_MANUAL_ROTATOR_STATUS,
150  ALIGN_MANUAL_ROTATOR_TOGGLE,
151 
152  // Scheduler
153  SCHEDULER_SET_PRIMARY_SETTINGS,
154  SCHEDULER_SET_JOB_STARTUP_CONDITIONS,
155  SCHEDULER_SET_JOB_CONSTRAINTS,
156  SCHEDULER_SET_JOB_COMPLETION_SETTINGS,
157  SCHEDULER_SET_OBSERVATORY_STARTUP_PROCEDURE,
158  SCHEDULER_SET_ABORTED_JOB_MANAGEMENT,
159  SCHEDULER_SET_OBSERVATORY_SHUTDOWN_PROCEDURE,
160  SCHEDULER_GET_JOBS,
161  SCHEDULER_ADD_JOBS,
162  SCHEDULER_REMOVE_JOBS,
163  SCHEDULER_GET_SETTINGS,
164  SCHEDULER_START_JOB,
165 
166  // Polar Assistant Helper
167  PAH_START,
168  PAH_STOP,
169  PAH_REFRESH,
170  PAH_SET_CROSSHAIR,
171  PAH_SELECT_STAR_DONE,
172  PAH_REFRESHING_DONE,
173  PAH_SET_SETTINGS,
174  PAH_RESET_VIEW,
175  PAH_SLEW_DONE,
176  PAH_PAH_SET_ZOOM,
177  PAH_SET_ALGORITHM,
178 
179  // Options
180  OPTION_SET_HIGH_BANDWIDTH,
181  OPTION_SET_IMAGE_TRANSFER,
182  OPTION_SET_NOTIFICATIONS,
183  OPTION_SET_CLOUD_STORAGE,
184  OPTION_SET,
185  OPTION_GET,
186 
187  // Storage Options
188  SET_BLOBS,
189 
190  // DSLRs
191  DSLR_GET_INFO,
192  DSLR_SET_INFO,
193  DSLR_SET_MODE,
194 
195  // Low-level device Access
196  DEVICE_GET,
197  DEVICE_RESTART,
198  DEVICE_BLOB_GET,
199  DEVICE_PROPERTY_GET,
200  DEVICE_PROPERTY_SET,
201  DEVICE_PROPERTY_ADD,
202  DEVICE_PROPERTY_REMOVE,
203  DEVICE_PROPERTY_SUBSCRIBE,
204  DEVICE_PROPERTY_UNSUBSCRIBE,
205 
206  // Dialogs
207  DIALOG_GET_INFO,
208  DIALOG_GET_RESPONSE,
209 
210  // Filter Manager
211  FM_GET_DATA,
212  FM_SET_DATA,
213 
214  // Astronomy Library
215  ASTRO_GET_ALMANC,
216  ASTRO_SEARCH_OBJECTS,
217  ASTRO_GET_OBJECT_INFO,
218  ASTRO_GET_OBJECTS_INFO,
219  ASTRO_GET_OBJECTS_IMAGE,
220  ASTRO_GET_OBJECTS_OBSERVABILITY,
221  ASTRO_GET_OBJECTS_RISESET,
222 
223  // Dark Library
224  DARK_LIBRARY_START,
225  DARK_LIBRARY_STOP,
226  DARK_LIBRARY_SET_CAMERA_PRESETS,
227  DARK_LIBRARY_GET_CAMERA_PRESETS,
228  DARK_LIBRARY_SET_SETTINGS,
229  DARK_LIBRARY_GET_DARK_SETTINGS,
230  DARK_LIBRARY_SET_DEFECT_SETTINGS,
231  DARK_LIBRARY_SET_DEFECT_PIXELS,
232  DARK_LIBRARY_GET_DEFECT_SETTINGS,
233  DARK_LIBRARY_SAVE_MAP,
234  DARK_LIBRARY_GET_VIEW_MASTERS,
235  DARK_LIBRARY_GET_MASTERS_IMAGE,
236  DARK_LIBRARY_CLEAR_MASTERS_ROW,
237  DARK_LIBRARY_SET_DEFECT_FRAME,
238 };
239 
240 static QMap<COMMANDS, QString> const commands =
241 {
242  {GET_CONNECTION, "get_connection"},
243  {GET_STATES, "get_states"},
244  {GET_CAMERAS, "get_cameras"},
245  {GET_MOUNTS, "get_mounts"},
246  {GET_FILTER_WHEELS, "get_filter_wheels"},
247  {GET_DOMES, "get_domes"},
248  {GET_CAPS, "get_caps"},
249  {GET_STELLARSOLVER_PROFILES, "get_stellarsolver_profiles"},
250  {GET_DRIVERS, "get_drivers"},
251  {GET_DEVICES, "get_devices"},
252  {NEW_CONNECTION_STATE, "new_connection_state"},
253  {NEW_MOUNT_STATE, "new_mount_state"},
254  {NEW_CAMERA_STATE, "new_camera_state"},
255  {NEW_CAPTURE_STATE, "new_capture_state"},
256  {NEW_GUIDE_STATE, "new_guide_state"},
257  {NEW_FOCUS_STATE, "new_focus_state"},
258  {NEW_ALIGN_STATE, "new_align_state"},
259  {NEW_POLAR_STATE, "new_polar_state"},
260  {NEW_DOME_STATE, "new_dome_state"},
261  {NEW_CAP_STATE, "new_cap_state"},
262  {NEW_PREVIEW_IMAGE, "new_preview_image"},
263  {NEW_VIDEO_FRAME, "new_video_frame"},
264  {NEW_ALIGN_FRAME, "new_align_frame"},
265  {NEW_NOTIFICATION, "new_notification"},
266  {NEW_TEMPERATURE, "new_temperature"},
267  {NEW_SCHEDULER_STATE, "new_scheduler_state"},
268 
269  {SET_CLIENT_STATE, "set_client_state"},
270  {LOGOUT, "logout"},
271 
272  {GET_PROFILES, "get_profiles"},
273  {START_PROFILE, "profile_start"},
274  {STOP_PROFILE, "profile_stop"},
275  {ADD_PROFILE, "profile_add"},
276  {GET_PROFILE, "profile_get"},
277  {DELETE_PROFILE, "profile_delete"},
278  {UPDATE_PROFILE, "profile_update"},
279  {SET_PROFILE_MAPPING, "profile_set_mapping"},
280  {SET_PROFILE_PORT_SELECTION, "profile_set_port_selection"},
281  {GET_PROFILE_PORT_SELECTION, "profile_get_port_selection"},
282 
283  {GET_SCOPES, "get_scopes"},
284  {ADD_SCOPE, "scope_add"},
285  {DELETE_SCOPE, "scope_delete"},
286  {UPDATE_SCOPE, "scope_update"},
287 
288  {CAPTURE_PREVIEW, "capture_preview"},
289  {CAPTURE_TOGGLE_VIDEO, "capture_toggle_video"},
290  {CAPTURE_TOGGLE_CAMERA, "capture_toggle_camera"},
291  {CAPTURE_TOGGLE_FILTER_WHEEL, "capture_toggle_filter_wheel"},
292  {CAPTURE_START, "capture_start"},
293  {CAPTURE_STOP, "capture_stop"},
294  {CAPTURE_GET_SEQUENCES, "capture_get_sequences"},
295  {CAPTURE_ADD_SEQUENCE, "capture_add_sequence"},
296  {CAPTURE_REMOVE_SEQUENCE, "capture_remove_sequence"},
297  {CAPTURE_CLEAR_SEQUENCES, "capture_clear_sequences"},
298  {CAPTURE_SET_SETTINGS, "capture_set_settings"},
299  {CAPTURE_SET_LIMITS, "capture_set_limits"},
300  {CAPTURE_GET_LIMITS, "capture_get_limits"},
301  {CAPTURE_SAVE_SEQUENCE_FILE, "capture_save_sequence_file"},
302  {CAPTURE_LOAD_SEQUENCE_FILE, "capture_load_sequence_file"},
303  {CAPTURE_GET_CALIBRATION_SETTINGS, "capture_get_calibration_settings"},
304  {CAPTURE_GET_FILE_SETTINGS, "capture_get_file_settings"},
305  {CAPTURE_LOOP, "capture_loop"},
306  {CAPTURE_GENERATE_DARK_FLATS, "capture_generate_dark_flats"},
307 
308  {MOUNT_PARK, "mount_park"},
309  {MOUNT_UNPARK, "mount_unpark"},
310  {MOUNT_ABORT, "mount_abort"},
311  {MOUNT_SYNC_RADE, "mount_sync_rade"},
312  {MOUNT_SYNC_TARGET, "mount_sync_target"},
313  {MOUNT_GOTO_RADE, "mount_goto_rade"},
314  {MOUNT_GOTO_TARGET, "mount_goto_target"},
315  {MOUNT_GOTO_PIXEL, "mount_goto_pixel"},
316  {MOUNT_SET_MOTION, "mount_set_motion"},
317  {MOUNT_SET_TRACKING, "mount_set_tracking"},
318  {MOUNT_SET_SLEW_RATE, "mount_set_slew_rate"},
319  {MOUNT_SET_ALTITUDE_LIMITS, "mount_set_altitude_limits"},
320  {MOUNT_SET_HA_LIMIT, "mount_set_ha_limit"},
321  {MOUNT_SET_MERIDIAN_FLIP, "mount_set_meridian_flip"},
322  {MOUNT_SET_AUTO_PARK, "mount_set_auto_park"},
323  {MOUNT_SET_EVERYDAY_AUTO_PARK, "mount_set_everyday_auto_park"},
324  {MOUNT_CLEAR, "mount_clear"},
325  {MOUNT_GET_SETTINGS, "mount_get_settings"},
326 
327  {DOME_PARK, "dome_park"},
328  {DOME_UNPARK, "dome_unpark"},
329  {DOME_GOTO, "dome_goto"},
330  {DOME_STOP, "dome_stop"},
331 
332  {CAP_PARK, "cap_park"},
333  {CAP_UNPARK, "cap_unpark"},
334  {CAP_SET_LIGHT, "cap_set_light"},
335 
336  {FOCUS_START, "focus_start"},
337  {FOCUS_CAPTURE, "focus_capture"},
338  {FOCUS_STOP, "focus_stop"},
339  {FOCUS_RESET, "focus_reset"},
340  {FOCUS_IN, "focus_in"},
341  {FOCUS_OUT, "focus_out"},
342  {FOCUS_LOOP, "focus_loop"},
343  {FOCUS_SET_SETTINGS, "focus_set_settings"},
344  {FOCUS_SET_CROSSHAIR, "focus_set_crosshair"},
345  {FOCUS_SET_PRIMARY_SETTINGS, "focus_set_primary_settings"},
346  {FOCUS_SET_PROCESS_SETTINGS, "focus_set_process_settings"},
347  {FOCUS_SET_MECHANICS_SETTINGS, "focus_set_mechanics_settings"},
348  {FOCUS_GET_PRIMARY_SETTINGS, "focus_get_primary_settings"},
349  {FOCUS_GET_PROCESS_SETTINGS, "focus_get_process_settings"},
350  {FOCUS_GET_MECHANICS_SETTINGS, "focus_get_mechanics_settings"},
351 
352  {SCHEDULER_SET_PRIMARY_SETTINGS, "scheduler_set_primary_settings"},
353  {SCHEDULER_SET_JOB_STARTUP_CONDITIONS, "scheduler_set_job_startup_conditions"},
354  {SCHEDULER_SET_JOB_CONSTRAINTS, "scheduler_set_job_constraints"},
355  {SCHEDULER_SET_JOB_COMPLETION_SETTINGS, "scheduler_set_job_completion_settings"},
356  {SCHEDULER_SET_OBSERVATORY_STARTUP_PROCEDURE, "scheduler_set_observatory_startup_procedure"},
357  {SCHEDULER_SET_ABORTED_JOB_MANAGEMENT, "scheduler_set_aborted_job_management"},
358  {SCHEDULER_SET_OBSERVATORY_SHUTDOWN_PROCEDURE, "scheduler_set_observatory_shutdown_procedure"},
359  {SCHEDULER_GET_JOBS, "scheduler_get_jobs"},
360  {SCHEDULER_ADD_JOBS, "scheduler_add_jobs"},
361  {SCHEDULER_REMOVE_JOBS, "scheduler_remove_jobs"},
362  {SCHEDULER_GET_SETTINGS, "scheduler_get_settings"},
363  {SCHEDULER_START_JOB, "scheduler_start_job"},
364 
365  {GUIDE_START, "guide_start"},
366  {GUIDE_CAPTURE, "guide_capture"},
367  {GUIDE_LOOP, "guide_loop"},
368  {GUIDE_STOP, "guide_stop"},
369  {GUIDE_CLEAR, "guide_clear"},
370  {GUIDE_REPORT, "guide_report"},
371  {GUIDE_SET_SETTINGS, "guide_set_settings"},
372 
373  {ALIGN_SOLVE, "align_solve"},
374  {ALIGN_STOP, "align_stop"},
375  {ALIGN_LOAD_AND_SLEW, "align_load_and_slew"},
376  {ALIGN_SET_FILE_EXTENSION, "align_set_file_extension"},
377  {ALIGN_SET_SETTINGS, "align_set_settings"},
378  {ALIGN_MANUAL_ROTATOR_STATUS, "align_manual_rotator_status"},
379  {ALIGN_MANUAL_ROTATOR_TOGGLE, "align_manual_rotator_toggle"},
380 
381  {PAH_START, "polar_start"},
382  {PAH_STOP, "polar_stop"},
383  {PAH_SET_SETTINGS, "polar_set_settings"},
384  {PAH_REFRESH, "polar_refresh"},
385  {PAH_SET_CROSSHAIR, "polar_set_crosshair"},
386  {PAH_SELECT_STAR_DONE, "polar_star_select_done"},
387  {PAH_REFRESHING_DONE, "polar_refreshing_done"},
388  {PAH_RESET_VIEW, "polar_reset_view"},
389  {PAH_SLEW_DONE, "polar_slew_done"},
390  {PAH_PAH_SET_ZOOM, "polar_set_zoom"},
391  {PAH_SET_ALGORITHM, "polar_set_algorithm"},
392 
393  {OPTION_SET_HIGH_BANDWIDTH, "option_set_high_bandwidth"},
394  {OPTION_SET_IMAGE_TRANSFER, "option_set_image_transfer"},
395  {OPTION_SET_NOTIFICATIONS, "option_set_notifications"},
396  {OPTION_SET_CLOUD_STORAGE, "option_set_cloud_storage"},
397  {OPTION_SET, "option_set"},
398  {OPTION_GET, "option_get"},
399 
400  {SET_BLOBS, "set_blobs"},
401 
402  {DSLR_GET_INFO, "dslr_get_info"},
403  {DSLR_SET_INFO, "dslr_set_info"},
404  {DSLR_SET_MODE, "dslr_set_mode"},
405 
406  {DEVICE_GET, "device_get"},
407  {DEVICE_RESTART, "device_restart"},
408  {DEVICE_BLOB_GET, "device_blob_get"},
409  {DEVICE_PROPERTY_GET, "device_property_get"},
410  {DEVICE_PROPERTY_SET, "device_property_set"},
411  {DEVICE_PROPERTY_ADD, "device_property_add"},
412  {DEVICE_PROPERTY_REMOVE, "device_property_remove"},
413  {DEVICE_PROPERTY_SUBSCRIBE, "device_property_subscribe"},
414  {DEVICE_PROPERTY_UNSUBSCRIBE, "device_property_unsubscribe"},
415 
416  {DIALOG_GET_INFO, "dialog_get_info"},
417  {DIALOG_GET_RESPONSE, "dialog_get_response"},
418 
419  {FM_GET_DATA, "fm_get_data"},
420  {FM_SET_DATA, "fm_set_data"},
421 
422  {ASTRO_GET_ALMANC, "astro_get_almanac"},
423  {ASTRO_SEARCH_OBJECTS, "astro_search_objects"},
424  {ASTRO_GET_OBJECT_INFO, "astro_get_object_info"},
425  {ASTRO_GET_OBJECTS_INFO, "astro_get_objects_info"},
426  {ASTRO_GET_OBJECTS_IMAGE, "astro_get_objects_image"},
427  {ASTRO_GET_OBJECTS_OBSERVABILITY, "astro_get_objects_observability"},
428  {ASTRO_GET_OBJECTS_RISESET, "astro_get_objects_riseset"},
429 
430  {DARK_LIBRARY_START, "dark_library_start"},
431  {DARK_LIBRARY_STOP, "dark_library_stop"},
432  {DARK_LIBRARY_SET_CAMERA_PRESETS, "dark_library_set_camera_presets"},
433  {DARK_LIBRARY_GET_CAMERA_PRESETS, "dark_library_get_camera_presets"},
434  {DARK_LIBRARY_SET_SETTINGS, "dark_library_set_settings"},
435  {DARK_LIBRARY_GET_DARK_SETTINGS, "dark_library_get_dark_settings"},
436  {DARK_LIBRARY_SET_DEFECT_SETTINGS, "dark_library_set_defect_settings"},
437  {DARK_LIBRARY_SET_DEFECT_PIXELS, "dark_library_set_defect_pixels"},
438  {DARK_LIBRARY_GET_DEFECT_SETTINGS, "dark_library_get_defect_settings"},
439  {DARK_LIBRARY_GET_VIEW_MASTERS, "dark_library_get_view_masters"},
440  {DARK_LIBRARY_GET_MASTERS_IMAGE, "dark_library_get_masters_image"},
441  {DARK_LIBRARY_CLEAR_MASTERS_ROW, "dark_library_clear_masters_row"},
442  {DARK_LIBRARY_SET_DEFECT_FRAME, "dark_library_set_defect_frame"},
443  {DARK_LIBRARY_SAVE_MAP, "dark_library_save_map"}
444 };
445 
446 }
Generic record interfaces and implementations.
Definition: cloud.cpp:23
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Aug 13 2022 04:01:51 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.