X2 Standard  Version 1.24
Public Member Functions | List of all members
X2Camera Class Reference

The X2Camera example. More...

#include <x2camera.h>

Inheritance diagram for X2Camera:
CameraDriverInterface ModalSettingsDialogInterface X2GUIEventInterface DriverRootInterface HardwareInfoInterface DriverInfoInterface

Public Member Functions

 X2Camera (const char *pszSelectionString, const int &nISIndex, SerXInterface *pSerX, TheSkyXFacadeForDriversInterface *pTheSkyXForMounts, SleeperInterface *pSleeper, BasicIniUtilInterface *pIniUtil, LoggerInterface *pLogger, MutexInterface *pIOMutex, TickCountInterface *pTickCount)
 
DriverRootInterface Implementation
virtual int queryAbstraction (const char *pszName, void **ppVal)
 
DriverInfoInterface Implementation
virtual void driverInfoDetailedInfo (BasicStringInterface &str) const
 
virtual double driverInfoVersion (void) const
 
HardwareInfoInterface Implementation
virtual void deviceInfoNameShort (BasicStringInterface &str) const
 
virtual void deviceInfoNameLong (BasicStringInterface &str) const
 
virtual void deviceInfoDetailedDescription (BasicStringInterface &str) const
 
virtual void deviceInfoFirmwareVersion (BasicStringInterface &str)
 
virtual void deviceInfoModel (BasicStringInterface &str)
 
CameraDriverInterface Implementation
virtual enumCameraIndex cameraId ()
 
virtual void setCameraId (enumCameraIndex Cam)
 
virtual bool isLinked ()
 
virtual void setLinked (const bool bYes)
 
virtual int GetVersion (void)
 
virtual CameraDriverInterface::ReadOutMode readoutMode (void)
 
virtual int pathTo_rm_FitsOnDisk (char *lpszPath, const int &nPathSize)
 
virtual int CCSettings (const enumCameraIndex &Camera, const enumWhichCCD &CCD)
 
virtual int CCEstablishLink (enumLPTPort portLPT, const enumWhichCCD &CCD, enumCameraIndex DesiredCamera, enumCameraIndex &CameraFound, const int nDesiredCFW, int &nFoundCFW)
 
virtual int CCDisconnect (const bool bShutDownTemp)
 
virtual int CCGetChipSize (const enumCameraIndex &Camera, const enumWhichCCD &CCD, const int &nXBin, const int &nYBin, const bool &bOffChipBinning, int &nW, int &nH, int &nReadOut)
 
virtual int CCGetNumBins (const enumCameraIndex &Camera, const enumWhichCCD &CCD, int &nNumBins)
 
virtual int CCGetBinSizeFromIndex (const enumCameraIndex &Camera, const enumWhichCCD &CCD, const int &nIndex, long &nBincx, long &nBincy)
 
virtual int CCSetBinnedSubFrame (const enumCameraIndex &Camera, const enumWhichCCD &CCD, const int &nLeft, const int &nTop, const int &nRight, const int &nBottom)
 
virtual void CCMakeExposureState (int *pnState, enumCameraIndex Cam, int nXBin, int nYBin, int abg, bool bRapidReadout)
 
virtual int CCStartExposure (const enumCameraIndex &Cam, const enumWhichCCD CCD, const double &dTime, enumPictureType Type, const int &nABGState, const bool &bLeaveShutterAlone)
 
virtual int CCIsExposureComplete (const enumCameraIndex &Cam, const enumWhichCCD CCD, bool *pbComplete, unsigned int *pStatus)
 
virtual int CCEndExposure (const enumCameraIndex &Cam, const enumWhichCCD CCD, const bool &bWasAborted, const bool &bLeaveShutterAlone)
 
virtual int CCReadoutLine (const enumCameraIndex &Cam, const enumWhichCCD &CCD, const int &pixelStart, const int &pixelLength, const int &nReadoutMode, unsigned char *pMem)
 
virtual int CCDumpLines (const enumCameraIndex &Cam, const enumWhichCCD &CCD, const int &nReadoutMode, const unsigned int &lines)
 
