Instrument Neutral Distributed Interface INDI  1.5.0
Public Types | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
INDI::CCD Class Reference

Class to provide general functionality of CCD cameras with a single CCD sensor, or a primary CCD sensor in addition to a secondary CCD guide head. More...

#include <indiccd.h>

Inheritance diagram for INDI::CCD:
INDI::DefaultDevice INDI::GuiderInterface INDI::BaseDevice CCDSim SimpleCCD V4L2_Driver

Public Types

- Public Types inherited from INDI::BaseDevice

Public Member Functions

 CCD ()
 
virtual ~CCD ()
 
virtual bool initProperties ()
 Initilize properties initial state and value. The child class must implement this function. More...
 
virtual bool updateProperties ()
 updateProperties is called whenever there is a change in the CONNECTION status of the driver. This will enable the driver to react to changes of switching ON/OFF a device. For example, a driver may only define a set of properties after a device is connected, but not before. More...
 
virtual void ISGetProperties (const char *dev)
 define the driver's properties to the client. Usually, only a minimum set of properties are defined to the client in this function if the device is in disconnected state. Those properties should be enough to enable the client to establish a connection to the device. In addition to CONNECT/DISCONNECT, such properties may include port name, IP address, etc. You should check if the device is already connected, and if this is true, then you must define the remainder of the the properties to the client in this function. Otherwise, the remainder of the driver's properties are defined to the client in updateProperties() function which is called when a client connects/disconnects from a device. More...
 
virtual bool ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n)
 Process the client newNumber command. More...
 
virtual bool ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
 Process the client newSwitch command. More...
 
virtual bool ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n)
 Process the client newSwitch command. More...
 
virtual bool ISSnoopDevice (XMLEle *root)
 Process a snoop event from INDI server. This function is called when a snooped property is updated in a snooped driver. More...
 
- Public Member Functions inherited from INDI::DefaultDevice
 DefaultDevice ()
 
virtual ~DefaultDevice ()
 
void addAuxControls ()
 Add Debug, Simulation, and Configuration options to the driver. More...
 
void addDebugControl ()
 Add Debug control to the driver. More...
 
void addSimulationControl ()
 Add Simulation control to the driver. More...
 
void addConfigurationControl ()
 Add Configuration control to the driver. More...
 
void resetProperties ()
 Set all properties to IDLE state. More...
 
void defineNumber (INumberVectorProperty *nvp)
 Define number vector to client & register it. Alternatively, IDDefNumber can be used but the property will not get registered and the driver will not be able to save configuration files. More...
 
void defineText (ITextVectorProperty *tvp)
 Define text vector to client & register it. Alternatively, IDDefText can be used but the property will not get registered and the driver will not be able to save configuration files. More...
 
void defineSwitch (ISwitchVectorProperty *svp)
 Define switch vector to client & register it. Alternatively, IDDefswitch can be used but the property will not get registered and the driver will not be able to save configuration files. More...
 
void defineLight (ILightVectorProperty *lvp)
 Define light vector to client & register it. Alternatively, IDDeflight can be used but the property will not get registered and the driver will not be able to save configuration files. More...
 
void defineBLOB (IBLOBVectorProperty *bvp)
 Define BLOB vector to client & register it. Alternatively, IDDefBLOB can be used but the property will not get registered and the driver will not be able to save configuration files. More...
 
virtual bool deleteProperty (const char *propertyName)
 Delete a property and unregister it. It will also be deleted from all clients. More...
 
virtual void setConnected (bool status, IPState state=IPS_OK, const char *msg=nullptr)
 Set connection switch status in the client. More...
 
int SetTimer (int ms)
 Set a timer to call the function TimerHit after ms milliseconds. More...
 
void RemoveTimer (int id)
 Remove timer added with SetTimer. More...
 
virtual void TimerHit ()
 Callback function to be called once SetTimer duration elapses. More...
 
virtual const char * getDriverExec ()
 
virtual const char * getDriverName ()
 
void setVersion (uint16_t vMajor, uint16_t vMinor)
 Set driver version information to be defined in DRIVER_INFO property as vMajor.vMinor. More...
 
uint16_t getMajorVersion ()
 
uint16_t getMinorVersion ()
 
virtual bool ISNewBLOB (const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n)
 Process the client newBLOB command. More...
 
virtual uint16_t getDriverInterface ()
 
void setDriverInterface (uint16_t value)
 setInterface Set driver interface. By default the driver interface is set to GENERAL_DEVICE. You may send an ORed list of DeviceInterface values. More...
 
- Public Member Functions inherited from INDI::BaseDevice
 BaseDevice ()
 
virtual ~BaseDevice ()
 
INumberVectorPropertygetNumber (const char *name)
 
ITextVectorPropertygetText (const char *name)
 
ISwitchVectorPropertygetSwitch (const char *name)
 
ILightVectorPropertygetLight (const char *name)
 
IBLOBVectorPropertygetBLOB (const char *name)
 
IPState getPropertyState (const char *name)
 
IPerm getPropertyPermission (const char *name)
 
void registerProperty (void *p, INDI_PROPERTY_TYPE type)
 
