Instrument Neutral Distributed Interface INDI  1.6.0
Public Types | Public Member Functions | Friends | List of all members
INDI::CCDChip Class Reference

The CCDChip class provides functionality of a CCD Chip within a CCD. More...

#include <indiccd.h>

Public Types

Public Member Functions

 CCDChip ()
 
 ~CCDChip ()
 
int getXRes ()
 getXRes Get the horizontal resolution in pixels of the CCD Chip. More...
 
int getYRes ()
 Get the vertical resolution in pixels of the CCD Chip. More...
 
int getSubX ()
 getSubX Get the starting left coordinates (X) of the frame. More...
 
int getSubY ()
 getSubY Get the starting top coordinates (Y) of the frame. More...
 
int getSubW ()
 getSubW Get the width of the frame More...
 
int getSubH ()
 getSubH Get the height of the frame More...
 
int getBinX ()
 getBinX Get horizontal binning of the CCD chip. More...
 
int getBinY ()
 getBinY Get vertical binning of the CCD chip. More...
 
float getPixelSizeX ()
 getPixelSizeX Get horizontal pixel size in microns. More...
 
float getPixelSizeY ()
 getPixelSizeY Get vertical pixel size in microns. More...
 
int getBPP ()
 getBPP Get CCD Chip depth (bits per pixel). More...
 
int getFrameBufferSize ()
 getFrameBufferSize Get allocated frame buffer size to hold the CCD image frame. More...
 
double getExposureLeft ()
 getExposureLeft Get exposure time left in seconds. More...
 
double getExposureDuration ()
 getExposureDuration Get requested exposure duration for the CCD chip in seconds. More...
 
const char * getExposureStartTime ()
 getExposureStartTime More...
 
uint8_t * getFrameBuffer ()
 getFrameBuffer Get raw frame buffer of the CCD chip. More...
 
void setFrameBuffer (uint8_t *buffer)
 setFrameBuffer Set raw frame buffer pointer. More...
 
bool isCompressed ()
 isCompressed More...
 
bool isInterlaced ()
 isInterlaced More...
 
CCD_FRAME getFrameType ()
 getFrameType More...
 
const char * getFrameTypeName (CCD_FRAME fType)
 getFrameTypeName returns CCD Frame type name More...
 
INumberVectorPropertygetCCDInfo ()
 Return CCD Info Property. More...
 
void setResolution (int x, int y)
 setResolution set CCD Chip resolution More...
 
void setFrame (int subx, int suby, int subw, int subh)
 setFrame Set desired frame resolutoin for an exposure. More...
 
void setBin (int hor, int ver)
 setBin Set CCD Chip binnig More...
 
void setMinMaxStep (const char *property, const char *element, double min, double max, double step, bool sendToClient=true)
 setMinMaxStep for a number property element More...
 
void setPixelSize (float x, float y)
 setPixelSize Set CCD Chip pixel size More...
 
void setCompressed (bool cmp)
 setCompressed Set whether a frame is compressed after exposure? More...
 
void setInterlaced (bool intr)
 setInterlaced Set whether the CCD chip is interlaced or not? More...
 
void setFrameBufferSize (int nbuf, bool allocMem=true)
 setFrameBufferSize Set desired frame buffer size. The function will allocate memory accordingly. The frame size depends on the desired frame resolution (Left, Top, Width, Height), depth of the CCD chip (bpp), and binning settings. You must set the frame size any time any of the prior parameters gets updated. More...
 
void setBPP (int bpp)
 setBPP Set depth of CCD chip. More...
 
void setFrameType (CCD_FRAME type)
 setFrameType Set desired frame type for next exposure. More...
 
void setExposureDuration (double duration)
 setExposureDuration Set desired CCD frame exposure duration for next exposure. You must call this function immediately before starting the actual exposure as it is used to calculate the timestamp used for the FITS header. More...
 