virtual int CCReadoutImage (const enumCameraIndex &Cam, const enumWhichCCD &CCD, const int &nWidth, const int &nHeight, const int &nMemWidth, unsigned char *pMem)
 
virtual int CCRegulateTemp (const bool &bOn, const double &dTemp)
 
virtual int CCQueryTemperature (double &dCurTemp, double &dCurPower, char *lpszPower, const int nMaxLen, bool &bCurEnabled, double &dCurSetPoint)
 
virtual int CCGetRecommendedSetpoint (double &dRecSP)
 
virtual int CCSetFan (const bool &bOn)
 
virtual int CCActivateRelays (const int &nXPlus, const int &nXMinus, const int &nYPlus, const int &nYMinus, const bool &bSynchronous, const bool &bAbort, const bool &bEndThread)
 
virtual int CCPulseOut (unsigned int nPulse, bool bAdjust, const enumCameraIndex &Cam)
 
virtual int CCSetShutter (bool bOpen)
 
virtual int CCUpdateClock (void)
 
virtual int CCSetImageProps (const enumCameraIndex &Camera, const enumWhichCCD &CCD, const int &nReadOut, void *pImage)
 
virtual int CCGetFullDynamicRange (const enumCameraIndex &Camera, const enumWhichCCD &CCD, unsigned long &dwDynRg)
 
virtual void CCBeforeDownload (const enumCameraIndex &Cam, const enumWhichCCD &CCD)
 
virtual void CCAfterDownload (const enumCameraIndex &Cam, const enumWhichCCD &CCD)
 
ModalSettingsDialogInterface Implementation
virtual int initModalSettingsDialog (void)
 
virtual int execModalSettingsDialog (void)
 
- Public Member Functions inherited from CameraDriverInterface
virtual DeviceType deviceType (void)
 
virtual int cameraDriverInterfaceVersion (void)
 

X2GUIEventInterface Implementation

See X2GUIEventInterface.

virtual void uiEvent (X2GUIExchangeInterface *uiex, const char *pszEvent)
 

Additional Inherited Members

- Public Types inherited from CameraDriverInterface
enum  ReadOutMode { rm_Line = 0, rm_Image = 1, rm_FitsOnDisk = 2 }
 
- Public Types inherited from DriverRootInterface
enum  DeviceType {
  DT_UNKNOWN = 0, DT_MOUNT = 1, DT_FOCUSER = 2, DT_CAMERA = 3,
  DT_FILTERWHEEL = 4, DT_DOME = 5, DT_ROTATOR = 6, DT_WEATHER = 7,
  DT_GPSTFP = 8, DT_VIDEO = 9, DT_OTA =10, DT_AO =11,
  DT_POWERCONTROL =12, DT_PRIVATE_A =13
}
 
- Protected Attributes inherited from CameraDriverInterface
bool m_bLinked
 
enumCameraIndex m_Camera
 

Detailed Description

The X2Camera example.

Use this example to write an X2Camera driver.

Constructor & Destructor Documentation

◆ X2Camera()

X2Camera::X2Camera ( const char *  pszSelectionString,
const int &  nISIndex,
SerXInterface pSerX,
TheSkyXFacadeForDriversInterface pTheSkyXForMounts,
SleeperInterface pSleeper,
BasicIniUtilInterface pIniUtil,
LoggerInterface pLogger,
MutexInterface pIOMutex,
TickCountInterface pTickCount 
)

Standard X2 constructor

Member Function Documentation

◆ cameraId()

enumCameraIndex X2Camera::cameraId ( )
virtual

Software Bisque only.

Reimplemented from CameraDriverInterface.

◆ CCActivateRelays()

int X2Camera::CCActivateRelays ( const int &  nXPlus,
const int &  nXMinus,
const int &  nYPlus,
const int &  nYMinus,
const bool &  bSynchronous,
const bool &  bAbort,
const bool &  bEndThread 
)
virtual