int removeProperty (const char *name, char *errmsg)
 Remove a property. More...
 
void * getRawProperty (const char *name, INDI_PROPERTY_TYPE type=INDI_UNKNOWN)
 Return a property and its type given its name. More...
 
INDI::PropertygetProperty (const char *name, INDI_PROPERTY_TYPE type=INDI_UNKNOWN)
 Return a property and its type given its name. More...
 
std::vector< INDI::Property * > * getProperties ()
 Return a list of all properties in the device. More...
 
bool buildSkeleton (const char *filename)
 Build driver properties from a skeleton file. More...
 
bool isConnected ()
 
void setDeviceName (const char *dev)
 Set the device name. More...
 
const char * getDeviceName ()
 
void addMessage (const std::string &msg)
 Add message to the driver's message queue. More...
 
void checkMessage (XMLEle *root)
 
void doMessage (XMLEle *msg)
 
std::string messageQueue (int index) const
 
std::string lastMessage ()
 
void setMediator (INDI::BaseMediator *med)
 Set the driver's mediator to receive notification of news devices and updated property values. More...
 
INDI::BaseMediatorgetMediator ()
 
const char * getDriverName ()
 
const char * getDriverExec ()
 
const char * getDriverVersion ()
 

Public Attributes

enum INDI::CCD:: { ... }  CCDCapability
 

Protected Types

Protected Member Functions

uint32_t GetCCDCapability () const
 GetCCDCapability returns the CCD capabilities. More...
 
void SetCCDCapability (uint32_t cap)
 SetCCDCapability Set the CCD capabilities. Al fields must be initilized. More...
 
bool CanAbort ()
 
bool CanBin ()
 
bool CanSubFrame ()
 
bool HasGuideHead ()
 
bool HasShutter ()
 
bool HasST4Port ()
 
bool HasCooler ()
 
bool HasBayer ()
 
bool HasStreaming ()
 
virtual int SetTemperature (double temperature)
 Set CCD temperature. More...
 
virtual bool StartExposure (float duration)
 Start exposing primary CCD chip. More...
 
virtual bool ExposureComplete (CCDChip *targetChip)
 Uploads target Chip exposed buffer as FITS to the client. Dervied classes should class this function when an exposure is complete. More...
 
virtual bool AbortExposure ()
 Abort ongoing exposure. More...
 
virtual bool StartGuideExposure (float duration)
 Start exposing guide CCD chip. More...
 
virtual bool AbortGuideExposure ()
 Abort ongoing exposure. More...
 
virtual bool UpdateCCDFrame (int x, int y, int w, int h)
 INDI::CCD calls this function when CCD Frame dimension needs to be updated in the hardware. Derived classes should implement this function. More...
 
virtual bool UpdateGuiderFrame (int x, int y, int w, int h)
 INDI::CCD calls this function when Guide head frame dimension is updated by the client. Derived classes should implement this function. More...
 
virtual bool UpdateCCDBin (int hor, int ver)
 INDI::CCD calls this function when CCD Binning needs to be updated in the hardware. Derived classes should implement this function. More...
 
virtual bool UpdateGuiderBin (int hor, int ver)
 INDI::CCD calls this function when Guide head binning is updated by the client. Derived classes should implement this function. More...
 
virtual bool UpdateCCDFrameType (CCDChip::CCD_FRAME fType)
 INDI::CCD calls this function when CCD frame type needs to be updated in the hardware. More...
 
virtual bool UpdateCCDUploadMode (CCD_UPLOAD_MODE mode)
 INDI::CCD calls this function when client upload mode switch is updated. More...
 
virtual bool UpdateGuiderFrameType (CCDChip::CCD_FRAME fType)
 INDI::CCD calls this function when Guide frame type is updated by the client. More...
 
virtual void SetCCDParams (int x, int y, int bpp, float xf, float yf)
 Setup CCD paramters for primary CCD. Child classes call this function to update CCD parameters. More...
 
virtual void SetGuiderParams (int x, int y, int bpp, float xf, float yf)
 Setup CCD paramters for guide head CCD. Child classes call this function to update CCD parameters. More...
 
virtual IPState GuideNorth (float ms)
 Guide northward for ms milliseconds. More...
 
virtual IPState GuideSouth (float ms)
 Guide southward for ms milliseconds. More...
 
virtual IPState GuideEast (float ms)
 Guide easward for ms milliseconds. More...
 
virtual IPState GuideWest (float ms)
 Guide westward for ms milliseconds. More...
 
virtual bool StartStreaming ()
 StartStreaming Start live video streaming. More...
 
virtual bool StopStreaming ()
 StopStreaming Stop live video streaming. More...
 
virtual void addFITSKeywords (fitsfile *fptr, CCDChip *targetChip)
 Add FITS keywords to a fits file. More...
 
void fits_update_key_s (fitsfile *fptr, int type, std::string name, void *p, std::string explanation, int *status)
 
virtual void activeDevicesUpdated ()
 activeDevicesUpdated Inform children that ActiveDevices property was updated so they can snoop on the updated devices if desired. More...
 
