46 Q_PROPERTY(
bool StreamingEnabled MEMBER m_StreamingEnabled)
52 typedef enum { UPLOAD_CLIENT, UPLOAD_LOCAL, UPLOAD_BOTH } UploadMode;
61 typedef enum { TELESCOPE_PRIMARY, TELESCOPE_GUIDE, TELESCOPE_UNKNOWN } TelescopeType;
70 void registerProperty(INDI::Property prop)
override;
71 void removeProperty(INDI::Property prop)
override;
73 void processSwitch(INDI::Property prop)
override;
74 void processText(INDI::Property prop)
override;
75 void processNumber(INDI::Property prop)
override;
76 bool processBLOB(INDI::Property prop)
override;
88 bool hasCoolerControl();
89 bool setCoolerControl(
bool enable);
94 return HasVideoStream;
98 bool getTemperature(
double *value);
99 bool setTemperature(
double value);
102 bool getTemperatureRegulation(
double &ramp,
double &threshold);
103 bool setTemperatureRegulation(
double ramp,
double threshold);
105 bool setScopeInfo(
double focalLength,
double aperture);
108 void setSeqPrefix(
const QString &preFix)
112 void setNextSequenceID(
int count)
114 nextSequenceID = count;
120 return gainN !=
nullptr;
122 bool getGain(
double *value);
123 IPerm getGainPermission()
const
127 bool setGain(
double value);
128 bool getGainMinMaxStep(
double *min,
double *max,
double *step);
133 return offsetN !=
nullptr;
135 bool getOffset(
double *value);
136 IPerm getOffsetPermission()
const
140 bool setOffset(
double value);
141 bool getOffsetMinMaxStep(
double *min,
double *max,
double *step);
144 bool configureRapidGuide(CameraChip *targetChip,
bool autoLoop,
bool sendImage =
false,
bool showMarker =
false);
145 bool setRapidGuide(CameraChip *targetChip,
bool enable);
148 void updateUploadSettings(
const QString &uploadDirectory,
const QString &uploadFile);
149 UploadMode getUploadMode();
150 bool setUploadMode(UploadMode mode);
153 const QString &getEncodingFormat()
const
155 return m_EncodingFormat;
157 bool setEncodingFormat(
const QString &value);
160 return m_EncodingFormats;
166 return m_CaptureFormats;
168 QString getCaptureFormat()
const;
169 bool setCaptureFormat(
const QString &format);
172 bool isBLOBEnabled();
173 bool setBLOBEnabled(
bool enable,
const QString &prop =
QString());
176 bool setVideoStreamEnabled(
bool enable);
177 bool resetStreamingFrame();
178 bool setStreamingFrame(
int x,
int y,
int w,
int h);
179 bool isStreamingEnabled();
180 bool setStreamExposure(
double duration);
181 bool getStreamExposure(
double *duration);
182 bool setStreamLimits(uint16_t maxBufferSize, uint16_t maxPreviewFPS);
185 bool setSERNameDirectory(
const QString &filename,
const QString &directory);
187 bool startRecording();
188 bool startDurationRecording(
double duration);
189 bool startFramesRecording(uint32_t frames);
190 bool stopRecording();
193 TelescopeType getTelescopeType()
195 return telescopeType;
197 bool setTelescopeType(TelescopeType type);
202 CameraChip *getChip(CameraChip::ChipType cType);
204 bool setFastExposureEnabled(
bool enable);
205 bool isFastExposureEnabled()
const
207 return m_FastExposureEnabled;
209 bool setFastCount(uint32_t count);
213 return m_ExposurePresets;
215 const QPair<double, double> getExposurePresetsMinMax()
const
217 return m_ExposurePresetsMinMax;
228 void StreamWindowHidden();
230 void setBLOBManager(
const char *device, INDI::Property prop);
236 void newTemperatureValue(
double value);
237 void newExposureValue(
ISD::CameraChip *chip,
double value, IPState state);
238 void newGuideStarData(
ISD::CameraChip *chip,
double dx,
double dy,
double fit);
239 void newBLOBManager(INDI::Property prop);
241 void coolerToggled(
bool enabled);
242 void error(ErrorType type);
244 void videoStreamToggled(
bool enabled);
245 void videoRecordToggled(
bool enabled);
246 void newFPS(
double instantFPS,
double averageFPS);
254 void processStream(INDI::Property prop);
255 bool WriteImageFileInternal(
const QString &filename,
char *buffer,
const size_t size);
257 bool HasGuideHead {
false };
258 bool HasCooler {
false };
259 bool CanCool {
false };
260 bool HasCoolerControl {
false };
261 bool HasVideoStream {
false };
262 bool m_FastExposureEnabled {
false };
265 int nextSequenceID { 0 };
266 std::unique_ptr<StreamWG> streamWindow;
269 int normalTabID { -1 };
270 int calibrationTabID { -1 };
271 int focusTabID { -1 };
272 int guideTabID { -1 };
273 int alignTabID { -1 };
275 INDI::Property primaryCCDBLOB;
277 std::unique_ptr<CameraChip> primaryChip;
278 std::unique_ptr<CameraChip> guideChip;
279 std::unique_ptr<WSMedia> m_Media;
280 QString m_EncodingFormat {
"FITS"};
283 bool m_StreamingEnabled {
true};
284 int m_CaptureFormatIndex {-1};
285 TelescopeType telescopeType { TELESCOPE_UNKNOWN };
288 INumber *gainN {
nullptr };
289 IPerm gainPerm { IP_RO };
291 INumber *offsetN {
nullptr };
292 IPerm offsetPerm { IP_RO };
300 QPair<double, double> m_ExposurePresetsMinMax;
303 void updateFileBuffer(INDI::Property prop,
bool is_fits);
304 char *fileWriteBuffer {
nullptr };
305 int fileWriteBufferSize { 0 };