Turn on a camera relay or relays, in 1/100's of a second. Called when autoguiding.

Implements CameraDriverInterface.

◆ CCAfterDownload()

void X2Camera::CCAfterDownload ( const enumCameraIndex &  Cam,
const enumWhichCCD &  CCD 
)
virtual

Called after download.

Implements CameraDriverInterface.

◆ CCBeforeDownload()

void X2Camera::CCBeforeDownload ( const enumCameraIndex &  Cam,
const enumWhichCCD &  CCD 
)
virtual

Called before download.

Implements CameraDriverInterface.

◆ CCDisconnect()

int X2Camera::CCDisconnect ( const bool  bShutDownTemp)
virtual

Disconnect from the camera.

Implements CameraDriverInterface.

◆ CCDumpLines()

int X2Camera::CCDumpLines ( const enumCameraIndex &  Cam,
const enumWhichCCD &  CCD,
const int &  nReadoutMode,
const unsigned int &  lines 
)
virtual

Dump n lines to speed up download when a subframe is present.

Implements CameraDriverInterface.

◆ CCEndExposure()

int X2Camera::CCEndExposure ( const enumCameraIndex &  Cam,
const enumWhichCCD  CCD,
const bool &  bWasAborted,
const bool &  bLeaveShutterAlone 
)
virtual

Called once the exposure is complete. Allows software implementation of downloading since for every CCStartExposure there is a corresponding CCEndExposure.

Implements CameraDriverInterface.

◆ CCEstablishLink()

int X2Camera::CCEstablishLink ( enumLPTPort  portLPT,
const enumWhichCCD &  CCD,
enumCameraIndex  DesiredCamera,
enumCameraIndex &  CameraFound,
const int  nDesiredCFW,
int &  nFoundCFW 
)
virtual

Connect or establish a link to the camera.

Implements CameraDriverInterface.

◆ CCGetBinSizeFromIndex()

int X2Camera::CCGetBinSizeFromIndex ( const enumCameraIndex &  Camera,
const enumWhichCCD &  CCD,
const int &  nIndex,
long &  nBincx,
long &  nBincy 
)
virtual

Return the size x and y bin size for each bin mode this camera supports.

Implements CameraDriverInterface.

◆ CCGetChipSize()

int X2Camera::CCGetChipSize ( const enumCameraIndex &  Camera,
const enumWhichCCD &  CCD,
const int &  nXBin,
const int &  nYBin,
const bool &  bOffChipBinning,
int &  nW,
int &  nH,
int &  nReadOut 
)
virtual

Return the physical size of the camera's detector.

Implements CameraDriverInterface.

◆ CCGetFullDynamicRange()

int X2Camera::CCGetFullDynamicRange ( const enumCameraIndex &  Camera,
const enumWhichCCD &  CCD,
unsigned long &  dwDynRg 
)
virtual

Return the camera's full dynamic range, required for @Focus and @Focus2 to work.

Implements CameraDriverInterface.

◆ CCGetNumBins()

int X2Camera::CCGetNumBins ( const enumCameraIndex &  Camera,
const enumWhichCCD &  CCD,
int &  nNumBins 
)
virtual

Return the number of bin modes this camera supports.

Implements CameraDriverInterface.

◆ CCGetRecommendedSetpoint()

int X2Camera::CCGetRecommendedSetpoint ( double &  dRecSP)
virtual

When possible, return a recommended temperature setpoint.

Parameters
dRecSPThe recommended temperature setpoint or set to 100 if unable to recommend one.

Implements CameraDriverInterface.

◆ CCIsExposureComplete()

int X2Camera::CCIsExposureComplete ( const enumCameraIndex &  Cam,
const enumWhichCCD  CCD,
bool *  pbComplete,
unsigned int *  pStatus 
)
virtual

Called to know if the exposure is complete.

Parameters
pbCompleteSet to true if the exposure is complete, otherwise set to false.
pStatusis SBIG specific and can be ignored.

Implements CameraDriverInterface.

◆ CCMakeExposureState()

