Kstars

schedulertypes.cpp
1/*
2 SPDX-FileCopyrightText: 2023 Wolfgang Reissenberger <sterne-jaeger@openfuture.de>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include "schedulertypes.h"
8
9namespace Ekos
10{
11// Functions to make human-readable debug messages for the various enums.
12
13QString ekosStateString(EkosState state)
14{
15 switch(state)
16 {
17 case EKOS_IDLE:
18 return "Ekos is idle";
19 case EKOS_STARTING:
20 return "Starting Ekos";
21 case EKOS_STOPPING:
22 return "Stopping Ekos";
23 case EKOS_READY:
24 return "Ekos is ready";
25 }
26 return QString("????");
27}
28
29QString indiStateString(INDIState state)
30{
31 switch(state)
32 {
33 case INDI_IDLE:
34 return "INDI is idle";
35 case INDI_PROPERTY_CHECK:
36 return "Checking INDI properties";
37 case INDI_CONNECTING:
38 return "Connecting to INDI";
39 case INDI_DISCONNECTING:
40 return "Disconnecting to INDI";
41 case INDI_READY:
42 return "INDI is ready";
43 }
44 return QString("????");
45}
46
47QString startupStateString(StartupState state)
48{
49 switch(state)
50 {
51 case STARTUP_IDLE:
52 return "Startup is idle";
53 case STARTUP_SCRIPT:
54 return "Startup running script";
55 case STARTUP_UNPARK_DOME:
56 return "Startup unpark dome";
57 case STARTUP_UNPARKING_DOME:
58 return "Startup unparking dome";
59 case STARTUP_UNPARK_MOUNT:
60 return "Startup unpark mount";
61 case STARTUP_UNPARKING_MOUNT:
62 return "Startup unparking mount";
63 case STARTUP_UNPARK_CAP:
64 return "Startup remove cap";
65 case STARTUP_UNPARKING_CAP:
66 return "Starup removing cap";
67 case STARTUP_ERROR:
68 return "Startup error";
69 case STARTUP_COMPLETE:
70 return "Startup is complete";
71 }
72 return QString("????");
73}
74
75QString shutdownStateString(ShutdownState state)
76{
77 switch(state)
78 {
79 case SHUTDOWN_IDLE:
80 return "Shutdown is idle";
81 case SHUTDOWN_PARK_CAP:
82 return "Shutdown remove cap";
83 case SHUTDOWN_PARKING_CAP:
84 return "Shutdown removing cap";
85 case SHUTDOWN_PARK_MOUNT:
86 return "Shutdown park mount";
87 case SHUTDOWN_PARKING_MOUNT:
88 return "Shutdown parking mount";
89 case SHUTDOWN_PARK_DOME:
90 return "Shutdown park dome";
91 case SHUTDOWN_PARKING_DOME:
92 return "Shutdown parking dome";
93 case SHUTDOWN_SCRIPT:
94 return "Shutdown script";
95 case SHUTDOWN_SCRIPT_RUNNING:
96 return "Shutdown script running";
97 case SHUTDOWN_ERROR:
98 return "Shutdown error";
99 case SHUTDOWN_COMPLETE:
100 return "Shutdown complete";
101 }
102 return QString("????");
103}
104
105QString parkWaitStateString(ParkWaitState state)
106{
107 switch(state)
108 {
109 case PARKWAIT_IDLE:
110 return "Park idle";
111 case PARKWAIT_PARK:
112 return "Park";
113 case PARKWAIT_PARKING:
114 return "Parking";
115 case PARKWAIT_PARKED:
116 return "Parked";
117 case PARKWAIT_UNPARK:
118 return "Unpark";
119 case PARKWAIT_UNPARKING:
120 return "Unparking";
121 case PARKWAIT_UNPARKED:
122 return "Unparked";
123 case PARKWAIT_ERROR:
124 return "Park error";
125 }
126 return QString("????");
127}
128
129QString timerStr(SchedulerTimerState state)
130{
131 switch (state)
132 {
133 case RUN_WAKEUP:
134 return QString("RUN_WAKEUP");
135 case RUN_SCHEDULER:
136 return QString("RUN_SCHEDULER");
137 case RUN_JOBCHECK:
138 return QString("RUN_JOBCHECK");
139 case RUN_SHUTDOWN:
140 return QString("RUN_SHUTDOWN");
141 case RUN_NOTHING:
142 return QString("RUN_NOTHING");
143 }
144 return QString("????");
145}
146
147QString startupConditionString(StartupCondition condition)
148{
149 switch(condition)
150 {
151 case START_ASAP:
152 return "ASAP";
153 case START_AT:
154 return "AT";
155 }
156 return QString("????");
157}
158
159QString completionConditionString(CompletionCondition condition)
160{
161 switch(condition)
162 {
163 case FINISH_SEQUENCE:
164 return "FINISH";
165 case FINISH_REPEAT:
166 return "REPEAT";
167 case FINISH_LOOP:
168 return "LOOP";
169 case FINISH_AT:
170 return "AT";
171 }
172 return QString("????");
173}
174
175
176} // Ekos namespace
Ekos is an advanced Astrophotography tool for Linux.
Definition align.cpp:83
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.