virtual bool saveConfigItems (FILE *fp)
 saveConfigItems Save configuration items in XML file. More...
 
void GuideComplete (INDI_EQ_AXIS axis)
 Call GuideComplete once the guiding pulse is complete. More...
 
- Protected Member Functions inherited from INDI::DefaultDevice
void setDynamicPropertiesBehavior (bool defineEnabled, bool deleteEnabled)
 setDynamicPropertiesBehavior controls handling of dynamic properties. Dyanmic properties are those generated from an external skeleton XML file. By default all properties, including dynamic properties, are defined to the client in ISGetProperties(). Furthermore, when ┼▒deleteProperty(properyName) is called, the dynamic property is deleted by default, and can only be restored by calling buildSkeleton(filename) again. However, it is sometimes desirable to skip the definition of the dynamic properties on startup and delegate this task to the child class. To control this behavior, set enabled to false. More...
 
virtual bool loadConfig (bool silent=false, const char *property=nullptr)
 Load the last saved configuration file. More...
 
virtual bool saveConfig (bool silent=false, const char *property=nullptr)
 Save the current properties in a configuration file. More...
 
virtual bool saveAllConfigItems (FILE *fp)
 saveAllConfigItems Save all the drivers' properties in the configuration file More...
 
virtual bool loadDefaultConfig ()
 Load the default configuration file. More...
 
void setDebug (bool enable)
 Toggle driver debug status A driver can be more verbose if Debug option is enabled by the client. More...
 
void setSimulation (bool enable)
 Toggle driver simulation status A driver can run in simulation mode if Simulation option is enabled by the client. More...
 
virtual void debugTriggered (bool enable)
 Inform driver that the debug option was triggered. This function is called after setDebug is triggered by the client. Reimplement this function if your driver needs to take specific action after debug is enabled/disabled. Otherwise, you can use isDebug() to check if simulation is enabled or disabled. More...
 
virtual void simulationTriggered (bool enable)
 Inform driver that the simulation option was triggered. This function is called after setSimulation is triggered by the client. Reimplement this function if your driver needs to take specific action after simulation is enabled/disabled. Otherwise, you can use isSimulation() to check if simulation is enabled or disabled. More...
 
bool isDebug ()
 
bool isSimulation ()
 
virtual bool Connect ()
 Connect to the device. INDI::DefaultDevice implementation connects to appropriate connection interface (Serial or TCP) governed by connectionMode. If connection is successful, it proceed to call Handshake() function to ensure communication with device is successful. For other communication interface, override the method in the child class implementation. More...
 
virtual bool Disconnect ()
 Disconnect from device. More...
 
void registerConnection (Connection::Interface *newConnection)
 registerConnection Add new connection plugin to the existing connection pool. The connection type shall be defined to the client in ISGetProperties() More...
 
bool unRegisterConnection (Connection::Interface *existingConnection)
 unRegisterConnection Remove connection from existing pool More...
 
Connection::InterfacegetActiveConnection ()
 
virtual const char * getDefaultName ()=0
 
- Protected Member Functions inherited from INDI::BaseDevice
int buildProp (XMLEle *root, char *errmsg)
 Build a property given the supplied XML element (defXXX) More...
 
int setValue (XMLEle *root, char *errmsg)
 handle SetXXX commands from client More...
 
int setBLOB (IBLOBVectorProperty *pp, XMLEle *root, char *errmsg)
 Parse and store BLOB in the respective vector. More...
 

Protected Attributes

double RA
 
double Dec
 
double primaryFocalLength
 
double primaryAperture
 
double guiderFocalLength
 
double guiderAperture
 
bool InExposure
 
bool InGuideExposure
 
bool RapidGuideEnabled
 
bool GuiderRapidGuideEnabled
 
bool AutoLoop
 
bool GuiderAutoLoop
 
bool SendImage
 
bool GuiderSendImage
 
bool ShowMarker
 
bool GuiderShowMarker
 
float ExposureTime
 
float GuiderExposureTime
 
double MPSAS
 
double RotatorAngle
 
std::vector< std::string > FilterNames
 
int CurrentFilterSlot
 
std::unique_ptr< StreamRecorderStreamer
 
CCDChip PrimaryCCD
 
CCDChip GuideCCD
 
INumberVectorProperty EqNP
 
INumber EqN [2]
 
ITextVectorProperty ActiveDeviceTP
 
IText ActiveDeviceT [4]
 
INumber TemperatureN [1]
 
INumberVectorProperty TemperatureNP
 
IText BayerT [3]
 
ITextVectorProperty BayerTP
 
IText FileNameT [1]
 
ITextVectorProperty FileNameTP
 
ISwitch UploadS [3]
 
ISwitchVectorProperty UploadSP
 
IText UploadSettingsT [2]
 
ITextVectorProperty UploadSettingsTP
 
ISwitch TelescopeTypeS [2]
 
ISwitchVectorProperty TelescopeTypeSP
 
ISwitch WorldCoordS [2]
 
ISwitchVectorProperty WorldCoordSP
 
INumber CCDRotationN [1]
 
INumberVectorProperty CCDRotationNP
 
IText FITSHeaderT [2]
 
ITextVectorProperty FITSHeaderTP
 
- Protected Attributes inherited from INDI::DefaultDevice
uint32_t updatePeriodMS = 1000
 Period in milliseconds to call TimerHit(). Default 1000 ms. More...
 

Friends

class ::StreamRecorder
 

Detailed Description

Class to provide general functionality of CCD cameras with a single CCD sensor, or a primary CCD sensor in addition to a secondary CCD guide head.

The CCD capabilities must be set to select which features are exposed to the clients. SetCCDCapability() is typically set in the constructor or initProperties(), but can also be called after connection is established with the CCD, but must be called /em before returning true in Connect().

It also implements the interface to perform guiding. The class enable the ability to snoop on telescope equatorial coordinates and record them in the FITS file before upload. It also snoops Sky-Quality-Meter devices to record sky quality in units of Magnitudes-Per-Arcsecond-Squared (MPASS) in the FITS header.

Support for streaming is available (Linux only) and is handled by the StreamRecorder class.

Developers need to subclass INDI::CCD to implement any driver for CCD cameras within INDI.

Examples:
simpleccd.h.

Definition at line 432 of file indiccd.h.

Member Enumeration Documentation

anonymous enum
Enumerator
CCD_CAN_BIN 

Does the CCD support binning?

CCD_CAN_SUBFRAME 

Does the CCD support setting ROI?

CCD_CAN_ABORT 

Can the CCD exposure be aborted?

CCD_HAS_GUIDE_HEAD 

Does the CCD have a guide head?

CCD_HAS_ST4_PORT 

Does the CCD have an ST4 port?

CCD_HAS_SHUTTER 

Does the CCD have a mechanical shutter?

CCD_HAS_COOLER 

Does the CCD have a cooler and temperature control?

CCD_HAS_BAYER 

Does the CCD send color data in bayer format?

CCD_HAS_STREAMING 

Does the CCD support live video streaming?

Definition at line 438 of file indiccd.h.

anonymous enum
protected
Enumerator
UPLOAD_DIR 
UPLOAD_PREFIX 

Definition at line 804 of file indiccd.h.

anonymous enum
protected
Enumerator
TELESCOPE_PRIMARY 
TELESCOPE_GUIDE 

Definition at line 812 of file indiccd.h.

anonymous enum
protected
Enumerator
FITS_OBSERVER 
FITS_OBJECT 

Definition at line 829 of file indiccd.h.

Enumerator
UPLOAD_CLIENT 
UPLOAD_LOCAL 
UPLOAD_BOTH 

Definition at line 451 of file indiccd.h.

Constructor & Destructor Documentation

INDI::CCD::CCD ( )

Definition at line 369 of file indiccd.cpp.

INDI::CCD::~CCD ( )
virtual

Definition at line 398 of file indiccd.cpp.

Member Function Documentation

bool INDI::CCD::AbortExposure ( )
protectedvirtual

Abort ongoing exposure.

Returns
true is abort is successful, false otherwise.
Note
This function is not implemented in INDI::CCD, it must be implemented in the child class

Reimplemented in V4L2_Driver, CCDSim, and SimpleCCD.

Definition at line 1630 of file indiccd.cpp.

bool INDI::CCD::AbortGuideExposure ( )
protectedvirtual

Abort ongoing exposure.

Returns
true is abort is successful, false otherwise.
Note
This function is not implemented in INDI::CCD, it must be implemented in the child class

Reimplemented in CCDSim.

Definition at line 1636 of file indiccd.cpp.

virtual void INDI::CCD::activeDevicesUpdated ( )
inlineprotectedvirtual

activeDevicesUpdated Inform children that ActiveDevices property was updated so they can snoop on the updated devices if desired.

Reimplemented in CCDSim.

Definition at line 741 of file indiccd.h.

void INDI::CCD::addFITSKeywords ( fitsfile *  fptr,
CCDChip targetChip 
)
protectedvirtual

Add FITS keywords to a fits file.

Parameters
fptrpointer to a valid FITS file.
targetChipThe target chip to extract the keywords from.
Note
In additional to the standard FITS keywords, this function write the following keywords the FITS file:
  • EXPTIME: Total Exposure Time (s)
  • DARKTIME (if applicable): Total Exposure Time (s)
  • PIXSIZE1: Pixel Size 1 (microns)
  • PIXSIZE2: Pixel Size 2 (microns)
  • BINNING: Binning HOR x VER
  • FRAME: Frame Type
  • DATAMIN: Minimum value
  • DATAMAX: Maximum value
  • INSTRUME: CCD Name
  • DATE-OBS: UTC start date of observation

To add additional information, override this function in the child class and ensure to call INDI::CCD::addFITSKeywords.

Definition at line 1683 of file indiccd.cpp.

bool INDI::CCD::CanAbort ( )
inlineprotected
Returns
True if CCD can abort exposure. False otherwise.

Definition at line 476 of file indiccd.h.

bool INDI::CCD::CanBin ( )
inlineprotected
Returns
True if CCD supports binning. False otherwise.