void setExposureLeft (double duration)
 setExposureLeft Update exposure time left. Inform the client of the new exposure time left value. More...
 
void setExposureFailed ()
 setExposureFailed Alert the client that the exposure failed. More...
 
int getNAxis () const
 
void setNAxis (int value)
 setNAxis Set FITS number of axis More...
 
void setImageExtension (const char *ext)
 setImageExtension Set image exntension More...
 
char * getImageExtension ()
 
bool isExposing ()
 
void binFrame ()
 binFrame Perform softwre binning on the CCD frame. Only use this function if hardware binning is not supported. More...
 

Friends

class CCD
 
class StreamRecoder
 

Detailed Description

The CCDChip class provides functionality of a CCD Chip within a CCD.

Definition at line 51 of file indiccd.h.

Member Enumeration Documentation

Enumerator
BIN_W 
BIN_H 

Definition at line 59 of file indiccd.h.

Enumerator
LIGHT_FRAME 
BIAS_FRAME 
DARK_FRAME 
FLAT_FRAME 

Definition at line 57 of file indiccd.h.

Enumerator
FRAME_X 
FRAME_Y 
FRAME_W 
FRAME_H 

Definition at line 58 of file indiccd.h.

Enumerator
CCD_MAX_X 
CCD_MAX_Y 
CCD_PIXEL_SIZE 
CCD_PIXEL_SIZE_X 
CCD_PIXEL_SIZE_Y 
CCD_BITSPERPIXEL 

Definition at line 60 of file indiccd.h.

Constructor & Destructor Documentation

INDI::CCDChip::CCDChip ( )

Definition at line 83 of file indiccd.cpp.

INDI::CCDChip::~CCDChip ( )

Definition at line 102 of file indiccd.cpp.

Member Function Documentation

void INDI::CCDChip::binFrame ( )

binFrame Perform softwre binning on the CCD frame. Only use this function if hardware binning is not supported.

Definition at line 289 of file indiccd.cpp.

int INDI::CCDChip::getBinX ( )
inline

getBinX Get horizontal binning of the CCD chip.

Returns
horizontal binning of the CCD chip.
Examples:
simpleccd.cpp.

Definition at line 109 of file indiccd.h.

int INDI::CCDChip::getBinY ( )
inline

getBinY Get vertical binning of the CCD chip.

Returns
vertical binning of the CCD chip.
Examples:
simpleccd.cpp.

Definition at line 115 of file indiccd.h.

int INDI::CCDChip::getBPP ( )
inline

getBPP Get CCD Chip depth (bits per pixel).

Returns
bits per pixel.
Examples:
simpleccd.cpp.

Definition at line 133 of file indiccd.h.

INumberVectorProperty* INDI::CCDChip::getCCDInfo ( )
inline

Return CCD Info Property.

Definition at line 203 of file indiccd.h.

double INDI::CCDChip::getExposureDuration ( )
inline

getExposureDuration Get requested exposure duration for the CCD chip in seconds.

Returns
requested exposure duration for the CCD chip in seconds.

Definition at line 151 of file indiccd.h.

double INDI::CCDChip::getExposureLeft ( )
inline

getExposureLeft Get exposure time left in seconds.

Returns
exposure time left in seconds.

Definition at line 145 of file indiccd.h.

const char * INDI::CCDChip::getExposureStartTime ( )

getExposureStartTime

Returns
exposure start time in ISO 8601 format.

Definition at line 248 of file indiccd.cpp.

uint8_t* INDI::CCDChip::getFrameBuffer ( )
inline

getFrameBuffer Get raw frame buffer of the CCD chip.

Returns
raw frame buffer of the CCD chip.
Examples:
simpleccd.cpp.

Definition at line 163 of file indiccd.h.

int INDI::CCDChip::getFrameBufferSize ( )
inline

getFrameBufferSize Get allocated frame buffer size to hold the CCD image frame.

Returns
allocated frame buffer size to hold the CCD image frame.

Definition at line 139 of file indiccd.h.