void X2Camera::CCMakeExposureState ( int *  pnState,
enumCameraIndex  Cam,
int  nXBin,
int  nYBin,
int  abg,
bool  bRapidReadout 
)
virtual

SBIG specific.

Implements CameraDriverInterface.

◆ CCPulseOut()

int X2Camera::CCPulseOut ( unsigned int  nPulse,
bool  bAdjust,
const enumCameraIndex &  Cam 
)
virtual

SBIG specific for controlling internal filter wheels.

Implements CameraDriverInterface.

◆ CCQueryTemperature()

int X2Camera::CCQueryTemperature ( double &  dCurTemp,
double &  dCurPower,
char *  lpszPower,
const int  nMaxLen,
bool &  bCurEnabled,
double &  dCurSetPoint 
)
virtual

Return the temperature and corresponding status. Because camera hardware varies widely with respect to temperature control, this method is intended to accomodate a wide range of levels of support, from the most basic, where only temperature regulation can be enabled/disabled to the most advanced that includes regulation enabled/disabled, percent power, a discriptive string assocaited with power, and setpoint or any combination.

Parameters
dCurTempReturn the current temperature or -100 if not supported.
dCurPowerReturn the power applied to the TE cooler or -100 if not supported.
lpszPowerReturn a string associated the power applied to the TE cooler or NULL if not supported. Example strings might be "Off", "Cooling To Setpoint", "Correcting", "Raising to Ambient", "Ambient", "Max", "Min", "OK (At Setpoint)"
nMaxLenThe maximum size the lpszPower string can be.
bCurEnabledReturn 1 if temperature is being regulated or 0 if not.
dCurSetPointReturn the current temperature setpoint or -100 if not supported.

Implements CameraDriverInterface.

◆ CCReadoutImage()

int X2Camera::CCReadoutImage ( const enumCameraIndex &  Cam,
const enumWhichCCD &  CCD,
const int &  nWidth,
const int &  nHeight,
const int &  nMemWidth,
unsigned char *  pMem 
)
virtual

Return the image. /sa readoutMode().

Implements CameraDriverInterface.

◆ CCReadoutLine()

int X2Camera::CCReadoutLine ( const enumCameraIndex &  Cam,
const enumWhichCCD &  CCD,
const int &  pixelStart,
const int &  pixelLength,
const int &  nReadoutMode,
unsigned char *  pMem 
)
virtual

Return one line of the image. /sa readoutMode().

Implements CameraDriverInterface.

◆ CCRegulateTemp()

int X2Camera::CCRegulateTemp ( const bool &  bOn,
const double &  dTemp 
)
virtual

Turn off or on temperature regulation.

Implements CameraDriverInterface.

◆ CCSetBinnedSubFrame()

int X2Camera::CCSetBinnedSubFrame ( const enumCameraIndex &  Camera,
const enumWhichCCD &  CCD,
const int &  nLeft,
const int &  nTop,
const int &  nRight,
const int &  nBottom 
)
virtual

Set the size of subframe in binned pixels.

Implements CameraDriverInterface.

◆ CCSetFan()

int X2Camera::CCSetFan ( const bool &  bOn)
virtual

Turn the fan of off.

Implements CameraDriverInterface.

◆ CCSetImageProps()

int X2Camera::CCSetImageProps ( const enumCameraIndex &  Camera,
const enumWhichCCD &  CCD,
const int &  nReadOut,
void *  pImage 
)
virtual

Software Bisque only.

Implements CameraDriverInterface.

◆ CCSetShutter()

int X2Camera::CCSetShutter ( bool  bOpen)
virtual

Manually control the shutter. This method is only called in very specialized circumstances with specific hardware and or customized software and not called in general. You may implement this if the camera hardware is capable of successfully opening and closing the shutter outside or within the context of an exposure.

Implements CameraDriverInterface.

◆ CCSettings()

int X2Camera::CCSettings ( const enumCameraIndex &  Camera,
const enumWhichCCD &  CCD 
)
virtual

Display a device dependent settings dialog if necessary.

Implements CameraDriverInterface.

