X2 Standard  Version 1.24
x2camera.h
1 #pragma once
2 
3 #include "../../licensedinterfaces/cameradriverinterface.h"
4 #include "../../licensedinterfaces/modalsettingsdialoginterface.h"
5 #include "../../licensedinterfaces/x2guiinterface.h"
6 
7 
8 class SerXInterface;
10 class SleeperInterface;
12 class LoggerInterface;
13 class MutexInterface;
14 class TickCountInterface;
15 
16 
25 {
26 public:
28  X2Camera(const char* pszSelectionString,
29  const int& nISIndex,
30  SerXInterface* pSerX,
31  TheSkyXFacadeForDriversInterface* pTheSkyXForMounts,
32  SleeperInterface* pSleeper,
33  BasicIniUtilInterface* pIniUtil,
34  LoggerInterface* pLogger,
35  MutexInterface* pIOMutex,
36  TickCountInterface* pTickCount);
37  virtual ~X2Camera();
38 
42  virtual int queryAbstraction(const char* pszName, void** ppVal) ;
44 
48  virtual void driverInfoDetailedInfo(BasicStringInterface& str) const ;
49  virtual double driverInfoVersion(void) const ;
51 
55  virtual void deviceInfoNameShort(BasicStringInterface& str) const ;
56  virtual void deviceInfoNameLong(BasicStringInterface& str) const ;
57  virtual void deviceInfoDetailedDescription(BasicStringInterface& str) const ;
59  virtual void deviceInfoModel(BasicStringInterface& str) ;
61 
62 public://Properties
63 
67 
68  virtual enumCameraIndex cameraId();
69  virtual void setCameraId(enumCameraIndex Cam);
70  virtual bool isLinked() {return m_bLinked;}
71  virtual void setLinked(const bool bYes) {m_bLinked = bYes;}
72 
73  virtual int GetVersion(void) {return CAMAPIVERSION;}
75  virtual int pathTo_rm_FitsOnDisk(char* lpszPath, const int& nPathSize);
76 
77 public://Methods
78 
79  virtual int CCSettings(const enumCameraIndex& Camera, const enumWhichCCD& CCD);
80 
81  virtual int CCEstablishLink(enumLPTPort portLPT, const enumWhichCCD& CCD, enumCameraIndex DesiredCamera, enumCameraIndex& CameraFound, const int nDesiredCFW, int& nFoundCFW);
82  virtual int CCDisconnect(const bool bShutDownTemp);
83 
84  virtual int CCGetChipSize(const enumCameraIndex& Camera, const enumWhichCCD& CCD, const int& nXBin, const int& nYBin, const bool& bOffChipBinning, int& nW, int& nH, int& nReadOut);
85  virtual int CCGetNumBins(const enumCameraIndex& Camera, const enumWhichCCD& CCD, int& nNumBins);
86  virtual int CCGetBinSizeFromIndex(const enumCameraIndex& Camera, const enumWhichCCD& CCD, const int& nIndex, long& nBincx, long& nBincy);
87 
88  virtual int CCSetBinnedSubFrame(const enumCameraIndex& Camera, const enumWhichCCD& CCD, const int& nLeft, const int& nTop, const int& nRight, const int& nBottom);
89 
90  virtual void CCMakeExposureState(int* pnState, enumCameraIndex Cam, int nXBin, int nYBin, int abg, bool bRapidReadout);//SBIG specific
91 
92  virtual int CCStartExposure(const enumCameraIndex& Cam, const enumWhichCCD CCD, const double& dTime, enumPictureType Type, const int& nABGState, const bool& bLeaveShutterAlone);
93  virtual int CCIsExposureComplete(const enumCameraIndex& Cam, const enumWhichCCD CCD, bool* pbComplete, unsigned int* pStatus);
94  virtual int CCEndExposure(const enumCameraIndex& Cam, const enumWhichCCD CCD, const bool& bWasAborted, const bool& bLeaveShutterAlone);
95 
96  virtual int CCReadoutLine(const enumCameraIndex& Cam, const enumWhichCCD& CCD, const int& pixelStart, const int& pixelLength, const int& nReadoutMode, unsigned char* pMem);
97  virtual int CCDumpLines(const enumCameraIndex& Cam, const enumWhichCCD& CCD, const int& nReadoutMode, const unsigned int& lines);
98 
99  virtual int CCReadoutImage(const enumCameraIndex& Cam, const enumWhichCCD& CCD, const int& nWidth, const int& nHeight, const int& nMemWidth, unsigned char* pMem);
100 
101  virtual int CCRegulateTemp(const bool& bOn, const double& dTemp);
102  virtual int CCQueryTemperature(double& dCurTemp, double& dCurPower, char* lpszPower, const int nMaxLen, bool& bCurEnabled, double& dCurSetPoint);
103  virtual int CCGetRecommendedSetpoint(double& dRecSP);
104  virtual int CCSetFan(const bool& bOn);
105 
106  virtual int CCActivateRelays(const int& nXPlus, const int& nXMinus, const int& nYPlus, const int& nYMinus, const bool& bSynchronous, const bool& bAbort, const bool& bEndThread);
107 
108  virtual int CCPulseOut(unsigned int nPulse, bool bAdjust, const enumCameraIndex& Cam);
109 
110  virtual int CCSetShutter(bool bOpen);
111  virtual int CCUpdateClock(void);
112 
113  virtual int CCSetImageProps(const enumCameraIndex& Camera, const enumWhichCCD& CCD, const int& nReadOut, void* pImage);
114  virtual int CCGetFullDynamicRange(const enumCameraIndex& Camera, const enumWhichCCD& CCD, unsigned long& dwDynRg);
115 
116  virtual void CCBeforeDownload(const enumCameraIndex& Cam, const enumWhichCCD& CCD);
117  virtual void CCAfterDownload(const enumCameraIndex& Cam, const enumWhichCCD& CCD);
119 
120  //
124  virtual int initModalSettingsDialog(void){return 0;}
125  virtual int execModalSettingsDialog(void);
127 
128  //
132  virtual void uiEvent(X2GUIExchangeInterface* uiex, const char* pszEvent);
134 
135  //Implemenation below here
136 private:
137  SerXInterface * GetSerX() {return m_pSerX; }
138  TheSkyXFacadeForDriversInterface * GetTheSkyXFacadeForDrivers() {return m_pTheSkyXForMounts;}
139  SleeperInterface * GetSleeper() {return m_pSleeper; }
140  BasicIniUtilInterface * GetBasicIniUtil() {return m_pIniUtil; }
141  LoggerInterface * GetLogger() {return m_pLogger; }
142  MutexInterface * GetMutex() const {return m_pIOMutex;}
143  TickCountInterface * GetTickCountInterface() {return m_pTickCount;}
144 
145  SerXInterface * m_pSerX;
146  TheSkyXFacadeForDriversInterface * m_pTheSkyXForMounts;
147  SleeperInterface * m_pSleeper;
148  BasicIniUtilInterface * m_pIniUtil;
149  LoggerInterface * m_pLogger;
150  MutexInterface * m_pIOMutex;
151  TickCountInterface * m_pTickCount;
152 
153  int m_nPrivateISIndex;
154 
155  int width();
156  int height();
157  void setWidth(const int& nValue);
158  void setHeight(const int& nValue);
159 
160  int m_dwFin;
161  int m_CachedBinX;
162  int m_CachedBinY;
163  int m_CachedCam;
164  double m_dCurTemp;
165  double m_dCurPower;
166 
167  int doAddPixelDialogExample(int& xCoord, int& yCoord, bool& bPressedOK);
168 };
169 
170 
171 
X2Camera::CCDisconnect
virtual int CCDisconnect(const bool bShutDownTemp)
Definition: x2camera.cpp:350
X2Camera::CCRegulateTemp
virtual int CCRegulateTemp(const bool &bOn, const double &dTemp)
Definition: x2camera.cpp:159
X2Camera
The X2Camera example.
Definition: x2camera.h:25
X2Camera::pathTo_rm_FitsOnDisk
virtual int pathTo_rm_FitsOnDisk(char *lpszPath, const int &nPathSize)
Definition: x2camera.cpp:405
X2Camera::readoutMode
virtual CameraDriverInterface::ReadOutMode readoutMode(void)
Definition: x2camera.cpp:417
X2Camera::CCActivateRelays
virtual int CCActivateRelays(const int &nXPlus, const int &nXMinus, const int &nYPlus, const int &nYMinus, const bool &bSynchronous, const bool &bAbort, const bool &bEndThread)
Definition: x2camera.cpp:304
X2GUIEventInterface
The X2UIEventsInterface notifies X2 implementors when user interface events happen.
Definition: x2guiinterface.h:98
X2Camera::CCGetRecommendedSetpoint
virtual int CCGetRecommendedSetpoint(double &dRecSP)
Definition: x2camera.cpp:169
X2Camera::queryAbstraction
virtual int queryAbstraction(const char *pszName, void **ppVal)
Definition: x2camera.cpp:80
ModalSettingsDialogInterface
The ModalSettingsDialogInterface allows X2 implementors to display a customized settings user interfa...
Definition: modalsettingsdialoginterface.h:23
X2Camera::CCReadoutImage
virtual int CCReadoutImage(const enumCameraIndex &Cam, const enumWhichCCD &CCD, const int &nWidth, const int &nHeight, const int &nMemWidth, unsigned char *pMem)
Definition: x2camera.cpp:340
X2Camera::CCStartExposure
virtual int CCStartExposure(const enumCameraIndex &Cam, const enumWhichCCD CCD, const double &dTime, enumPictureType Type, const int &nABGState, const bool &bLeaveShutterAlone)
Definition: x2camera.cpp:179
X2Camera::CCPulseOut
virtual int CCPulseOut(unsigned int nPulse, bool bAdjust, const enumCameraIndex &Cam)
Definition: x2camera.cpp:310
CameraDriverInterface::ReadOutMode
ReadOutMode
Definition: cameradriverinterface.h:79
X2Camera::CCSetShutter
virtual int CCSetShutter(bool bOpen)
Definition: x2camera.cpp:297
X2Camera::X2Camera
X2Camera(const char *pszSelectionString, const int &nISIndex, SerXInterface *pSerX, TheSkyXFacadeForDriversInterface *pTheSkyXForMounts, SleeperInterface *pSleeper, BasicIniUtilInterface *pIniUtil, LoggerInterface *pLogger, MutexInterface *pIOMutex, TickCountInterface *pTickCount)
Definition: x2camera.cpp:29
X2Camera::CCSettings
virtual int CCSettings(const enumCameraIndex &Camera, const enumWhichCCD &CCD)
Definition: x2camera.cpp:391
CameraDriverInterface
The CameraDriverInterface allows an X2 implementor to a write X2 camera driver.
Definition: cameradriverinterface.h:40
TickCountInterface
The TickCountInterface is a cross-platform way to measure relative timing.
Definition: tickcountinterface.h:17
MutexInterface
The MutexInterface provides a cross-platform mutex.
Definition: mutexinterface.h:16
X2Camera::initModalSettingsDialog
virtual int initModalSettingsDialog(void)
Definition: x2camera.h:124
X2Camera::CCEstablishLink
virtual int CCEstablishLink(enumLPTPort portLPT, const enumWhichCCD &CCD, enumCameraIndex DesiredCamera, enumCameraIndex &CameraFound, const int nDesiredCFW, int &nFoundCFW)
Definition: x2camera.cpp:139
X2Camera::CCSetImageProps
virtual int CCSetImageProps(const enumCameraIndex &Camera, const enumWhichCCD &CCD, const int &nReadOut, void *pImage)
Definition: x2camera.cpp:362
X2Camera::deviceInfoDetailedDescription
virtual void deviceInfoDetailedDescription(BasicStringInterface &str) const
Definition: x2camera.cpp:120
X2Camera::CCReadoutLine
virtual int CCReadoutLine(const enumCameraIndex &Cam, const enumWhichCCD &CCD, const int &pixelStart, const int &pixelLength, const int &nReadoutMode, unsigned char *pMem)
Definition: x2camera.cpp:327
X2Camera::CCGetFullDynamicRange
virtual int CCGetFullDynamicRange(const enumCameraIndex &Camera, const enumWhichCCD &CCD, unsigned long &dwDynRg)
Definition: x2camera.cpp:369
X2Camera::CCGetChipSize
virtual int CCGetChipSize(const enumCameraIndex &Camera, const enumWhichCCD &CCD, const int &nXBin, const int &nYBin, const bool &bOffChipBinning, int &nW, int &nH, int &nReadOut)
Definition: x2camera.cpp:245
X2Camera::execModalSettingsDialog
virtual int execModalSettingsDialog(void)
Definition: x2camera.cpp:471
X2Camera::driverInfoVersion
virtual double driverInfoVersion(void) const
Definition: x2camera.cpp:100
X2Camera::driverInfoDetailedInfo
virtual void driverInfoDetailedInfo(BasicStringInterface &str) const
Definition: x2camera.cpp:94
X2Camera::setCameraId
virtual void setCameraId(enumCameraIndex Cam)
Definition: x2camera.cpp:432
X2Camera::CCGetNumBins
virtual int CCGetNumBins(const enumCameraIndex &Camera, const enumWhichCCD &CCD, int &nNumBins)
Definition: x2camera.cpp:259
TheSkyXFacadeForDriversInterface
The TheSkyXFacadeForDriversInterface is a simplified interface to TheSkyX passed to X2 implementors.
Definition: theskyxfacadefordriversinterface.h:19
X2Camera::CCQueryTemperature
virtual int CCQueryTemperature(double &dCurTemp, double &dCurPower, char *lpszPower, const int nMaxLen, bool &bCurEnabled, double &dCurSetPoint)
Definition: x2camera.cpp:146
X2Camera::CCUpdateClock
virtual int CCUpdateClock(void)
Definition: x2camera.cpp:290
X2Camera::deviceInfoModel
virtual void deviceInfoModel(BasicStringInterface &str)
Definition: x2camera.cpp:132
X2Camera::CCEndExposure
virtual int CCEndExposure(const enumCameraIndex &Cam, const enumWhichCCD CCD, const bool &bWasAborted, const bool &bLeaveShutterAlone)
Definition: x2camera.cpp:226
X2Camera::uiEvent
virtual void uiEvent(X2GUIExchangeInterface *uiex, const char *pszEvent)
Definition: x2camera.cpp:643
X2Camera::CCIsExposureComplete
virtual int CCIsExposureComplete(const enumCameraIndex &Cam, const enumWhichCCD CCD, bool *pbComplete, unsigned int *pStatus)
Definition: x2camera.cpp:208
X2Camera::CCMakeExposureState
virtual void CCMakeExposureState(int *pnState, enumCameraIndex Cam, int nXBin, int nYBin, int abg, bool bRapidReadout)
Definition: x2camera.cpp:376
BasicIniUtilInterface
The BasicIniUtilInterface is used to make properties persistent.
Definition: basiciniutilinterface.h:21
LoggerInterface
The LoggerInterface is a cross-platform logging utility passed to X2 implementors to show real-time,...
Definition: loggerinterface.h:58
X2Camera::CCBeforeDownload
virtual void CCBeforeDownload(const enumCameraIndex &Cam, const enumWhichCCD &CCD)
Definition: x2camera.cpp:316
X2Camera::deviceInfoFirmwareVersion
virtual void deviceInfoFirmwareVersion(BasicStringInterface &str)
Definition: x2camera.cpp:126
X2Camera::deviceInfoNameShort
virtual void deviceInfoNameShort(BasicStringInterface &str) const
Definition: x2camera.cpp:108
SleeperInterface
The SleeperInterface is a cross-platform "sleeper".
Definition: sleeperinterface.h:15
X2Camera::cameraId
virtual enumCameraIndex cameraId()
Definition: x2camera.cpp:425
X2Camera::CCSetFan
virtual int CCSetFan(const bool &bOn)
Definition: x2camera.cpp:398
X2Camera::setLinked
virtual void setLinked(const bool bYes)
Definition: x2camera.h:71
SerXInterface
The SerXInterface is a cross-plaform serial port.
Definition: serxinterface.h:18
X2Camera::CCSetBinnedSubFrame
virtual int CCSetBinnedSubFrame(const enumCameraIndex &Camera, const enumWhichCCD &CCD, const int &nLeft, const int &nTop, const int &nRight, const int &nBottom)
Definition: x2camera.cpp:383
X2GUIExchangeInterface
The X2GUIExchangeInterface provides the X2 developer the means to get and set data from a graphical u...
Definition: x2guiinterface.h:23
X2Camera::CCAfterDownload
virtual void CCAfterDownload(const enumCameraIndex &Cam, const enumWhichCCD &CCD)
Definition: x2camera.cpp:321
BasicStringInterface
The BasicStringInterface allows a string as an output.
Definition: basicstringinterface.h:17
X2Camera::isLinked
virtual bool isLinked()
Definition: x2camera.h:70
X2Camera::CCGetBinSizeFromIndex
virtual int CCGetBinSizeFromIndex(const enumCameraIndex &Camera, const enumWhichCCD &CCD, const int &nIndex, long &nBincx, long &nBincy)
Definition: x2camera.cpp:273
X2Camera::deviceInfoNameLong
virtual void deviceInfoNameLong(BasicStringInterface &str) const
Definition: x2camera.cpp:114
X2Camera::CCDumpLines
virtual int CCDumpLines(const enumCameraIndex &Cam, const enumWhichCCD &CCD, const int &nReadoutMode, const unsigned int &lines)
Definition: x2camera.cpp:333
X2 Examples
(C) Software Bisque, Inc. All rights reserved.