CCD_FRAME INDI::CCDChip::getFrameType ( )
inline

getFrameType

Returns
CCD Frame type

Definition at line 191 of file indiccd.h.

const char * INDI::CCDChip::getFrameTypeName ( CCD_FRAME  fType)

getFrameTypeName returns CCD Frame type name

Parameters
fTypetype of frame
Returns
CCD Frame type name

Definition at line 243 of file indiccd.cpp.

char* INDI::CCDChip::getImageExtension ( )
inline
Returns
Return image extension (fits, jpeg, raw..etc)

Definition at line 322 of file indiccd.h.

int INDI::CCDChip::getNAxis ( ) const
Returns
Get number of FITS axis in image. By default 2

Definition at line 274 of file indiccd.cpp.

float INDI::CCDChip::getPixelSizeX ( )
inline

getPixelSizeX Get horizontal pixel size in microns.

Returns
horizontal pixel size in microns.

Definition at line 121 of file indiccd.h.

float INDI::CCDChip::getPixelSizeY ( )
inline

getPixelSizeY Get vertical pixel size in microns.

Returns
vertical pixel size in microns.

Definition at line 127 of file indiccd.h.

int INDI::CCDChip::getSubH ( )
inline

getSubH Get the height of the frame

Returns
unbinned height of the frame
Examples:
simpleccd.cpp.

Definition at line 103 of file indiccd.h.

int INDI::CCDChip::getSubW ( )
inline

getSubW Get the width of the frame

Returns
unbinned width of the frame
Examples:
simpleccd.cpp.

Definition at line 97 of file indiccd.h.

int INDI::CCDChip::getSubX ( )
inline

getSubX Get the starting left coordinates (X) of the frame.

Returns
the starting left coordinates (X) of the image.

Definition at line 85 of file indiccd.h.

int INDI::CCDChip::getSubY ( )
inline

getSubY Get the starting top coordinates (Y) of the frame.

Returns
the starting top coordinates (Y) of the image.

Definition at line 91 of file indiccd.h.

int INDI::CCDChip::getXRes ( )
inline

getXRes Get the horizontal resolution in pixels of the CCD Chip.

Returns
the horizontal resolution of the CCD Chip.
Examples:
simpleccd.cpp.

Definition at line 73 of file indiccd.h.

int INDI::CCDChip::getYRes ( )
inline

Get the vertical resolution in pixels of the CCD Chip.

Returns
the horizontal resolution of the CCD Chip.
Examples:
simpleccd.cpp.

Definition at line 79 of file indiccd.h.

bool INDI::CCDChip::isCompressed ( )
inline

isCompressed

Returns
True if frame is compressed, false otherwise.

Definition at line 179 of file indiccd.h.

bool INDI::CCDChip::isExposing ( )
inline
Returns
True if CCD is currently exposing, false otherwise.

Definition at line 327 of file indiccd.h.

bool INDI::CCDChip::isInterlaced ( )
inline

isInterlaced

Returns
True if CCD chip is Interlaced, false otherwise.

Definition at line 185 of file indiccd.h.

void INDI::CCDChip::setBin ( int  hor,
int  ver 
)

setBin Set CCD Chip binnig

Parameters
horHorizontal binning.
verVertical binning.

Definition at line 150 of file indiccd.cpp.

void INDI::CCDChip::setBPP ( int  bpp)

setBPP Set depth of CCD chip.

Parameters
bppbits per pixel

Definition at line 201 of file indiccd.cpp.

void INDI::CCDChip::setCompressed ( bool  cmp)

setCompressed Set whether a frame is compressed after exposure?

Parameters
cmpIf true, compress frame.
void INDI::CCDChip::setExposureDuration ( double  duration)

setExposureDuration Set desired CCD frame exposure duration for next exposure. You must call this function immediately before starting the actual exposure as it is used to calculate the timestamp used for the FITS header.