Definition at line 481 of file indiccd.h.

bool INDI::CCD::CanSubFrame ( )
inlineprotected
Returns
True if CCD supports subframing. False otherwise.

Definition at line 486 of file indiccd.h.

bool INDI::CCD::ExposureComplete ( CCDChip targetChip)
protectedvirtual

Uploads target Chip exposed buffer as FITS to the client. Dervied classes should class this function when an exposure is complete.

Parameters
targetChipchip that contains upload image data
Note
This function is not implemented in INDI::CCD, it must be implemented in the child class
Examples:
simpleccd.cpp.

Definition at line 1907 of file indiccd.cpp.

void INDI::CCD::fits_update_key_s ( fitsfile *  fptr,
int  type,
std::string  name,
void *  p,
std::string  explanation,
int *  status 
)
protected

A function to just remove GCC warnings about deprecated conversion

Definition at line 1900 of file indiccd.cpp.

uint32_t INDI::CCD::GetCCDCapability ( ) const
inlineprotected

GetCCDCapability returns the CCD capabilities.

Definition at line 465 of file indiccd.h.

void INDI::CCD::GuideComplete ( INDI_EQ_AXIS  axis)
protectedvirtual

Call GuideComplete once the guiding pulse is complete.

Parameters
axisAxis of completed guiding operation.

Reimplemented from INDI::GuiderInterface.

Definition at line 2813 of file indiccd.cpp.

IPState INDI::CCD::GuideEast ( float  ms)
protectedvirtual

Guide easward for ms milliseconds.

Parameters
msDuration in milliseconds.
Note
This function is not implemented in INDI::CCD, it must be implemented in the child class
Returns
0 if successful, -1 otherwise.

Implements INDI::GuiderInterface.

Reimplemented in CCDSim.

Definition at line 2674 of file indiccd.cpp.

IPState INDI::CCD::GuideNorth ( float  ms)
protectedvirtual

Guide northward for ms milliseconds.

Parameters
msDuration in milliseconds.
Note
This function is not implemented in INDI::CCD, it must be implemented in the child class
Returns
True if successful, false otherwise.

Implements INDI::GuiderInterface.

Reimplemented in CCDSim.

Definition at line 2660 of file indiccd.cpp.

IPState INDI::CCD::GuideSouth ( float  ms)
protectedvirtual

Guide southward for ms milliseconds.

Parameters
msDuration in milliseconds.
Note
This function is not implemented in INDI::CCD, it must be implemented in the child class
Returns
0 if successful, -1 otherwise.

Implements INDI::GuiderInterface.

Reimplemented in CCDSim.

Definition at line 2667 of file indiccd.cpp.

IPState INDI::CCD::GuideWest ( float  ms)
protectedvirtual

Guide westward for ms milliseconds.

Parameters
msDuration in milliseconds.
Note
This function is not implemented in INDI::CCD, it must be implemented in the child class
Returns
0 if successful, -1 otherwise.

Implements INDI::GuiderInterface.

Reimplemented in CCDSim.

Definition at line 2681 of file indiccd.cpp.

bool INDI::CCD::HasBayer ( )
inlineprotected
Returns
True if CCD sends image data in bayer format. False otherwise.

Definition at line 511 of file indiccd.h.

bool INDI::CCD::HasCooler ( )
inlineprotected
Returns
True if CCD has cooler and temperature can be controlled. False otherwise.

Definition at line 506 of file indiccd.h.

bool INDI::CCD::HasGuideHead ( )
inlineprotected
Returns
True if CCD has guide head. False otherwise.

Definition at line 491 of file indiccd.h.

bool INDI::CCD::HasShutter ( )
inlineprotected
Returns
True if CCD has mechanical or electronic shutter. False otherwise.

Definition at line 496 of file indiccd.h.

bool INDI::CCD::HasST4Port ( )
inlineprotected
Returns
True if CCD has ST4 port for guiding. False otherwise.

Definition at line 501 of file indiccd.h.

bool INDI::CCD::HasStreaming ( )
inlineprotected
Returns
True if the CCD supports live video streaming. False otherwise.

Definition at line 516 of file indiccd.h.

bool INDI::CCD::initProperties ( )
virtual

Initilize properties initial state and value. The child class must implement this function.

Returns
True if initilization is successful, false otherwise.

Reimplemented from INDI::DefaultDevice.

Reimplemented in V4L2_Driver, SimpleCCD, and CCDSim.

Examples:
simpleccd.cpp.

Definition at line 420 of file indiccd.cpp.

void INDI::CCD::ISGetProperties ( const char *  dev)
virtual

define the driver's properties to the client. Usually, only a minimum set of properties are defined to the client in this function if the device is in disconnected state. Those properties should be enough to enable the client to establish a connection to the device. In addition to CONNECT/DISCONNECT, such properties may include port name, IP address, etc. You should check if the device is already connected, and if this is true, then you must define the remainder of the the properties to the client in this function. Otherwise, the remainder of the driver's properties are defined to the client in updateProperties() function which is called when a client connects/disconnects from a device.

Parameters
devname of the device
Note
This function is called by the INDI framework, do not call it directly. See LX200 Generic driver for an example implementation

Reimplemented from INDI::DefaultDevice.

Reimplemented in V4L2_Driver, and CCDSim.

Definition at line 684 of file indiccd.cpp.

bool INDI::CCD::ISNewNumber ( const char *  dev,
const char *  name,
double  values[],
char *  names[],
int  n 
)
virtual

Process the client newNumber command.

Note
This function is called by the INDI framework, do not call it directly.
Returns
True if any property was successfully processed, false otherwise.

Reimplemented from INDI::DefaultDevice.

Reimplemented in CCDSim, and V4L2_Driver.

Definition at line 1025 of file indiccd.cpp.

bool INDI::CCD::ISNewSwitch ( const char *  dev,
const char *  name,
ISState states,
char *  names[],
int  n 
)
virtual

Process the client newSwitch command.

Note
This function is called by the INDI framework, do not call it directly.
Returns
True if any property was successfully processed, false otherwise.

Reimplemented from INDI::DefaultDevice.

Reimplemented in CCDSim, and V4L2_Driver.

Definition at line 1295 of file indiccd.cpp.

bool INDI::CCD::ISNewText ( const char *  dev,
const char *  name,
char *  texts[],
char *  names[],
int  n 
)
virtual

Process the client newSwitch command.

Note
This function is called by the INDI framework, do not call it directly.
Returns
True if any property was successfully processed, false otherwise.

Reimplemented from INDI::DefaultDevice.

Reimplemented in CCDSim, and V4L2_Driver.

Definition at line 941 of file indiccd.cpp.

bool INDI::CCD::ISSnoopDevice ( XMLEle root)
virtual

Process a snoop event from INDI server. This function is called when a snooped property is updated in a snooped driver.

Note
This function is called by the INDI framework, do not call it directly.
Returns
True if any property was successfully processed, false otherwise.

Reimplemented from INDI::DefaultDevice.

Reimplemented in CCDSim.

Definition at line 857 of file indiccd.cpp.

bool INDI::CCD::saveConfigItems ( FILE *  fp)
protectedvirtual

saveConfigItems Save configuration items in XML file.

Parameters
fppointer to file to write to
Returns
True if successful, false otherwise

Reimplemented from INDI::DefaultDevice.

Reimplemented in V4L2_Driver, and CCDSim.

Definition at line 2634 of file indiccd.cpp.

void INDI::CCD::SetCCDCapability ( uint32_t  cap)
protected

SetCCDCapability Set the CCD capabilities. Al fields must be initilized.

Parameters
cappointer to CCDCapability struct.
Examples:
simpleccd.cpp.

Definition at line 402 of file indiccd.cpp.

void INDI::CCD::SetCCDParams ( int  x,
int  y,
int  bpp,
float  xf,
float  yf 
)
protectedvirtual

Setup CCD paramters for primary CCD. Child classes call this function to update CCD parameters.

Parameters
xFrame X coordinates in pixels.
yFrame Y coordinates in pixels.
bppBits Per Pixels.
xfX pixel size in microns.
yfY pixel size in microns.
Examples:
simpleccd.cpp.

Definition at line 2614 of file indiccd.cpp.

void INDI::CCD::SetGuiderParams ( int  x,
int  y,
int  bpp,
float  xf,
float  yf 
)
protectedvirtual

Setup CCD paramters for guide head CCD. Child classes call this function to update CCD parameters.

Parameters
xFrame X coordinates in pixels.
yFrame Y coordinates in pixels.
bppBits Per Pixels.
xfX pixel size in microns.
yfY pixel size in microns.

Definition at line 2624 of file indiccd.cpp.

int INDI::CCD::SetTemperature ( double  temperature)
protectedvirtual

Set CCD temperature.

Parameters
temperatureCCD temperature in degrees celcius.
Returns
0 or 1 if setting the temperature call to the hardware is successful. -1 if an error is encountered. Return 0 if setting the temperature to the requested value takes time. Return 1 if setting the temperature to the requested value is complete.
Note
Upon returning 0, the property becomes BUSY. Once the temperature reaches the requested value, change the state to OK.
This function is not implemented in INDI::CCD, it must be implemented in the child class

Reimplemented in CCDSim, and SimpleCCD.

Definition at line 1611 of file indiccd.cpp.

bool INDI::CCD::StartExposure ( float  duration)
protectedvirtual

Start exposing primary CCD chip.

Parameters
durationDuration in seconds
Returns
true if OK and exposure will take some time to complete, false on error.
Note
This function is not implemented in INDI::CCD, it must be implemented in the child class

Reimplemented in V4L2_Driver, SimpleCCD, and CCDSim.

Definition at line 1618 of file indiccd.cpp.

bool INDI::CCD::StartGuideExposure ( float  duration)
protectedvirtual

Start exposing guide CCD chip.

Parameters
durationDuration in seconds
Returns
true if OK and exposure will take some time to complete, false on error.
Note
This function is not implemented in INDI::CCD, it must be implemented in the child class

Reimplemented in CCDSim.

Definition at line 1624 of file indiccd.cpp.

bool INDI::CCD::StartStreaming ( )
protectedvirtual

StartStreaming Start live video streaming.

Returns
True if successful, false otherwise.

Reimplemented in V4L2_Driver.

Definition at line 2818 of file indiccd.cpp.

bool INDI::CCD::StopStreaming ( )
protectedvirtual

StopStreaming Stop live video streaming.

Returns
True if successful, false otherwise.

Reimplemented in V4L2_Driver.

Definition at line 2824 of file indiccd.cpp.

bool INDI::CCD::UpdateCCDBin ( int  hor,
int  ver 
)
protectedvirtual

INDI::CCD calls this function when CCD Binning needs to be updated in the hardware. Derived classes should implement this function.

Parameters
horHorizontal binning.
verVertical binning.
Returns
true is CCD chip update is successful, false otherwise.
Note
This function is not implemented in INDI::CCD, it must be implemented in the child class

Reimplemented in V4L2_Driver.

Definition at line 1655 of file indiccd.cpp.

bool INDI::CCD::UpdateCCDFrame ( int  x,
int  y,
int  w,
int  h 
)
protectedvirtual

INDI::CCD calls this function when CCD Frame dimension needs to be updated in the hardware. Derived classes should implement this function.

Parameters
xSubframe X coordinate in pixels.
ySubframe Y coordinate in pixels.
wSubframe width in pixels.
hSubframe height in pixels.
Note
(0,0) is defined as most left, top pixel in the subframe.
Returns
true is CCD chip update is successful, false otherwise.
Note
This function is not implemented in INDI::CCD, it must be implemented in the child class

Reimplemented in V4L2_Driver.

Definition at line 1642 of file indiccd.cpp.

bool INDI::CCD::UpdateCCDFrameType ( CCDChip::CCD_FRAME  fType)
protectedvirtual

INDI::CCD calls this function when CCD frame type needs to be updated in the hardware.

Parameters
fTypeFrame type
Returns
true is CCD chip update is successful, false otherwise.
Note
It is not mandatory to implement this function in the child class. The CCD hardware layer may either set the frame type when this function is called, or (optionally) before an exposure is started.

Definition at line 1669 of file indiccd.cpp.

virtual bool INDI::CCD::UpdateCCDUploadMode ( CCD_UPLOAD_MODE  mode)
inlineprotectedvirtual

INDI::CCD calls this function when client upload mode switch is updated.

Parameters
modeupload mode. UPLOAD_CLIENT only sends the upload the client application. UPLOAD_BOTH saves the frame and uploads it to the client. UPLOAD_LOCAL only saves the frame locally.
Returns
true if mode is changed successfully, false otherwise.
Note
By default this function is implemented in the base class and returns true. Override if necessary.

Definition at line 632 of file indiccd.h.

bool INDI::CCD::UpdateGuiderBin ( int  hor,
int  ver 
)
protectedvirtual

INDI::CCD calls this function when Guide head binning is updated by the client. Derived classes should implement this function.

Parameters
horHorizontal binning.
verVertical binning.
Returns
true is CCD chip update is successful, false otherwise.
Note
This function is not implemented in INDI::CCD, it must be implemented in the child class

Definition at line 1662 of file indiccd.cpp.

bool INDI::CCD::UpdateGuiderFrame ( int  x,
int  y,
int  w,
int  h 
)
protectedvirtual

INDI::CCD calls this function when Guide head frame dimension is updated by the client. Derived classes should implement this function.

Parameters
xSubframe X coordinate in pixels.
ySubframe Y coordinate in pixels.
wSubframe width in pixels.
hSubframe height in pixels.
Note
(0,0) is defined as most left, top pixel in the subframe.
Returns
true is CCD chip update is successful, false otherwise.
Note
This function is not implemented in INDI::CCD, it must be implemented in the child class

Definition at line 1649 of file indiccd.cpp.

bool INDI::CCD::UpdateGuiderFrameType ( CCDChip::CCD_FRAME  fType)
protectedvirtual

INDI::CCD calls this function when Guide frame type is updated by the client.

Parameters
fTypeFrame type
Returns
true is CCD chip update is successful, false otherwise.
Note
It is not mandatory to implement this function in the child class. The CCD hardware layer may either set the frame type when this function is called, or (optionally) before an exposure is started.

Definition at line 1676 of file indiccd.cpp.

bool INDI::CCD::updateProperties ( )
virtual

updateProperties is called whenever there is a change in the CONNECTION status of the driver. This will enable the driver to react to changes of switching ON/OFF a device. For example, a driver may only define a set of properties after a device is connected, but not before.

Returns
True if update is successful, false otherwise.

Reimplemented from INDI::DefaultDevice.

Reimplemented in V4L2_Driver, SimpleCCD, and CCDSim.

Examples:
simpleccd.cpp.

Definition at line 698 of file indiccd.cpp.

Friends And Related Function Documentation

friend class ::StreamRecorder
friend

Definition at line 844 of file indiccd.h.

Member Data Documentation

IText INDI::CCD::ActiveDeviceT[4]
protected

Definition at line 788 of file indiccd.h.

ITextVectorProperty INDI::CCD::ActiveDeviceTP
protected

Definition at line 787 of file indiccd.h.

bool INDI::CCD::AutoLoop
protected

Definition at line 759 of file indiccd.h.

IText INDI::CCD::BayerT[3]
protected

Definition at line 793 of file indiccd.h.

ITextVectorProperty INDI::CCD::BayerTP
protected

Definition at line 794 of file indiccd.h.

enum { ... } INDI::CCD::CCDCapability
INumber INDI::CCD::CCDRotationN[1]
protected

Definition at line 823 of file indiccd.h.

INumberVectorProperty INDI::CCD::CCDRotationNP
protected

Definition at line 824 of file indiccd.h.

int INDI::CCD::CurrentFilterSlot
protected

Definition at line 776 of file indiccd.h.

double INDI::CCD::Dec
protected

Definition at line 752 of file indiccd.h.

INumber INDI::CCD::EqN[2]
protected

Definition at line 785 of file indiccd.h.

INumberVectorProperty INDI::CCD::EqNP
protected

Definition at line 784 of file indiccd.h.

float INDI::CCD::ExposureTime
protected

Definition at line 766 of file indiccd.h.

IText INDI::CCD::FileNameT[1]
protected

Definition at line 796 of file indiccd.h.

ITextVectorProperty INDI::CCD::FileNameTP
protected

Definition at line 797 of file indiccd.h.

std::vector<std::string> INDI::CCD::FilterNames
protected

Definition at line 775 of file indiccd.h.

IText INDI::CCD::FITSHeaderT[2]
protected

Definition at line 827 of file indiccd.h.

ITextVectorProperty INDI::CCD::FITSHeaderTP
protected

Definition at line 828 of file indiccd.h.

CCDChip INDI::CCD::GuideCCD
protected

Definition at line 781 of file indiccd.h.

double INDI::CCD::guiderAperture
protected

Definition at line 753 of file indiccd.h.

bool INDI::CCD::GuiderAutoLoop
protected

Definition at line 760 of file indiccd.h.

float INDI::CCD::GuiderExposureTime
protected

Definition at line 767 of file indiccd.h.

double INDI::CCD::guiderFocalLength
protected

Definition at line 753 of file indiccd.h.

bool INDI::CCD::GuiderRapidGuideEnabled
protected

Definition at line 757 of file indiccd.h.

bool INDI::CCD::GuiderSendImage
protected

Definition at line 762 of file indiccd.h.

bool INDI::CCD::GuiderShowMarker
protected

Definition at line 764 of file indiccd.h.

bool INDI::CCD::InExposure
protected

Definition at line 754 of file indiccd.h.

bool INDI::CCD::InGuideExposure
protected

Definition at line 755 of file indiccd.h.

double INDI::CCD::MPSAS
protected

Definition at line 770 of file indiccd.h.

double INDI::CCD::primaryAperture
protected

Definition at line 753 of file indiccd.h.

CCDChip INDI::CCD::PrimaryCCD
protected
Examples:
simpleccd.cpp.

Definition at line 780 of file indiccd.h.

double INDI::CCD::primaryFocalLength
protected

Definition at line 753 of file indiccd.h.

double INDI::CCD::RA
protected

Definition at line 752 of file indiccd.h.

bool INDI::CCD::RapidGuideEnabled
protected

Definition at line 756 of file indiccd.h.

double INDI::CCD::RotatorAngle
protected

Definition at line 773 of file indiccd.h.

bool INDI::CCD::SendImage
protected

Definition at line 761 of file indiccd.h.

bool INDI::CCD::ShowMarker
protected

Definition at line 763 of file indiccd.h.

std::unique_ptr<StreamRecorder> INDI::CCD::Streamer
protected

Definition at line 778 of file indiccd.h.

ISwitch INDI::CCD::TelescopeTypeS[2]
protected

Definition at line 810 of file indiccd.h.

ISwitchVectorProperty INDI::CCD::TelescopeTypeSP
protected

Definition at line 811 of file indiccd.h.

INumber INDI::CCD::TemperatureN[1]
protected

Definition at line 790 of file indiccd.h.

INumberVectorProperty INDI::CCD::TemperatureNP
protected
Examples:
simpleccd.cpp.

Definition at line 791 of file indiccd.h.

ISwitch INDI::CCD::UploadS[3]
protected

Definition at line 799 of file indiccd.h.

IText INDI::CCD::UploadSettingsT[2]
protected

Definition at line 802 of file indiccd.h.

ITextVectorProperty INDI::CCD::UploadSettingsTP
protected

Definition at line 803 of file indiccd.h.

ISwitchVectorProperty INDI::CCD::UploadSP
protected

Definition at line 800 of file indiccd.h.

ISwitch INDI::CCD::WorldCoordS[2]
protected

Definition at line 819 of file indiccd.h.

ISwitchVectorProperty INDI::CCD::WorldCoordSP
protected

Definition at line 820 of file indiccd.h.


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