◆ CCStartExposure()

int X2Camera::CCStartExposure ( const enumCameraIndex &  Cam,
const enumWhichCCD  CCD,
const double &  dTime,
enumPictureType  Type,
const int &  nABGState,
const bool &  bLeaveShutterAlone 
)
virtual

Start the exposure.

Implements CameraDriverInterface.

◆ CCUpdateClock()

int X2Camera::CCUpdateClock ( void  )
virtual

Deprecated. Called after download to resynchronize the PC clock to the real-time clock.

Implements CameraDriverInterface.

◆ deviceInfoDetailedDescription()

void X2Camera::deviceInfoDetailedDescription ( BasicStringInterface str) const
virtual

Return a detailed device description.

Implements CameraDriverInterface.

◆ deviceInfoFirmwareVersion()

void X2Camera::deviceInfoFirmwareVersion ( BasicStringInterface str)
virtual

Return the firmware version, if available.

Implements CameraDriverInterface.

◆ deviceInfoModel()

void X2Camera::deviceInfoModel ( BasicStringInterface str)
virtual

Return the device model name.

Implements CameraDriverInterface.

◆ deviceInfoNameLong()

void X2Camera::deviceInfoNameLong ( BasicStringInterface str) const
virtual

Return a detailed device name.

Implements CameraDriverInterface.

◆ deviceInfoNameShort()

void X2Camera::deviceInfoNameShort ( BasicStringInterface str) const
virtual

Return a short device name.

Implements CameraDriverInterface.

◆ driverInfoDetailedInfo()

void X2Camera::driverInfoDetailedInfo ( BasicStringInterface str) const
virtual

Return detailed information about the driver.

Implements CameraDriverInterface.

◆ driverInfoVersion()

double X2Camera::driverInfoVersion ( void  ) const
virtual

Return a version number.

Implements CameraDriverInterface.

◆ execModalSettingsDialog()

int X2Camera::execModalSettingsDialog ( void  )
virtual

Execute and display the modal settings dialog.

Implements ModalSettingsDialogInterface.

◆ initModalSettingsDialog()

virtual int X2Camera::initModalSettingsDialog ( void  )
inlinevirtual

Initialize the modal settings dialog.

Implements ModalSettingsDialogInterface.

◆ isLinked()

virtual bool X2Camera::isLinked ( void  )
inlinevirtual

Return true if the camrea is connected (linked)

Reimplemented from CameraDriverInterface.

◆ pathTo_rm_FitsOnDisk()

int X2Camera::pathTo_rm_FitsOnDisk ( char *  lpszPath,
const int &  nPathMaxSize 
)
virtual

This is called to return the path to the corresponding FITS file, only when readoutMode() returns rm_FitsOnDisk.

See also
readoutMode().

Reimplemented from CameraDriverInterface.

◆ queryAbstraction()

int X2Camera::queryAbstraction ( const char *  pszName,
void **  ppVal 
)
virtual

Return a pointer to well defined interface.

Implements CameraDriverInterface.

◆ readoutMode()

CameraDriverInterface::ReadOutMode X2Camera::readoutMode ( void  )
virtual

Return how this camera reads out the image.

Reimplemented from CameraDriverInterface.

◆ setCameraId()

void X2Camera::setCameraId ( enumCameraIndex  Cam)
virtual

Software Bisque only.

Reimplemented from CameraDriverInterface.

◆ setLinked()

virtual void X2Camera::setLinked ( const bool  bYes)
inlinevirtual

Software Bisque only.

Reimplemented from CameraDriverInterface.

◆ uiEvent()

void X2Camera::uiEvent ( X2GUIExchangeInterface uiex,
const char *  pszEvent 
)
virtual

Take what ever action is necessary when a user interface event happens, for example, the user pressed a button.

Parameters
pszEventThe name of the event that occured following the convention "on_<object name>_<signal name>".

Implements X2GUIEventInterface.


The documentation for this class was generated from the following files:
X2 Examples
(C) Software Bisque, Inc. All rights reserved.