Parameters
durationexposure duration in seconds.
Examples:
simpleccd.cpp.

Definition at line 237 of file indiccd.cpp.

void INDI::CCDChip::setExposureFailed ( )

setExposureFailed Alert the client that the exposure failed.

Definition at line 268 of file indiccd.cpp.

void INDI::CCDChip::setExposureLeft ( double  duration)

setExposureLeft Update exposure time left. Inform the client of the new exposure time left value.

Parameters
durationexposure duration left in seconds.
Examples:
simpleccd.cpp.

Definition at line 230 of file indiccd.cpp.

void INDI::CCDChip::setFrame ( int  subx,
int  suby,
int  subw,
int  subh 
)

setFrame Set desired frame resolutoin for an exposure.

Parameters
subxLeft position.
subyTop position.
subwunbinned width of the frame.
subhunbinned height of the frame.

Definition at line 135 of file indiccd.cpp.

void INDI::CCDChip::setFrameBuffer ( uint8_t *  buffer)
inline

setFrameBuffer Set raw frame buffer pointer.

Parameters
bufferpointer to frame buffer /note CCD Chip allocates the frame buffer internally once SetFrameBufferSize is called with allocMem set to true which is the default behavior. If you allocated the memory yourself (i.e. allocMem is false), then you must call this function to set the pointer to the raw frame buffer.

Definition at line 173 of file indiccd.h.

void INDI::CCDChip::setFrameBufferSize ( int  nbuf,
bool  allocMem = true 
)

setFrameBufferSize Set desired frame buffer size. The function will allocate memory accordingly. The frame size depends on the desired frame resolution (Left, Top, Width, Height), depth of the CCD chip (bpp), and binning settings. You must set the frame size any time any of the prior parameters gets updated.

Parameters
nbufsize of buffer in bytes.
allocMemif True, it will allocate memory of nbut size bytes.
Examples:
simpleccd.cpp.

Definition at line 210 of file indiccd.cpp.

void INDI::CCDChip::setFrameType ( CCD_FRAME  type)

setFrameType Set desired frame type for next exposure.

Parameters
typedesired CCD frame type.

Definition at line 108 of file indiccd.cpp.

void INDI::CCDChip::setImageExtension ( const char *  ext)

setImageExtension Set image exntension

Parameters
extextension (fits, jpeg, raw..etc)

Definition at line 284 of file indiccd.cpp.

void INDI::CCDChip::setInterlaced ( bool  intr)

setInterlaced Set whether the CCD chip is interlaced or not?

Parameters
intrIf true, the CCD chip is interlaced.

Definition at line 263 of file indiccd.cpp.

void INDI::CCDChip::setMinMaxStep ( const char *  property,
const char *  element,
double  min,
double  max,
double  step,
bool  sendToClient = true 
)

setMinMaxStep for a number property element

Parameters
propertyProperty name
elementElement name
minMinimum element value
maxMaximum element value
stepElement step value
sendToClientIf true (default), the element limits are updated and is sent to the client. If false, the element limits are updated without getting sent to the client.

Definition at line 161 of file indiccd.cpp.

void INDI::CCDChip::setNAxis ( int  value)

setNAxis Set FITS number of axis

Parameters
valuenumber of axis

Definition at line 279 of file indiccd.cpp.

void INDI::CCDChip::setPixelSize ( float  x,
float  y 
)

setPixelSize Set CCD Chip pixel size

Parameters
xHorziontal pixel size in microns.
yVertical pixel size in microns.

Definition at line 189 of file indiccd.cpp.

void INDI::CCDChip::setResolution ( int  x,
int  y 
)

setResolution set CCD Chip resolution

Parameters
xwidth
yheight

Definition at line 113 of file indiccd.cpp.

Friends And Related Function Documentation

friend class CCD
friend

Definition at line 408 of file indiccd.h.

friend class StreamRecoder
friend

Definition at line 409 of file indiccd.h.


The documentation for this class was generated from the following files: