Skip to content

Commit

Permalink
StreamManager - Bugfix - D-Pointer implementation (indilib#1383)
Browse files Browse the repository at this point in the history
  • Loading branch information
pawel-soja authored Mar 15, 2021
1 parent 743006f commit db9772d
Show file tree
Hide file tree
Showing 6 changed files with 873 additions and 665 deletions.
1 change: 1 addition & 0 deletions libs/indibase/indiccd.h
Original file line number Diff line number Diff line change
Expand Up @@ -711,5 +711,6 @@ class CCD : public DefaultDevice, GuiderInterface
/// Misc.
/////////////////////////////////////////////////////////////////////////////
friend class StreamManager;
friend class StreamManagerPrivate;
};
}
34 changes: 17 additions & 17 deletions libs/indibase/indiccdchip.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class CCDChip
* @brief getXRes Get the horizontal resolution in pixels of the CCD Chip.
* @return the horizontal resolution of the CCD Chip.
*/
inline int getXRes()
inline int getXRes() const
{
return XRes;
}
Expand All @@ -61,7 +61,7 @@ class CCDChip
* @brief Get the vertical resolution in pixels of the CCD Chip.
* @return the horizontal resolution of the CCD Chip.
*/
inline int getYRes()
inline int getYRes() const
{
return YRes;
}
Expand All @@ -70,7 +70,7 @@ class CCDChip
* @brief getSubX Get the starting left coordinates (X) of the frame.
* @return the starting left coordinates (X) of the image.
*/
inline int getSubX()
inline int getSubX() const
{
return SubX;
}
Expand All @@ -79,7 +79,7 @@ class CCDChip
* @brief getSubY Get the starting top coordinates (Y) of the frame.
* @return the starting top coordinates (Y) of the image.
*/
inline int getSubY()
inline int getSubY() const
{
return SubY;
}
Expand All @@ -88,7 +88,7 @@ class CCDChip
* @brief getSubW Get the width of the frame
* @return unbinned width of the frame
*/
inline int getSubW()
inline int getSubW() const
{
return SubW;
}
Expand All @@ -97,7 +97,7 @@ class CCDChip
* @brief getSubH Get the height of the frame
* @return unbinned height of the frame
*/
inline int getSubH()
inline int getSubH() const
{
return SubH;
}
Expand All @@ -106,7 +106,7 @@ class CCDChip
* @brief getBinX Get horizontal binning of the CCD chip.
* @return horizontal binning of the CCD chip.
*/
inline int getBinX()
inline int getBinX() const
{
return BinX;
}
Expand All @@ -115,7 +115,7 @@ class CCDChip
* @brief getBinY Get vertical binning of the CCD chip.
* @return vertical binning of the CCD chip.
*/
inline int getBinY()
inline int getBinY() const
{
return BinY;
}
Expand All @@ -124,7 +124,7 @@ class CCDChip
* @brief getPixelSizeX Get horizontal pixel size in microns.
* @return horizontal pixel size in microns.
*/
inline float getPixelSizeX()
inline float getPixelSizeX() const
{
return PixelSizeX;
}
Expand All @@ -133,7 +133,7 @@ class CCDChip
* @brief getPixelSizeY Get vertical pixel size in microns.
* @return vertical pixel size in microns.
*/
inline float getPixelSizeY()
inline float getPixelSizeY() const
{
return PixelSizeY;
}
Expand All @@ -142,7 +142,7 @@ class CCDChip
* @brief getBPP Get CCD Chip depth (bits per pixel).
* @return bits per pixel.
*/
inline int getBPP()
inline int getBPP() const
{
return BitsPerPixel;
}
Expand All @@ -151,7 +151,7 @@ class CCDChip
* @brief getFrameBufferSize Get allocated frame buffer size to hold the CCD image frame.
* @return allocated frame buffer size to hold the CCD image frame.
*/
inline int getFrameBufferSize()
inline int getFrameBufferSize() const
{
return RawFrameSize;
}
Expand All @@ -160,7 +160,7 @@ class CCDChip
* @brief getExposureLeft Get exposure time left in seconds.
* @return exposure time left in seconds.
*/
inline double getExposureLeft()
inline double getExposureLeft() const
{
return ImageExposureN[0].value;
}
Expand All @@ -169,7 +169,7 @@ class CCDChip
* @brief getExposureDuration Get requested exposure duration for the CCD chip in seconds.
* @return requested exposure duration for the CCD chip in seconds.
*/
inline double getExposureDuration()
inline double getExposureDuration() const
{
return ExposureDuration;
}
Expand Down Expand Up @@ -206,7 +206,7 @@ class CCDChip
* @brief isCompressed
* @return True if frame is compressed, false otherwise.
*/
inline bool isCompressed()
inline bool isCompressed() const
{
return SendCompressed;
}
Expand All @@ -224,7 +224,7 @@ class CCDChip
* @brief getFrameType
* @return CCD Frame type
*/
inline CCD_FRAME getFrameType()
inline CCD_FRAME getFrameType() const
{
return FrameType;
}
Expand Down Expand Up @@ -369,7 +369,7 @@ class CCDChip
/**
* @return True if CCD is currently exposing, false otherwise.
*/
bool isExposing()
bool isExposing() const
{
return (ImageExposureNP.s == IPS_BUSY);
}
Expand Down
16 changes: 8 additions & 8 deletions libs/indibase/indisensorinterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class SensorInterface : public DefaultDevice
* @brief getContinuumBufferSize Get allocated continuum buffer size to hold the Sensor integrationd stream.
* @return allocated continuum buffer size to hold the Sensor integration stream.
*/
inline int getBufferSize()
inline int getBufferSize() const
{
return BufferSize;
}
Expand All @@ -119,7 +119,7 @@ class SensorInterface : public DefaultDevice
* @brief getIntegrationLeft Get Integration time left in seconds.
* @return Integration time left in seconds.
*/
inline double getIntegrationLeft()
inline double getIntegrationLeft() const
{
return FramedIntegrationN[0].value;
}
Expand All @@ -128,7 +128,7 @@ class SensorInterface : public DefaultDevice
* @brief getIntegrationTime Get requested Integration duration for the Sensor device in seconds.
* @return requested Integration duration for the Sensor device in seconds.
*/
inline double getIntegrationTime()
inline double getIntegrationTime() const
{
return integrationTime;
}
Expand Down Expand Up @@ -165,7 +165,7 @@ class SensorInterface : public DefaultDevice
* @brief getBPS Get Sensor depth (bits per sample).
* @return bits per sample.
*/
inline int getBPS()
inline int getBPS() const
{
return BPS;
}
Expand Down Expand Up @@ -247,7 +247,7 @@ class SensorInterface : public DefaultDevice
/**
* @return True if Sensor is currently exposing, false otherwise.
*/
inline bool isCapturing()
inline bool isCapturing() const
{
return (FramedIntegrationNP.s == IPS_BUSY);
}
Expand Down Expand Up @@ -340,23 +340,23 @@ class SensorInterface : public DefaultDevice
/**
* @return True if Sensor has mechanical or electronic shutter. False otherwise.
*/
bool HasShutter()
bool HasShutter() const
{
return capability & SENSOR_HAS_SHUTTER;
}

/**
* @return True if Sensor has cooler and temperature can be controlled. False otherwise.
*/
bool HasCooler()
bool HasCooler() const
{
return capability & SENSOR_HAS_COOLER;
}

/**
* @return True if Sensor can abort Integration. False otherwise.
*/
bool CanAbort()
bool CanAbort() const
{
return capability & SENSOR_CAN_ABORT;
}
Expand Down
Loading

0 comments on commit db9772d

Please sign in to comment.