Kstars

schedulertypes.h
1/*
2 SPDX-FileCopyrightText: 2023 Wolfgang Reissenberger <sterne-jaeger@openfuture.de>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "QString"
10
11namespace Ekos
12{
13typedef enum
14{
15 STARTUP_IDLE,
16 STARTUP_SCRIPT,
17 STARTUP_UNPARK_DOME,
18 STARTUP_UNPARKING_DOME,
19 STARTUP_UNPARK_MOUNT,
20 STARTUP_UNPARKING_MOUNT,
21 STARTUP_UNPARK_CAP,
22 STARTUP_UNPARKING_CAP,
23 STARTUP_ERROR,
24 STARTUP_COMPLETE
25} StartupState;
26typedef enum
27{
28 SHUTDOWN_IDLE,
29 SHUTDOWN_PARK_CAP,
30 SHUTDOWN_PARKING_CAP,
31 SHUTDOWN_PARK_MOUNT,
32 SHUTDOWN_PARKING_MOUNT,
33 SHUTDOWN_PARK_DOME,
34 SHUTDOWN_PARKING_DOME,
35 SHUTDOWN_SCRIPT,
36 SHUTDOWN_SCRIPT_RUNNING,
37 SHUTDOWN_ERROR,
38 SHUTDOWN_COMPLETE
39} ShutdownState;
40typedef enum
41{
42 PARKWAIT_IDLE,
43 PARKWAIT_PARK,
44 PARKWAIT_PARKING,
45 PARKWAIT_PARKED,
46 PARKWAIT_UNPARK,
47 PARKWAIT_UNPARKING,
48 PARKWAIT_UNPARKED,
49 PARKWAIT_ERROR
50} ParkWaitState;
51// overall states of EKOS
52typedef enum { EKOS_IDLE, EKOS_STARTING, EKOS_STOPPING, EKOS_READY } EkosState;
53// overall states of INDI
54typedef enum { INDI_IDLE, INDI_CONNECTING, INDI_DISCONNECTING, INDI_PROPERTY_CHECK, INDI_READY } INDIState;
55
56/** @brief options what should happen if an error or abort occurs */
57typedef enum
58{
59 ERROR_DONT_RESTART,
60 ERROR_RESTART_AFTER_TERMINATION,
61 ERROR_RESTART_IMMEDIATELY
63
64/** @brief Algorithms, in the same order as UI. */
65typedef enum
66{
67 ALGORITHM_GREEDY = 1
69
70
71/** @brief Conditions under which a SchedulerJob may start. */
72typedef enum
73{
74 START_ASAP = 0,
75 START_AT = 2
77
78/** @brief Conditions under which a SchedulerJob may complete. */
79typedef enum
80{
81 FINISH_SEQUENCE,
82 FINISH_REPEAT,
83 FINISH_LOOP,
84 FINISH_AT
86
87/** @brief IterationTypes, the different types of scheduler iterations that are run. */
88typedef enum
89{
90 RUN_WAKEUP = 0,
91 RUN_SCHEDULER,
92 RUN_JOBCHECK,
93 RUN_SHUTDOWN,
94 RUN_NOTHING
96
97/** @brief States of a SchedulerJob. */
98typedef enum
99{
100 SCHEDJOB_IDLE, /**< Job was just created, and is not evaluated yet */
101 SCHEDJOB_EVALUATION, /**< Job is being evaluated */
102 SCHEDJOB_SCHEDULED, /**< Job was evaluated, and has a schedule */
103 SCHEDJOB_BUSY, /**< Job is being processed */
104 SCHEDJOB_ERROR, /**< Job encountered a fatal issue while processing, and must be reset manually */
105 SCHEDJOB_ABORTED, /**< Job encountered a transitory issue while processing, and will be rescheduled */
106 SCHEDJOB_INVALID, /**< Job has an incorrect configuration, and cannot proceed */
107 SCHEDJOB_COMPLETE /**< Job finished all required captures */
109
110/** @brief Running stages of a SchedulerJob. */
111typedef enum
112{
113 SCHEDSTAGE_IDLE,
114 SCHEDSTAGE_SLEWING,
115 SCHEDSTAGE_SLEW_COMPLETE,
116 SCHEDSTAGE_FOCUSING,
117 SCHEDSTAGE_FOCUS_COMPLETE,
118 SCHEDSTAGE_ALIGNING,
119 SCHEDSTAGE_ALIGN_COMPLETE,
120 SCHEDSTAGE_RESLEWING,
121 SCHEDSTAGE_RESLEWING_COMPLETE,
122 SCHEDSTAGE_POSTALIGN_FOCUSING,
123 SCHEDSTAGE_POSTALIGN_FOCUSING_COMPLETE,
124 SCHEDSTAGE_GUIDING,
125 SCHEDSTAGE_GUIDING_COMPLETE,
126 SCHEDSTAGE_CAPTURING,
127 SCHEDSTAGE_COMPLETE
129
130/** @brief mapping signature --> frames count */
132
133// Functions to make human-readable debug messages for the various enums.
134
135QString ekosStateString(EkosState state);
136QString indiStateString(INDIState state);
137QString startupStateString(StartupState state);
138QString shutdownStateString(ShutdownState state);
139QString parkWaitStateString(ParkWaitState state);
140QString timerStr(SchedulerTimerState state);
141QString startupConditionString(StartupCondition condition);
142QString completionConditionString(CompletionCondition condition);
143
144} // Ekos namespace
Ekos is an advanced Astrophotography tool for Linux.
Definition align.cpp:79
SchedulerJobStage
Running stages of a SchedulerJob.
StartupCondition
Conditions under which a SchedulerJob may start.
SchedulerJobStatus
States of a SchedulerJob.
@ SCHEDJOB_ABORTED
Job encountered a transitory issue while processing, and will be rescheduled.
@ SCHEDJOB_INVALID
Job has an incorrect configuration, and cannot proceed.
@ SCHEDJOB_ERROR
Job encountered a fatal issue while processing, and must be reset manually.
@ SCHEDJOB_COMPLETE
Job finished all required captures.
@ SCHEDJOB_EVALUATION
Job is being evaluated.
@ SCHEDJOB_SCHEDULED
Job was evaluated, and has a schedule.
@ SCHEDJOB_BUSY
Job is being processed.
@ SCHEDJOB_IDLE
Job was just created, and is not evaluated yet.
QMap< QString, uint16_t > CapturedFramesMap
mapping signature --> frames count
ErrorHandlingStrategy
options what should happen if an error or abort occurs
CompletionCondition
Conditions under which a SchedulerJob may complete.
SchedulerTimerState
IterationTypes, the different types of scheduler iterations that are run.
SchedulerAlgorithm
Algorithms, in the same order as UI.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 24 2024 11:49:22 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.