28#define currentCCDTemperature TemperatureNP[0].value
37 LOG_INFO(
"Simple CCD connected successfully!");
49 LOG_INFO(
"Simple CCD disconnected successfully!");
105void SimpleCCD::setupParams()
120 ExposureRequest = duration;
125 ExposureTimer.start();
155float SimpleCCD::CalcTimeLeft()
157 return ExposureRequest - ExposureTimer.
elapsed() / 1000.0;
170 double timeleft = CalcTimeLeft();
177 LOG_INFO(
"Exposure done, downloading image...");
211 LOG_WARN(
"Target temperature reached.");
230void SimpleCCD::grabImage()
240 for (
int i = 0; i < height; i++)
241 for (
int j = 0; j < width; j++)
242 image[i * width + j] = rand() % 255;
int getSubH() const
getSubH Get the height of the frame
int getBPP() const
getBPP Get CCD Chip depth (bits per pixel).
int getBinY() const
getBinY Get vertical binning of the CCD chip.
int getXRes() const
getXRes Get the horizontal resolution in pixels of the CCD Chip.
int getBinX() const
getBinX Get horizontal binning of the CCD chip.
uint8_t * getFrameBuffer()
getFrameBuffer Get raw frame buffer of the CCD chip.
int getSubW() const
getSubW Get the width of the frame
void setFrameBufferSize(uint32_t nbuf, bool allocMem=true)
setInterlaced Set whether the CCD chip is interlaced or not?
int getYRes() const
Get the vertical resolution in pixels of the CCD Chip.
virtual bool ExposureComplete(CCDChip *targetChip)
Uploads target Chip exposed buffer as FITS to the client. Derived classes should class this function ...
INDI::PropertyNumber TemperatureNP
TemperatureNP Camera Temperature in Celcius.
virtual bool initProperties() override
Initialize properties initial state and value. The child class must implement this function.
virtual bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
void SetCCDCapability(uint32_t cap)
SetCCDCapability Set the CCD capabilities. All fields must be initialized.
virtual void SetCCDParams(int x, int y, int bpp, float xf, float yf)
Setup CCD parameters for primary CCD. Child classes call this function to update CCD parameters.
void setDefaultPollingPeriod(uint32_t msec)
setDefaultPollingPeriod Change the default polling period to call TimerHit() function in the driver.
uint32_t getCurrentPollingPeriod() const
getCurrentPollingPeriod Return the current polling period.
void addAuxControls()
Add Debug, Simulation, and Configuration options to the driver.
int SetTimer(uint32_t ms)
Set a timer to call the function TimerHit after ms milliseconds.
int64_t elapsed() const
Returns the number of milliseconds since this ElapsedTimer was last started.
int SetTemperature(double temperature) override
Set CCD temperature.
bool Disconnect() override
Disconnect from device.
bool AbortExposure() override
Abort ongoing exposure.
bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
bool initProperties() override
Initialize properties initial state and value. The child class must implement this function.
bool Connect() override
Connect to the device. INDI::DefaultDevice implementation connects to appropriate connection interfac...
const char * getDefaultName() override
bool StartExposure(float duration) override
Start exposing primary CCD chip.
void TimerHit() override
Callback function to be called once SetTimer duration elapses.
std::unique_ptr< SimpleCCD > simpleCCD(new SimpleCCD())
#define currentCCDTemperature
Construct a basic INDI CCD device that simulates exposure & temperature settings. It also generates a...