47 Q_PROPERTY(
bool StreamingEnabled MEMBER m_StreamingEnabled)
53 typedef enum { UPLOAD_CLIENT, UPLOAD_LOCAL, UPLOAD_BOTH } UploadMode;
62 typedef enum { TELESCOPE_PRIMARY, TELESCOPE_GUIDE, TELESCOPE_UNKNOWN } TelescopeType;
71 void registerProperty(INDI::Property prop)
override;
72 void removeProperty(INDI::Property prop)
override;
74 void processSwitch(INDI::Property prop)
override;
75 void processText(INDI::Property prop)
override;
76 void processNumber(INDI::Property prop)
override;
77 bool processBLOB(INDI::Property prop)
override;
89 bool hasCoolerControl();
90 bool setCoolerControl(
bool enable);
95 return HasVideoStream;
99 bool getTemperature(
double *value);
100 bool setTemperature(
double value);
103 bool getTemperatureRegulation(
double &ramp,
double &threshold);
104 bool setTemperatureRegulation(
double ramp,
double threshold);
106 bool setScopeInfo(
double focalLength,
double aperture);
109 void setSeqPrefix(
const QString &preFix)
113 void setNextSequenceID(
int count)
115 nextSequenceID = count;
121 return gainN !=
nullptr;
123 bool getGain(
double *value);
124 IPerm getGainPermission()
const
128 bool setGain(
double value);
129 bool getGainMinMaxStep(
double *min,
double *max,
double *step);
134 return offsetN !=
nullptr;
136 bool getOffset(
double *value);
137 IPerm getOffsetPermission()
const
141 bool setOffset(
double value);
142 bool getOffsetMinMaxStep(
double *min,
double *max,
double *step);
145 bool configureRapidGuide(CameraChip *targetChip,
bool autoLoop,
bool sendImage =
false,
bool showMarker =
false);
146 bool setRapidGuide(CameraChip *targetChip,
bool enable);
149 void updateUploadSettings(
const QString &uploadDirectory,
const QString &uploadFile);
150 UploadMode getUploadMode();
151 bool setUploadMode(UploadMode mode);
154 const QString &getEncodingFormat()
const
156 return m_EncodingFormat;
158 bool setEncodingFormat(
const QString &value);
161 return m_EncodingFormats;
163 const QString &getStreamEncoding()
const
165 return m_StreamEncoding;
167 bool setStreamEncoding(
const QString &value);
170 return m_StreamEncodings;
172 const QString &getStreamRecording()
const
174 return m_StreamRecording;
176 bool setStreamRecording(
const QString &value);
179 return m_VideoFormats;
185 return m_CaptureFormats;
187 QString getCaptureFormat()
const;
188 bool setCaptureFormat(
const QString &format);
191 bool isBLOBEnabled();
192 bool setBLOBEnabled(
bool enable,
const QString &prop =
QString());
195 bool setVideoStreamEnabled(
bool enable);
196 bool resetStreamingFrame();
197 bool setStreamingFrame(
int x,
int y,
int w,
int h);
198 bool isStreamingEnabled();
199 bool setStreamExposure(
double duration);
200 bool getStreamExposure(
double *duration);
201 bool setStreamLimits(uint16_t maxBufferSize, uint16_t maxPreviewFPS);
204 bool setSERNameDirectory(
const QString &filename,
const QString &directory);
206 bool startRecording();
207 bool startDurationRecording(
double duration);
208 bool startFramesRecording(uint32_t frames);
209 bool stopRecording();
212 TelescopeType getTelescopeType()
214 return telescopeType;
216 bool setTelescopeType(TelescopeType type);
221 CameraChip *getChip(CameraChip::ChipType cType);
223 bool setFastExposureEnabled(
bool enable);
224 bool isFastExposureEnabled()
const
226 return m_FastExposureEnabled;
228 bool setFastCount(uint32_t count);
232 return m_ExposurePresets;
234 const QPair<double, double> getExposurePresetsMinMax()
const
236 return m_ExposurePresetsMinMax;
247 void StreamWindowHidden();
249 void setBLOBManager(
const char *device, INDI::Property prop);
255 void newTemperatureValue(
double value);
256 void newExposureValue(
ISD::CameraChip *chip,
double value, IPState state);
257 void newGuideStarData(
ISD::CameraChip *chip,
double dx,
double dy,
double fit);
258 void newBLOBManager(INDI::Property prop);
260 void coolerToggled(
bool enabled);
261 void error(ErrorType type);
263 void updateVideoWindow(
int width,
int height,
bool streamEnabled);
264 void closeVideoWindow();
265 void videoStreamToggled(
bool enabled);
266 void showVideoFrame(INDI::Property prop,
int width,
int height);
267 void videoRecordToggled(
bool enabled);
268 void newFPS(
double instantFPS,
double averageFPS);
276 void processStream(INDI::Property prop);
277 bool WriteImageFileInternal(
const QString &filename,
char *buffer,
const size_t size);
279 bool HasGuideHead {
false };
280 bool HasCooler {
false };
281 bool CanCool {
false };
282 bool HasCoolerControl {
false };
283 bool HasVideoStream {
false };
284 bool m_isStreamEnabled {
false };
285 bool m_FastExposureEnabled {
false };
288 int nextSequenceID { 0 };
291 int normalTabID { -1 };
292 int calibrationTabID { -1 };
293 int focusTabID { -1 };
294 int guideTabID { -1 };
295 int alignTabID { -1 };
297 INDI::Property primaryCCDBLOB;
299 std::unique_ptr<CameraChip> primaryChip;
300 std::unique_ptr<CameraChip> guideChip;
301 std::unique_ptr<WSMedia> m_Media;
302 QString m_EncodingFormat {
"FITS"};
303 QString m_StreamEncoding {
"RAW"};
304 QString m_StreamRecording {
"SER"};
309 bool m_StreamingEnabled {
true};
310 int m_CaptureFormatIndex {-1};
311 TelescopeType telescopeType { TELESCOPE_UNKNOWN };
314 INumber *gainN {
nullptr };
315 IPerm gainPerm { IP_RO };
317 INumber *offsetN {
nullptr };
318 IPerm offsetPerm { IP_RO };
326 QPair<double, double> m_ExposurePresetsMinMax;
329 void updateFileBuffer(INDI::Property prop,
bool is_fits);
330 char *fileWriteBuffer {
nullptr };
331 int fileWriteBufferSize { 0 };