55 return m_DeviceNumber;
152 void extractTransactionIDs(
const httplib::Request &req, uint32_t &clientID, uint32_t &serverID);
155 void sendResponse(
httplib::Response &res,
bool success,
const std::string &errorMessage);
158 template <
typename T>
160 const std::string &errorMessage =
"",
int clientID = 0,
int serverID = 0);
163 template <
typename T>
165 bool success =
true,
const std::string &errorMessage =
"");
168 const std::string &errorMessage =
"");
171 bool extractImageFromFITS(
const uint8_t* fitsData,
size_t fitsSize,
172 std::vector<uint8_t> &rawData,
int &width,
int &height,
173 int &bitsPerPixel,
int &naxis);
174 void convertCoordinateSystem(std::vector<uint8_t> &imageData,
int width,
int height,
int bytesPerPixel);
175 void formatImageAsJSON(
const std::vector<uint8_t> &rawData,
int width,
int height,
183 int m_CameraXSize {0};
184 int m_CameraYSize {0};
185 double m_PixelSizeX {0.0};
186 double m_PixelSizeY {0.0};
189 int m_BitsPerPixel {16};
200 bool m_CanAbortExposure {
true};
201 bool m_CanStopExposure {
false};
202 bool m_CanPulseGuide {
false};
203 bool m_CanSetCCDTemperature {
false};
204 bool m_HasShutter {
false};
205 bool m_CanAsymmetricBin {
false};
208 double m_CCDTemperature {0.0};
209 double m_TargetCCDTemperature {0.0};
210 bool m_CoolerOn {
false};
211 double m_CoolerPower {0.0};
214 bool m_HasGain {
false};
215 bool m_HasOffset {
false};
217 double m_GainMin {0.0};
218 double m_GainMax {1000.0};
219 double m_Offset {0.0};
220 double m_OffsetMin {0.0};
221 double m_OffsetMax {10000.0};
222 std::vector<std::string> m_Gains;
223 std::vector<std::string> m_Offsets;
226 int m_ReadoutMode {0};
227 std::vector<std::string> m_ReadoutModes;
228 int m_SensorType {0};
229 int m_BayerOffsetX {0};
230 int m_BayerOffsetY {0};
233 bool m_IsExposing {
false};
234 bool m_ImageReady {
false};
235 int m_CameraState {0};
236 double m_PercentCompleted {0.0};
237 double m_LastExposureDuration {0.0};
238 std::string m_LastExposureStartTime;
239 std::chrono::steady_clock::time_point m_ExposureStartTime;
240 double m_ExposureMin {0.0};
241 double m_ExposureMax {10000.0};
244 std::vector<uint8_t> m_LastImageData;
245 int m_LastImageWidth {0};
246 int m_LastImageHeight {0};
247 int m_LastImageBPP {16};
248 int m_LastImageNAxis {2};
251 bool m_IsPulseGuiding {
false};
254 int m_MaxADU {65535};
255 double m_ElectronsPerADU {1.0};
256 double m_FullWellCapacity {100000.0};
259 bool m_UsesCCDControlsForGainOffset {
false};