Click or drag to resize

ICameraV3Gain Property

This is an existing ICameraV2 property and its interface definition has not been changed. The Remarks section has been clarified to describe the two gain management modes.

The camera's gain (GAIN VALUE MODE) OR the index of the selected camera gain description in the Gains array (GAINS INDEX MODE)

Namespace:  ASCOM.DeviceInterface
Assembly:  ASCOM.DeviceInterfaces (in ASCOM.DeviceInterfaces.dll) Version: 3c9121baba46811fe6e53a58a05935662261416d
Syntax
short Gain { get; set; }

Return Value

Type: Int16

GAIN VALUE MODE: The current gain value.

OR

GAINS INDEX MODE: Index into the Gains array for the current camera gain
Exceptions
ExceptionCondition
PropertyNotImplementedExceptionWhen neither GAINS INDEX mode nor GAIN VALUE mode are supported.
NotConnectedExceptionWhen the information is not available. (Some drivers may require an active connection in order to retrieve necessary information from the camera.)
InvalidValueExceptionWhen the supplied value is not valid.
Remarks

This is an optional property and can throw a PropertyNotImplementedException if Gain is not supported by the camera.

The Gain property is used to adjust the gain setting of the camera and has two modes of operation:
  • GAIN VALUE MODE - The Gain property is a direct numeric representation of the camera's gain.
  • GAINS INDEX MODE - The Gain property is the selected gain's index within the Gains array of textual gain descriptions.

A driver can support none, one or both gain modes depending on the camera's capabilities. However, only one mode can be active at any one moment because both modes share the Gain property to return the gain value. Client applications can determine which mode is operational by reading the GainMin, GainMax and Gain properties. If a property can be read then its associated mode is active, if it throws a PropertyNotImplementedException then the mode is not active.

If a driver supports both modes the astronomer must be able to select the required mode through the driver Setup dialogue.

During driver initialisation the driver must set Gain to a valid value.

Please note that ReadoutMode may in some cases affect the gain of the camera; if so, the driver must be ensure that the two properties do not conflict if both are used.

This is only available in Camera Interface Version 2 and later.

See Also