Interface ICameraAsync
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 ICameraAsync : IDeviceAsync
Methods
| Improve this Doc View SourceAbortExposureAsync()
Aborts the current exposure, if any, and returns the camera to Idle state.
Declaration
Task AbortExposureAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
CanAbortExposureAsync()
Indicates whether the camera can abort exposures.
Declaration
Task<bool> CanAbortExposureAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | Returns true if the camera can abort exposures; false if not. |
CanAsymmetricBinAsync()
Indicates whether the camera supports asymmetric binning
Declaration
Task<bool> CanAsymmetricBinAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | Returns true if the camera supports asymmetric binning; false if not. |
CanFastReadoutAsync()
Indicates whether the camera has a fast readout mode.
Declaration
Task<bool> CanFastReadoutAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
CanGetCoolerPowerAsync()
Indicates whether the camera's cooler power setting can be read.
Declaration
Task<bool> CanGetCoolerPowerAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
CanPulseGuideAsync()
Returns a flag indicating whether this camera supports pulse guiding
Declaration
Task<bool> CanPulseGuideAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
CanSetCCDTemperatureAsync()
Returns a flag indicating whether this camera supports setting the CCD temperature
Declaration
Task<bool> CanSetCCDTemperatureAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
CanStopExposureAsync()
Returns a flag indicating whether this camera can stop an exposure that is in progress
Declaration
Task<bool> CanStopExposureAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
GetBayerOffsetXAsync()
Returns the X offset of the Bayer matrix, as defined in SensorType.
Declaration
Task<int> GetBayerOffsetXAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> |
GetBayerOffsetYAsync()
Returns the Y offset of the Bayer matrix, as defined in SensorType.
Declaration
Task<int> GetBayerOffsetYAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> |
GetBinXAsync()
Sets the binning factor for the X axis.
Declaration
Task<int> GetBinXAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> |
GetBinYAsync()
Returns the binning factor for the Y axis.
Declaration
Task<int> GetBinYAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> |
GetCameraStateAsync()
Returns the current camera operational state
Declaration
Task<CameraState> GetCameraStateAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<CameraState> |
GetCameraXSizeAsync()
Returns the width of the CCD camera chip in unbinned pixels.
Declaration
Task<int> GetCameraXSizeAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> |
GetCameraYSizeAsync()
Returns the height of the CCD camera chip in unbinned pixels.
Declaration
Task<int> GetCameraYSizeAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> |
GetCCDTemperatureAsync()
Returns the current CCD temperature in degrees Celsius.
Declaration
Task<double> GetCCDTemperatureAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Double> |
GetCCDTemperatureSetPointAsync()
Returns the current camera cooler setpoint in degrees Celsius.
Declaration
Task<double> GetCCDTemperatureSetPointAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Double> |
GetCoolerPowerAsync()
Returns the present cooler power level, in percent.
Declaration
Task<double> GetCoolerPowerAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Double> |
GetElectronPerADUAsync()
Returns the gain of the camera in photoelectrons per A/D unit.
Declaration
Task<double> GetElectronPerADUAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Double> |
GetExposureMaxAsync()
Returns the maximum exposure time supported by StartExposure.
Declaration
Task<double> GetExposureMaxAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Double> |
GetExposureMinAsync()
Returns the Minimium exposure time in seconds that the camera supports through StartExposure.
Declaration
Task<double> GetExposureMinAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Double> |
GetExposureResolutionAsync()
Returns the smallest increment in exposure time supported by StartExposure.
Declaration
Task<double> GetExposureResolutionAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Double> |
GetFullWellCapacityAsync()
Reports the full well capacity of the camera in electrons, at the current camera settings (binning, SetupDialog settings, etc.).
Declaration
Task<double> GetFullWellCapacityAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Double> |
GetGainAsync()
Returns an index into the Gains array for the selected camera gain.
Declaration
Task<int> GetGainAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> |
GetGainMaxAsync()
Returns the maximum value of Gain.
Declaration
Task<int> GetGainMaxAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> |
GetGainMinAsync()
Returns the minimum value of Gain.
Declaration
Task<int> GetGainMinAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> |
GetGainsAsync()
Returns the Gains supported by the camera.
Declaration
Task<IList<string>> GetGainsAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IList<System.String>> |
GetHeatSinkTemperatureAsync()
Returns the current heat sink temperature (called "ambient temperature" by some manufacturers) in degrees Celsius.
Declaration
Task<double> GetHeatSinkTemperatureAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Double> |
GetImageArrayAsync()
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
Task<Array> GetImageArrayAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Array> |
GetImageArrayVariantAsync()
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
Task<Array> GetImageArrayVariantAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Array> |
GetLastExposureDurationAsync()
Get the duration of the last exposure in seconds (i.e. shutter open time).
Declaration
Task<double> GetLastExposureDurationAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Double> |
GetLastExposureStartTimeAsync()
Start time of the last exposure in FITS standard format. (CCYY-MM-DDThh:mm:ss[.sss...])
Declaration
Task<DateTime> GetLastExposureStartTimeAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.DateTime> |
GetMaxADUAsync()
Reports the maximum ADU value the camera can produce.
Declaration
Task<int> GetMaxADUAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> |
GetMaxBinXAsync()
Returns the maximum allowed binning for the X camera axis
Declaration
Task<int> GetMaxBinXAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> |
GetMaxBinYAsync()
Returns the maximum allowed binning for the Y camera axis
Declaration
Task<int> GetMaxBinYAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> |
GetNumXAsync()
Returns the current subframe width, if binning is active, value is in binned pixels.
Declaration
Task<int> GetNumXAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> |
GetNumYAsync()
Returns the current subframe height, if binning is active, value is in binned pixels.
Declaration
Task<int> GetNumYAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> |
GetPercentCompletedAsync()
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
Task<int> GetPercentCompletedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> |
GetPixelSizeXAsync()
Returns the width of the CCD chip pixels in microns.
Declaration
Task<double> GetPixelSizeXAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Double> |
GetPixelSizeYAsync()
Returns the height of the CCD chip pixels in microns.
Declaration
Task<double> GetPixelSizeYAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Double> |
GetReadoutModeAsync()
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
Task<int> GetReadoutModeAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> |
GetReadoutModesAsync()
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
Task<IList<string>> GetReadoutModesAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IList<System.String>> |
GetSensorNameAsync()
Gets the name of the sensor used within the camera.
Declaration
Task<string> GetSensorNameAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> |
GetSensorTypeAsync()
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
Task<SensorType> GetSensorTypeAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<SensorType> |
GetStartXAsync()
Gets the subframe start position for the X axis (0 based). If binning is active, value is in binned pixels.
Declaration
Task<int> GetStartXAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> |
GetStartYAsync()
Gets the subframe start position for the Y axis (0 based). If binning is active, value is in binned pixels.
Declaration
Task<int> GetStartYAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> |
HasShutterAsync()
Indicates whether the camera has a mechanical shutter
Declaration
Task<bool> HasShutterAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
IsCoolerOnAsync()
Returns the current cooler on/off state.
Declaration
Task<bool> IsCoolerOnAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
IsFastReadoutAsync()
Returns whether Fast Readout Mode is enabled.
Declaration
Task<bool> IsFastReadoutAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
IsImageReadyAsync()
Indicates that an image is ready to be downloaded
Declaration
Task<bool> IsImageReadyAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
IsPulseGuidingAsync()
Indicates that the camera is pulse guideing.
Declaration
Task<bool> IsPulseGuidingAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
PulseGuideAsync(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
Task PulseGuideAsync(GuideDirection direction, int duration)
Parameters
Type | Name | Description |
---|---|---|
GuideDirection | direction | Direction of movement |
System.Int32 | duration | Duration of movement in milli-seconds |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetBinXAsync(Int32)
Returns the binning factor for the X axis.
Declaration
Task SetBinXAsync(int binX)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | binX |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetBinYAsync(Int32)
Returns the binning factor for the Y axis.
Declaration
Task SetBinYAsync(int binY)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | binY |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetCCDTemperatureSetPointAsync(Double)
Set the camera's cooler setpoint (degrees Celsius).
Declaration
Task SetCCDTemperatureSetPointAsync(double temperature)
Parameters
Type | Name | Description |
---|---|---|
System.Double | temperature | Temperature set point in degrees Celsius |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetCoolerOnAsync(Boolean)
Turns on and off the camera cooler
Declaration
Task SetCoolerOnAsync(bool coolerOn)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | coolerOn |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetFastReadoutAsync(Boolean)
Sets whether Fast Readout Mode is enabled.
Declaration
Task SetFastReadoutAsync(bool fastReadout)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | fastReadout | True to enable fast readout mode |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetGainAsync(Int32)
Set the camera gain
Declaration
Task SetGainAsync(int gain)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | gain | Index of the current camera gain in the Gains string array. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetNumXAsync(Int32)
Sets the current subframe width
Declaration
Task SetNumXAsync(int numX)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | numX | Sets the subframe width, if binning is active, value is in binned pixels. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetNumYAsync(Int32)
Sets the current subframe width
Declaration
Task SetNumYAsync(int numY)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | numY | Sets the subframe height, if binning is active, value is in binned pixels. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetReadoutModeAsync(Int32)
Sets the ReadoutMode as an index into the array ReadoutModes.
Declaration
Task SetReadoutModeAsync(int readoutMode)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | readoutMode |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetStartXAsync(Int32)
Sets the current subframe X axis start position in binned pixels.
Declaration
Task SetStartXAsync(int startX)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | startX | The subframe X axis start position in binned pixels. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetStartYAsync(Int32)
Sets the current subframe Y axis start position in binned pixels.
Declaration
Task SetStartYAsync(int startY)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | startY | The subframe Y axis start position in binned pixels. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
StartExposureAsync(Double, Boolean)
Starts an exposure. Use ImageReady to check when the exposure is complete.
Declaration
Task StartExposureAsync(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. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
StopExposureAsync()
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
Task StopExposureAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |