Instrument Neutral Distributed Interface INDI  2.0.2
simpleccd.h

A simple CCD device that can capture images and control temperature. It returns a FITS image to the client. To build drivers for complex CCDs, please refer to the INDI Generic CCD driver template in INDI SVN (under 3rdparty).

/*
INDI Developers Manual
Tutorial #3
"Simple CCD Driver"
We develop a simple CCD driver.
Refer to README, which contains instruction on how to build this driver, and use it
with an INDI-compatible client.
*/
#pragma once
#include "indiccd.h"
class SimpleCCD : public INDI::CCD
{
public:
SimpleCCD() = default;
protected:
// General device functions
bool Connect() override;
bool Disconnect() override;
const char *getDefaultName() override;
bool initProperties() override;
bool updateProperties() override;
// CCD specific functions
bool StartExposure(float duration) override;
bool AbortExposure() override;
int SetTemperature(double temperature) override;
void TimerHit() override;
private:
// Utility functions
float CalcTimeLeft();
void setupParams();
void grabImage();
// Are we exposing?
bool InExposure { false };
INDI::ElapsedTimer ExposureTimer;
float ExposureRequest { 0 };
float TemperatureRequest { 0 };
};
Class to provide general functionality of CCD cameras with a single CCD sensor, or a primary CCD sens...
Definition: indiccd.h:116
The ElapsedTimer class provides a fast way to calculate elapsed times.
int SetTemperature(double temperature) override
Set CCD temperature.
Definition: simpleccd.cpp:144
SimpleCCD()=default
bool Disconnect() override
Disconnect from device.
Definition: simpleccd.cpp:47
bool AbortExposure() override
Abort ongoing exposure.
Definition: simpleccd.cpp:135
bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
Definition: simpleccd.cpp:85
bool initProperties() override
Initilize properties initial state and value. The child class must implement this function.
Definition: simpleccd.cpp:64
bool Connect() override
Connect to the device. INDI::DefaultDevice implementation connects to appropriate connection interfac...
Definition: simpleccd.cpp:35
const char * getDefaultName() override
Definition: simpleccd.cpp:56
bool StartExposure(float duration) override
Start exposing primary CCD chip.
Definition: simpleccd.cpp:118
void TimerHit() override
Callback function to be called once SetTimer duration elapses.
Definition: simpleccd.cpp:163