Interface ICamera
Defines the capabilities supported by an ASCOM Alpaca Camera device
Inherited Members
Namespace: ES.Ascom.Alpaca.Devices
Assembly: ES.Ascom.Alpaca.Shared.dll
Syntax
public interface ICamera : IDevice
Methods
| Improve this Doc View SourceAbortExposure()
Aborts the current exposure, if any, and returns the camera to Idle state.
Declaration
void AbortExposure()
CanAbortExposure()
Indicates whether the camera can abort exposures.
Declaration
bool CanAbortExposure()
Returns
| Type | Description |
|---|---|
| System.Boolean | Returns true if the camera can abort exposures; false if not. |
CanAsymmetricBin()
Indicates whether the camera supports asymmetric binning
Declaration
bool CanAsymmetricBin()
Returns
| Type | Description |
|---|---|
| System.Boolean | Returns true if the camera supports asymmetric binning; false if not. |
CanFastReadout()
Indicates whether the camera has a fast readout mode.
Declaration
bool CanFastReadout()
Returns
| Type | Description |
|---|---|
| System.Boolean |
CanGetCoolerPower()
Indicates whether the camera's cooler power setting can be read.
Declaration
bool CanGetCoolerPower()
Returns
| Type | Description |
|---|---|
| System.Boolean |
CanPulseGuide()
Returns a flag indicating whether this camera supports pulse guiding
Declaration
bool CanPulseGuide()
Returns
| Type | Description |
|---|---|
| System.Boolean |
CanSetCCDTemperature()
Returns a flag indicating whether this camera supports setting the CCD temperature
Declaration
bool CanSetCCDTemperature()
Returns
| Type | Description |
|---|---|
| System.Boolean |
CanStopExposure()
Returns a flag indicating whether this camera can stop an exposure that is in progress
Declaration
bool CanStopExposure()
Returns
| Type | Description |
|---|---|
| System.Boolean |
GetBayerOffsetX()
Returns the X offset of the Bayer matrix, as defined in SensorType.
Declaration
int GetBayerOffsetX()
Returns
| Type | Description |
|---|---|
| System.Int32 |
GetBayerOffsetY()
Returns the Y offset of the Bayer matrix, as defined in SensorType.
Declaration
int GetBayerOffsetY()
Returns
| Type | Description |
|---|---|
| System.Int32 |
GetBinX()
Returns the binning factor for the X axis.
Declaration
int GetBinX()
Returns
| Type | Description |
|---|---|
| System.Int32 |
GetBinY()
Returns the binning factor for the Y axis.
Declaration
int GetBinY()
Returns
| Type | Description |
|---|---|
| System.Int32 |
GetCameraState()
Returns the current camera operational state
Declaration
CameraState GetCameraState()
Returns
| Type | Description |
|---|---|
| CameraState |
GetCameraXSize()
Returns the width of the CCD camera chip in unbinned pixels.
Declaration
int GetCameraXSize()
Returns
| Type | Description |
|---|---|
| System.Int32 |
GetCameraYSize()
Returns the height of the CCD camera chip in unbinned pixels.
Declaration
int GetCameraYSize()
Returns
| Type | Description |
|---|---|
| System.Int32 |
GetCCDTemperature()
Returns the current CCD temperature in degrees Celsius.
Declaration
double GetCCDTemperature()
Returns
| Type | Description |
|---|---|
| System.Double |
GetCCDTemperatureSetPoint()
Returns the current camera cooler setpoint in degrees Celsius.
Declaration
double GetCCDTemperatureSetPoint()
Returns
| Type | Description |
|---|---|
| System.Double |
GetCoolerPower()
Returns the present cooler power level, in percent.
Declaration
double GetCoolerPower()
Returns
| Type | Description |
|---|---|
| System.Double |
GetElectronPerADU()
Returns the gain of the camera in photoelectrons per A/D unit.
Declaration
double GetElectronPerADU()
Returns
| Type | Description |
|---|---|
| System.Double |
GetExposureMax()
Returns the maximum exposure time supported by StartExposure.
Declaration
double GetExposureMax()
Returns
| Type | Description |
|---|---|
| System.Double |
GetExposureMin()
Returns the Minimium exposure time in seconds that the camera supports through StartExposure.
Declaration
double GetExposureMin()
Returns
| Type | Description |
|---|---|
| System.Double |
GetExposureResolution()
Returns the smallest increment in exposure time supported by StartExposure.
Declaration
double GetExposureResolution()
Returns
| Type | Description |
|---|---|
| System.Double |
GetFullWellCapacity()
Reports the full well capacity of the camera in electrons, at the current camera settings (binning, SetupDialog settings, etc.).
Declaration
double GetFullWellCapacity()
Returns
| Type | Description |
|---|---|
| System.Double |
GetGain()
Returns an index into the Gains array for the selected camera gain.
Declaration
int GetGain()
Returns
| Type | Description |
|---|---|
| System.Int32 |
GetGainMax()
Returns the maximum value of Gain.
Declaration
int GetGainMax()
Returns
| Type | Description |
|---|---|
| System.Int32 |
GetGainMin()
Returns the minimum value of Gain.
Declaration
int GetGainMin()
Returns
| Type | Description |
|---|---|
| System.Int32 |
GetGains()
Returns the Gains supported by the camera.
Declaration
IList<string> GetGains()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IList<System.String> |
GetHeatSinkTemperature()
Returns the current heat sink temperature (called "ambient temperature" by some manufacturers) in degrees Celsius.
Declaration
double GetHeatSinkTemperature()
Returns
| Type | Description |
|---|---|
| System.Double |
GetImageArray()
Returns an array of integers containing the exposure pixel values", "description": "Returns an array of 32bit integers containing the pixel values from the last exposure. This call can return either a 2 dimension (monochrome images) or 3 dimension (colour or multi-plane images) array of size NumX * NumY or NumX * NumY * NumPlanes. Where applicable, the size of NumPlanes has to be determined by inspection of the returned Array.
Since 32bit integers are always returned by this call, the returned JSON Type value (0 = Unknown, 1 = short(16bit), 2 = int(32bit), 3 = Double) is always 2. The number of planes is given in the returned Rank value.
When de-serialising to an object it helps enormously to know the array Rank beforehand so that the correct data class can be used. This can be achieved through a regular expression or by direct parsing of the returned JSON string to extract the Type and Rank values before de-serialising.
This regular expression accomplishes the etraction into two named groups Type and Rank
^"Type":(?<Type>\d),"Rank":(?<Rank>\d*)
which can then be used to select the correct de-serialisation data class.
Declaration
Array GetImageArray()
Returns
| Type | Description |
|---|---|
| System.Array |
GetImageArrayVariant()
Returns an array containing the pixel values from the last exposure. This call can return either a 2 dimension (monochrome images) or 3 dimension (colour or multi-plane images) array of size NumX * NumY or NumX * NumY * NumPlanes. Where applicable, the size of NumPlanes has to be determined by inspection of the returned Array.
This call can return values as short(16bit) integers, int(32bit) integers or double floating point values. The nature of the returned values is given in the Type parameter: 0 = Unknown, 1 = short(16bit), 2 = int(32bit), 3 = Double. The number of planes is given in the returned Rank value.
When deserialising to an object it helps enormously to know the Type and Rank beforehand so that the correct data class can be used. This can be achieved through a regular expression or by direct parsing of the returned JSON string to extract the Type and Rank values before deserialising.
This regular expression accomplishes the extraction into two named groups: Type and Rank:
^*"Type":(?<Type>\\d*),"Rank":(?<Rank>\\d*)
which can then be used to select the correct deserialisation data class.
Declaration
Array GetImageArrayVariant()
Returns
| Type | Description |
|---|---|
| System.Array |
GetLastExposureDuration()
Get the duration of the last exposure in seconds (i.e. shutter open time).
Declaration
double GetLastExposureDuration()
Returns
| Type | Description |
|---|---|
| System.Double |
GetLastExposureStartTime()
Start time of the last exposure in FITS standard format. (CCYY-MM-DDThh:mm:ss[.sss...])
Declaration
DateTime GetLastExposureStartTime()
Returns
| Type | Description |
|---|---|
| System.DateTime |
GetMaxADU()
Reports the maximum ADU value the camera can produce.
Declaration
int GetMaxADU()
Returns
| Type | Description |
|---|---|
| System.Int32 |
GetMaxBinX()
Returns the maximum allowed binning for the X camera axis
Declaration
int GetMaxBinX()
Returns
| Type | Description |
|---|---|
| System.Int32 |
GetMaxBinY()
Returns the maximum allowed binning for the Y camera axis
Declaration
int GetMaxBinY()
Returns
| Type | Description |
|---|---|
| System.Int32 |
GetNumX()
Returns the current subframe width, if binning is active, value is in binned pixels.
Declaration
int GetNumX()
Returns
| Type | Description |
|---|---|
| System.Int32 |
GetNumY()
Returns the current subframe height, if binning is active, value is in binned pixels.
Declaration
int GetNumY()
Returns
| Type | Description |
|---|---|
| System.Int32 |
GetPercentCompleted()
Returns the percentage of the current operation that is complete. If valid, returns an integer between 0 and 100, where 0 indicates 0% progress (function just started) and 100 indicates 100% progress (i.e. completion).
Declaration
int GetPercentCompleted()
Returns
| Type | Description |
|---|---|
| System.Int32 |
GetPixelSizeX()
Returns the width of the CCD chip pixels in microns.
Declaration
double GetPixelSizeX()
Returns
| Type | Description |
|---|---|
| System.Double |
GetPixelSizeY()
Returns the height of the CCD chip pixels in microns.
Declaration
double GetPixelSizeY()
Returns
| Type | Description |
|---|---|
| System.Double |
GetReadoutMode()
Indicates the canera's readout mode as an index into the array ReadoutModes. ReadoutMode is an index into the array ReadoutModes and returns the desired readout mode for the camera. Defaults to 0 if not set.
Declaration
int GetReadoutMode()
Returns
| Type | Description |
|---|---|
| System.Int32 |
GetReadoutModes()
Get the list of available readout modes. This property provides an array of strings, each of which describes an available readout mode of the camera. At least one string must be present in the list.
Declaration
IList<string> GetReadoutModes()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IList<System.String> |
GetSensorName()
Gets the name of the sensor used within the camera.
Declaration
string GetSensorName()
Returns
| Type | Description |
|---|---|
| System.String |
GetSensorType()
Returns a value indicating whether the sensor is monochrome, or what Bayer matrix it encodes. Please see the ASCOM Help file for more informaiton on the SensorType.
Declaration
SensorType GetSensorType()
Returns
| Type | Description |
|---|---|
| SensorType |
GetStartX()
Gets the subframe start position for the X axis (0 based). If binning is active, value is in binned pixels.
Declaration
int GetStartX()
Returns
| Type | Description |
|---|---|
| System.Int32 |
GetStartY()
Gets the subframe start position for the Y axis (0 based). If binning is active, value is in binned pixels.
Declaration
int GetStartY()
Returns
| Type | Description |
|---|---|
| System.Int32 |
HasShutter()
Indicates whether the camera has a mechanical shutter
Declaration
bool HasShutter()
Returns
| Type | Description |
|---|---|
| System.Boolean |
IsCoolerOn()
Returns the current cooler on/off state.
Declaration
bool IsCoolerOn()
Returns
| Type | Description |
|---|---|
| System.Boolean |
IsFastReadout()
Returns whether Fast Readout Mode is enabled.
Declaration
bool IsFastReadout()
Returns
| Type | Description |
|---|---|
| System.Boolean |
IsImageReady()
Indicates that an image is ready to be downloaded
Declaration
bool IsImageReady()
Returns
| Type | Description |
|---|---|
| System.Boolean |
IsPulseGuiding()
Indicates that the camera is pulse guideing.
Declaration
bool IsPulseGuiding()
Returns
| Type | Description |
|---|---|
| System.Boolean |
PulseGuide(GuideDirection, Int32)
Activates the Camera's mount control sytem to instruct the mount to move in a particular direction for a given period of time
Declaration
void PulseGuide(GuideDirection direction, int duration)
Parameters
| Type | Name | Description |
|---|---|---|
| GuideDirection | direction | Direction of movement |
| System.Int32 | duration | Duration of movement in milli-seconds |
SetBinX(Int32)
Sets the binning factor for the X axis.
Declaration
void SetBinX(int binX)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | binX |
SetBinY(Int32)
Sets the binning factor for the Y axis.
Declaration
void SetBinY(int binY)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | binY |
SetCCDTemperatureSetPoint(Double)
Set the camera's cooler setpoint (degrees Celsius).
Declaration
void SetCCDTemperatureSetPoint(double temperature)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | temperature | Temperature set point in degrees Celsius |
SetCoolerOn(Boolean)
Turns on and off the camera cooler
Declaration
void SetCoolerOn(bool coolerOn)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | coolerOn |
SetFastReadout(Boolean)
Sets whether Fast Readout Mode is enabled.
Declaration
void SetFastReadout(bool fastReadout)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | fastReadout | True to enable fast readout mode |
SetGain(Int32)
Set the camera gain
Declaration
void SetGain(int gain)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | gain | Index of the current camera gain in the Gains string array. |
SetNumX(Int32)
Sets the current subframe width
Declaration
void SetNumX(int numX)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | numX | Sets the subframe width, if binning is active, value is in binned pixels. |
SetNumY(Int32)
Sets the current subframe width
Declaration
void SetNumY(int numY)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | numY | Sets the subframe height, if binning is active, value is in binned pixels. |
SetReadoutMode(Int32)
Sets the ReadoutMode as an index into the array ReadoutModes.
Declaration
void SetReadoutMode(int readoutMode)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | readoutMode |
SetStartX(Int32)
Sets the current subframe X axis start position in binned pixels.
Declaration
void SetStartX(int startX)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | startX | The subframe X axis start position in binned pixels. |
SetStartY(Int32)
Sets the current subframe Y axis start position in binned pixels.
Declaration
void SetStartY(int startY)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | startY | The subframe Y axis start position in binned pixels. |
StartExposure(Double, Boolean)
Starts an exposure. Use ImageReady to check when the exposure is complete.
Declaration
void StartExposure(double duration, bool isLight)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | duration | Duration of exposure in seconds |
| System.Boolean | isLight | True if light frame, false if dark frame. |
StopExposure()
Stops the current exposure, if any. If an exposure is in progress, the readout process is initiated. Ignored if readout is already in process.
Declaration
void StopExposure()