Offsets
}
}
- ///
- /// Camera's sub-exposure interval
- ///
- /// When the camera does not support sub exposure configuration.
- /// When the supplied value is not valid.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// This is an optional property and can throw a NotImplementedException.
- /// This is only available in Camera Interface Version 3 and later.
- ///
+ ///
public double SubExposureDuration
{
get
@@ -1927,92 +530,25 @@ public double SubExposureDuration
}
}
- ///
- /// Aborts the current exposure, if any, and returns the camera to Idle state.
- ///
- ///
- /// May throw a not implemented exception if CanAbortExpsoure is false.
- /// NOTES:
- ///
- /// - Must throw exception if camera is not idle and abort is unsuccessful (or not possible, e.g. during download).
- /// - Must throw exception if hardware or communications error occurs.
- /// - Must NOT throw an exception if the camera is already idle.
- ///
- ///
- /// If CanAbortExposure is false.
- /// Thrown if abort is not currently possible (e.g. during download).
- /// Thrown if the driver is not connected.
- /// Thrown if a communications error occurs, or if the abort fails.
+ ///
public void AbortExposure()
{
Device.AbortExposure();
}
- ///
- /// Activates the Camera's mount control system to instruct the mount to move in a particular direction for a given period of time
- ///
- ///
- /// May throw a not implemented exception if this camera does not support PulseGuide
- /// This method must be implemented asynchronously using as the completion property.
- ///
- /// The (symbolic) values for GuideDirections are:
- ///
- /// Constant Value Description
- /// - guideNorth 0 North (+ declination/elevation)
- /// - guideSouth 1 South (- declination/elevation)
- /// - guideEast 2 East (+ right ascension/azimuth)
- /// - guideWest 3 West (+ right ascension/azimuth)
- ///
- ///
- /// Note: directions are nominal and may depend on exact mount wiring.
- /// must be opposite , and
- /// must be opposite .
- ///
- /// The direction of movement.
- /// The duration of movement in milli-seconds.
- /// PulseGuide command is unsupported
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public void PulseGuide(GuideDirection Direction, int Duration)
{
Device.PulseGuide(Direction, Duration);
}
- ///
- /// Starts an exposure. Use to check when the exposure is complete.
- ///
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// Must be implemented asynchronously using to determine if the exposure has been successfully completed and the image data is ready for access via .
- /// A dark frame or bias exposure may be shorter than the V2 value and for a bias frame can be zero.
- /// Check the value of Light and allow exposures down to 0 seconds
- /// if Light is false. If the hardware will not
- /// support an exposure duration of zero then, for dark and bias frames, set it to the minimum that is possible.
- /// Some applications will set an exposure time of zero for bias frames so it's important that the driver allows this.
- ///
- /// Duration of exposure in seconds, can be zero if Light is false
- /// true for light frame, false for dark frame (ignored if no shutter)
- /// , , ,
- /// , , , or Duration parameters are invalid.
- /// is false and !=
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public void StartExposure(double Duration, bool Light)
{
Device.StartExposure(Duration, Light);
}
- ///
- /// Stops the current exposure, if any.
- ///
- ///
- /// May throw a not implemented exception
- /// Must be implemented asynchronously using to determine if the exposure has been successfully completed and the image data is ready for access via .
- /// If an exposure is in progress, the readout process is initiated. Ignored if readout is already in process.
- ///
- /// Must throw an exception if CanStopExposure is false
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public void StopExposure()
{
Device.StopExposure();
diff --git a/ASCOM.Com/ASCOM.Com.DriverAccess/CoverCalibrator.cs b/ASCOM.Com/ASCOM.Com.DriverAccess/CoverCalibrator.cs
index 4cb7434c..f431138e 100644
--- a/ASCOM.Com/ASCOM.Com.DriverAccess/CoverCalibrator.cs
+++ b/ASCOM.Com/ASCOM.Com.DriverAccess/CoverCalibrator.cs
@@ -9,6 +9,9 @@ namespace ASCOM.Com.DriverAccess
///
/// CoverCalibrator device class
///
+#if NET8_0_OR_GREATER
+ [System.Runtime.Versioning.SupportedOSPlatform("windows")]
+#endif
public class CoverCalibrator : ASCOMDevice, ICoverCalibratorV2
{
@@ -63,144 +66,43 @@ public CoverCalibrator(string ProgID, ILogger logger) : base(ProgID)
#region ICoverCalibratorV1 members
- ///
- /// Returns the state of the device cover, if present, otherwise returns "NotPresent"
- ///
- ///
- /// This is a mandatory property that must return a value, it must not throw a .
- /// Whenever the cover is moving both must be True and CoverState must be .
- /// The state must only be returned if the device is unaware of the cover's state e.g. if the hardware does not report the open / closed state and the cover has just been powered on.
- /// Clients do not need to take special action if this state is returned, they must carry on as usual, issuing or commands as required.
- /// If the cover hardware cannot report its state, the device could mimic this by recording the last configured state and returning this. Driver authors or device manufacturers may also wish to offer users
- /// the capability of powering up in a known state e.g. Open or Closed and driving the hardware to this state when Connected is set .
- /// This property is intended to be available under all but the most disastrous driver conditions.If something has gone wrong, the CoverState must be
- /// rather than throwing an exception.
- ///
+ ///
public CoverStatus CoverState => (CoverStatus)Device.CoverState;
- ///
- /// Returns the state of the calibration device, if present, otherwise returns "NotPresent"
- ///
- ///
- /// This is a mandatory property that must return a value, it must not throw a .
- /// Whenever the calibrator is changing both must be True and CalibratorState must be .
- /// The state must only be returned if the device is unaware of the calibrator's state e.g. if the hardware does not report the device's state and
- /// the calibrator has just been powered on. Clients do not need to take special action if this state is returned, they must carry on as usual, issuing and
- /// commands as required.
- /// If the calibrator hardware cannot report its state, the device could mimic this by recording the last configured state and returning this. Driver authors or device manufacturers may also wish to offer users
- /// the capability of powering up in a known state and driving the hardware to this state when Connected is set .
- /// This property is intended to be available under all but the most disastrous driver conditions.If something has gone wrong, the CoverState must be
- /// rather than throwing an exception.
- ///
+ ///
public CalibratorStatus CalibratorState => (CalibratorStatus)Device.CalibratorState;
- ///
- /// Returns the current calibrator brightness in the range 0 (completely off) to (fully on)
- ///
- /// When returns .
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// This is a mandatory property that must always return a value for a calibrator device
- /// The brightness value must be 0 when the is
- ///
+ ///
public int Brightness => Device.Brightness;
- ///
- /// The Brightness value that makes the calibrator deliver its maximum illumination.
- ///
- /// When returns .
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// This is a mandatory property for a calibrator device and must always return a value within the integer range 1 to 2,147,483,647
- /// A value of 1 indicates that the calibrator can only be "off" or "on".
- /// A value of 10 indicates that the calibrator has 10 discreet illumination levels in addition to "off".
- /// The value for this parameter should be determined by the driver author or device manufacturer based on the capabilities of the hardware used in the calibrator.
- ///
+ ///
public int MaxBrightness => Device.MaxBrightness;
- ///
- /// Initiates cover opening if a cover is present
- ///
- /// When returns .
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// While the cover is opening must return .
- /// When the cover is open must return .
- /// If an error condition arises while moving between states, must be set to rather than .
- ///
+ ///
public void OpenCover()
{
Device.OpenCover();
}
- ///
- /// Initiates cover closing if a cover is present
- ///
- /// When returns .
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// While the cover is closing must return .
- /// When the cover is closed must return .
- /// If an error condition arises while moving between states, must be set to rather than .
- ///
+ ///
public void CloseCover()
{
Device.CloseCover();
}
- ///
- /// Stops any cover movement that may be in progress if a cover is present and cover movement can be interrupted.
- ///
- /// When returns or if cover movement cannot be interrupted.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// This must stop any cover movement as soon as possible and set a of ,
- /// or as appropriate.
- /// If cover movement cannot be interrupted, a must be thrown.
- ///
+ ///
public void HaltCover()
{
Device.HaltCover();
}
- ///
- /// Turns the calibrator on at the specified brightness if the device has calibration capability
- ///
- /// Sets the required calibrator illumination brightness in the range 0 (fully off) to (fully on).
- /// When returns .
- /// When the supplied brightness parameter is outside the range 0 to .
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// This is a mandatory method for a calibrator device that must be implemented.
- /// If the calibrator takes some time to stabilise, the must return . When the
- /// calibrator is ready for use must return .
- /// For devices with both cover and calibrator capabilities, this method may change the , if required.
- /// If an error condition arises while turning on the calibrator, must be set to rather than .
- ///
+ ///
public void CalibratorOn(int Brightness)
{
Device.CalibratorOn(Brightness);
}
- ///
- /// Turns the calibrator off if the device has calibration capability
- ///
- /// When returns .
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// This is a mandatory method for a calibrator device.
- /// If the calibrator requires time to safely stabilise after use, must return . When the
- /// calibrator is safely off must return .
- /// For devices with both cover and calibrator capabilities, this method will return the to its status prior to calling .
- /// If an error condition arises while turning off the calibrator, must be set to rather than .
- ///
+ ///
public void CalibratorOff()
{
Device.CalibratorOff();
@@ -210,20 +112,7 @@ public void CalibratorOff()
#region ICoverCalibratorV2 members
- ///
- /// Flag showing whether a calibrator brightness state change is in progress.
- ///
- /// If the device is not connected
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. Include sufficient detail in the message text to enable the issue to be accurately diagnosed by someone other than yourself.
- ///
- /// True while the calibrator brightness is not stable following a or command.
- ///
- ///
- /// This is a mandatory property and must not throw a .
- ///
- /// This property must throw an exception ff an issue arises while changing calibrator brightness. The exception must continue to be thrown until a new or
- /// command is received.
- ///
+ ///
public bool CalibratorChanging
{
get
@@ -240,17 +129,7 @@ public bool CalibratorChanging
}
}
- ///
- /// Flag showing whether the cover is moving.
- ///
- /// If the device is not connected
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. Include sufficient detail in the message text to enable the issue to be accurately diagnosed by someone other than yourself.
- ///
- /// True while the cover is in motion following an or command.
- ///
- ///
- /// This is a mandatory property and must not throw a .
- ///
+ ///
public bool CoverMoving
{
get
diff --git a/ASCOM.Com/ASCOM.Com.DriverAccess/Dome.cs b/ASCOM.Com/ASCOM.Com.DriverAccess/Dome.cs
index c89f1e15..1c72b68d 100644
--- a/ASCOM.Com/ASCOM.Com.DriverAccess/Dome.cs
+++ b/ASCOM.Com/ASCOM.Com.DriverAccess/Dome.cs
@@ -9,6 +9,9 @@ namespace ASCOM.Com.DriverAccess
///
/// Dome device class
///
+#if NET8_0_OR_GREATER
+ [System.Runtime.Versioning.SupportedOSPlatform("windows")]
+#endif
public class Dome : ASCOMDevice, IDomeV3
{
@@ -63,12 +66,7 @@ public Dome(string ProgID, ILogger logger) : base(ProgID)
#region IDomeV2 and IDomeV3
- ///
- /// A string containing only the major and minor version of the driver.
- /// This must be in the form "n.n".
- /// Not to be confused with the InterfaceVersion property, which is the version of this specification supported by the driver (currently 2).
- ///
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public new string DriverVersion
{
get
@@ -81,303 +79,100 @@ public Dome(string ProgID, ILogger logger) : base(ProgID)
}
}
- ///
- /// The dome altitude (degrees, horizon zero and increasing positive to 90 zenith).
- ///
- /// If the property is not implemented
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Raises an error only if no altitude control. If actual dome altitude can not be read, then reports back the last slew position.
- ///
+ ///
public double Altitude => Device.Altitude;
- ///
- /// Indicates whether the dome is in the home position. Raises an error if not supported.
- ///
- /// This is normally used following a operation. The value is reset with any azimuth slew operation that moves the dome away from the home position.
- ///
- ///
- /// may also become true during normal slew operations, if the dome passes through the home position and the dome controller hardware is capable of detecting that;
- /// or at the end of a slew operation if the dome comes to rest at the home position.
- ///
- ///
- /// If the property is not implemented
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// The home position is normally defined by a hardware sensor positioned around the dome circumference and represents a fixed, known azimuth reference.
- /// For some devices, the home position may represent a small range of azimuth values, rather than a discrete value, since dome inertia, the resolution of the home position sensor and/or the azimuth encoder may be
- /// insufficient to return the exact same azimuth value on each occasion. Some dome controllers, on the other hand, will always force the azimuth reading to a fixed value whenever the home position sensor is active.
- /// Because of these potential differences in behaviour, applications should not rely on the reported azimuth position being identical each time is set true.
- ///
- /// [ASCOM-135] TPL - Updated documentation
+ ///
public bool AtHome => Device.AtHome;
- ///
- /// True if the dome is in the programmed park position.
- ///
- /// If the property is not implemented
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Set only following a operation and reset with any slew operation. Raises an error if not supported.
- ///
+ ///
public bool AtPark => Device.AtPark;
- ///
- /// The dome azimuth (degrees, North zero and increasing clockwise, i.e., 90 East, 180 South, 270 West)
- ///
- /// If the property is not implemented
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// Raises an error only if no azimuth control. If actual dome azimuth can not be read, then reports back last slew position
+ ///
public double Azimuth => Device.Azimuth;
- ///
- /// True if driver can do a search for home position.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- ///
+ ///
public bool CanFindHome => Device.CanFindHome;
- ///
- /// True if driver is capable of setting dome altitude.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- ///
+ ///
public bool CanPark => Device.CanPark;
- ///
- /// True if driver is capable of setting dome altitude.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- ///
+ ///
public bool CanSetAltitude => Device.CanSetAltitude;
- ///
- /// True if driver is capable of setting dome azimuth.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- ///
+ ///
public bool CanSetAzimuth => Device.CanSetAzimuth;
- ///
- /// True if driver can set the dome park position.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- ///
+ ///
public bool CanSetPark => Device.CanSetPark;
- ///
- /// True if driver is capable of automatically operating shutter.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- ///
+ ///
public bool CanSetShutter => Device.CanSetShutter;
- ///
- /// True if the dome hardware supports slaving to a telescope.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// See the notes for the property.
- ///
+ ///
public bool CanSlave => Device.CanSlave;
- ///
- /// True if driver is capable of synchronizing the dome azimuth position using the method.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- ///
+ ///
public bool CanSyncAzimuth => Device.CanSyncAzimuth;
- ///
- /// Status of the dome shutter or roll-off roof.
- ///
- /// If the property is not implemented
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Raises an error only if no shutter control. If actual shutter status can not be read, then reports back the last shutter state.
- ///
+ ///
public ShutterState ShutterStatus => (ShutterState)Device.ShutterStatus;
- ///
- /// True if the dome is slaved to the telescope in its hardware, else False.
- ///
- /// If Slaved can not be set.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Slaved Read must be implemented and must not throw a NotImplementedException.
- /// Slaved Write can throw a NotImplementedException.
- /// Set this property to True to enable dome-telescope hardware slaving, if supported (see ). Raises an exception on any attempt to set
- /// this property if hardware slaving is not supported). Always returns False if hardware slaving is not supported.
- ///
+ ///
public bool Slaved { get => Device.Slaved; set => Device.Slaved = value; }
- ///
- /// True if any part of the dome is currently moving, False if all dome components are steady.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Slewing must be implemented and must not throw a NotImplementedException.
- /// Raises an error if is True, if not supported, if a communications failure occurs, or if the dome can not reach indicated azimuth.
- ///
+ ///
public bool Slewing => Device.Slewing;
- ///
- /// Immediately cancel current dome operation.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// Calling this method will immediately disable hardware slewing ( will become False). Raises an error if a communications failure occurs, or if the command is known to have failed.
- ///
+ ///
public void AbortSlew()
{
Device.AbortSlew();
}
- ///
- /// Close shutter or otherwise shield telescope from the sky.
- ///
- /// If the method is not implemented
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public void CloseShutter()
{
Device.CloseShutter();
}
- ///
- /// Start operation to search for the dome home position.
- ///
- /// If the method is not implemented
- /// Thrown if is .
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// After Home position is established initializes to the default value and sets the flag.
- /// Exception if not supported or communications failure. Raises an error if is True.
- ///
+ ///
public void FindHome()
{
Device.FindHome();
}
- ///
- /// Open shutter or otherwise expose telescope to the sky.
- ///
- /// If the method is not implemented
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Raises an error if not supported or if a communications failure occurs.
- ///
+ ///
public void OpenShutter()
{
Device.OpenShutter();
}
- ///
- /// Rotate dome in azimuth to park position.
- ///
- /// If the method is not implemented
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// After assuming programmed park position, sets flag. Raises an error if is True, or if not supported, or if a communications failure has occurred.
- ///
+ ///
public void Park()
{
Device.Park();
}
- ///
- /// Set the current azimuth, altitude position of dome to be the park position.
- ///
- /// If the method is not implemented
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Raises an error if not supported or if a communications failure occurs.
- ///
+ ///
public void SetPark()
{
Device.SetPark();
}
- ///
- /// Slew the dome to the given altitude position.
- ///
- /// If the method is not implemented
- /// If the supplied altitude is outside the range 0..90 degrees.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Raises an error if is True, if not supported, if a communications failure occurs, or if the dome can not reach indicated altitude.
- ///
- /// Target dome altitude (degrees, horizon zero and increasing positive to 90 zenith)
+ ///
public void SlewToAltitude(double Altitude)
{
Device.SlewToAltitude(Altitude);
}
- ///
- /// Slew the dome to the given azimuth position.
- ///
- /// If the method is not implemented
- /// If the supplied azimuth is outside the range 0..360 degrees.
- /// Thrown if is .
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Raises an error if is True, if not supported, if a communications failure occurs, or if the dome can not reach indicated azimuth.
- ///
- /// Target azimuth (degrees, North zero and increasing clockwise. i.e., 90 East, 180 South, 270 West)
+ ///
public void SlewToAzimuth(double Azimuth)
{
Device.SlewToAzimuth(Azimuth);
}
- ///
- /// Synchronize the current position of the dome to the given azimuth.
- ///
- /// If the method is not implemented
- /// If the supplied azimuth is outside the range 0..360 degrees.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Raises an error if not supported or if a communications failure occurs.
- ///
- /// Target azimuth (degrees, North zero and increasing clockwise. i.e., 90 East, 180 South, 270 West)
+ ///
public void SyncToAzimuth(double Azimuth)
{
Device.SyncToAzimuth(Azimuth);
diff --git a/ASCOM.Com/ASCOM.Com.DriverAccess/FilterWheel.cs b/ASCOM.Com/ASCOM.Com.DriverAccess/FilterWheel.cs
index b3c6111c..271d959a 100644
--- a/ASCOM.Com/ASCOM.Com.DriverAccess/FilterWheel.cs
+++ b/ASCOM.Com/ASCOM.Com.DriverAccess/FilterWheel.cs
@@ -9,6 +9,9 @@ namespace ASCOM.Com.DriverAccess
///
/// FilterWheel device class
///
+#if NET8_0_OR_GREATER
+ [System.Runtime.Versioning.SupportedOSPlatform("windows")]
+#endif
public class FilterWheel : ASCOMDevice, IFilterWheelV3
{
@@ -63,14 +66,7 @@ public FilterWheel(string ProgID, ILogger logger) : base(ProgID)
#region IFilterWheelV2 and IFilterWheelV3
- ///
- /// Returns a description of the driver, such as manufacturer and model
- /// number. Any ASCII characters may be used. The string shall not exceed 68
- /// characters (for compatibility with FITS headers).
- ///
- /// The description.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public new string Description
{
get
@@ -83,14 +79,7 @@ public FilterWheel(string ProgID, ILogger logger) : base(ProgID)
}
}
- ///
- /// Descriptive and version information about this ASCOM driver.
- /// This string may contain line endings and may be hundreds to thousands of characters long.
- /// It is intended to display detailed information on the ASCOM driver, including version and copyright data.
- /// See the Description property for descriptive info on the telescope itself.
- /// To get the driver version in a parseable string, use the DriverVersion property.
- ///
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public new string DriverInfo
{
get
@@ -103,12 +92,7 @@ public FilterWheel(string ProgID, ILogger logger) : base(ProgID)
}
}
- ///
- /// A string containing only the major and minor version of the driver.
- /// This must be in the form "n.n".
- /// Not to be confused with the InterfaceVersion property, which is the version of this specification supported by the driver (currently 2).
- ///
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public new string DriverVersion
{
get
@@ -121,10 +105,7 @@ public FilterWheel(string ProgID, ILogger logger) : base(ProgID)
}
}
- ///
- /// The short name of the driver, for display purposes
- ///
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public new string Name
{
get
@@ -137,47 +118,13 @@ public FilterWheel(string ProgID, ILogger logger) : base(ProgID)
}
}
- ///
- /// Focus offset of each filter in the wheel
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// For each valid slot number (from 0 to N-1), reports the focus offset for the given filter position. These values are focuser and filter dependent, and would usually be set up by the user via
- /// the SetupDialog. The number of slots N can be determined from the length of the array. If focuser offsets are not available, then it should report back 0 for all array values.
- ///
+ ///
public int[] FocusOffsets => Device.FocusOffsets;
- ///
- /// Name of each filter in the wheel
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// For each valid slot number (from 0 to N-1), reports the name given to the filter position. These names would usually be set up by the user via the
- /// SetupDialog. The number of slots N can be determined from the length of the array. If filter names are not available, then it should report back "Filter 1", "Filter 2", etc.
- ///
+ ///
public string[] Names => Device.Names;
- ///
- /// Sets or returns the current filter wheel position
- ///
- /// Must throw an InvalidValueException if an invalid position is set
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a PropertyNotImplementedException.
- ///This is an asynchronous operation: Writing to Position must return as soon as the filter change operation has been successfully started. Reading the Position property must return -1 while the change
- /// is in progress. After the requested position has been successfully reached and motion stops, reading Position must return the requested new filter number.
- /// Write a position number between 0 and N-1, where N is the number of filter slots (see ). Starts filter wheel rotation immediately. Reading
- /// the property gives current slot number (if wheel stationary) or -1 if wheel is moving.
- /// Returning a position of -1 is mandatory while the filter wheel is in motion; valid slot numbers must not be reported back while the filter wheel is rotating past filter positions.
- /// Note
- /// Some filter wheels are built into the camera (one driver, two interfaces). Some cameras may not actually rotate the wheel until the exposure is triggered. In this case, the written value is available
- /// immediately as the read value, and -1 is never produced.
- ///
+ ///
public short Position { get => Device.Position; set => Device.Position = value; }
#endregion
diff --git a/ASCOM.Com/ASCOM.Com.DriverAccess/Focuser.cs b/ASCOM.Com/ASCOM.Com.DriverAccess/Focuser.cs
index 89560d2e..27f69104 100644
--- a/ASCOM.Com/ASCOM.Com.DriverAccess/Focuser.cs
+++ b/ASCOM.Com/ASCOM.Com.DriverAccess/Focuser.cs
@@ -9,6 +9,9 @@ namespace ASCOM.Com.DriverAccess
///
/// Focuser device class
///
+#if NET8_0_OR_GREATER
+ [System.Runtime.Versioning.SupportedOSPlatform("windows")]
+#endif
public class Focuser : ASCOMDevice, IFocuserV4
{
@@ -63,12 +66,7 @@ public Focuser(string ProgID, ILogger logger) : base(ProgID)
#region IFocuserV3 and IFocuserV4
- ///
- /// Set True to enable the link. Set False to disable the link.
- /// You can also read the property to check whether it is connected.
- ///
- /// true if connected; otherwise, false.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public new bool Connected
{
get
@@ -93,14 +91,7 @@ public Focuser(string ProgID, ILogger logger) : base(ProgID)
}
}
- ///
- /// Returns a description of the driver, such as manufacturer and model
- /// number. Any ASCII characters may be used. The string shall not exceed 68
- /// characters (for compatibility with FITS headers).
- ///
- /// The description.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public new string Description
{
get
@@ -113,14 +104,7 @@ public Focuser(string ProgID, ILogger logger) : base(ProgID)
}
}
- ///
- /// Descriptive and version information about this ASCOM driver.
- /// This string may contain line endings and may be hundreds to thousands of characters long.
- /// It is intended to display detailed information on the ASCOM driver, including version and copyright data.
- /// See the Description property for descriptive info on the telescope itself.
- /// To get the driver version in a parseable string, use the DriverVersion property.
- ///
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public new string DriverInfo
{
get
@@ -133,12 +117,7 @@ public Focuser(string ProgID, ILogger logger) : base(ProgID)
}
}
- ///
- /// A string containing only the major and minor version of the driver.
- /// This must be in the form "n.n".
- /// Not to be confused with the InterfaceVersion property, which is the version of this specification supported by the driver (currently 2).
- ///
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public new string DriverVersion
{
get
@@ -151,10 +130,7 @@ public Focuser(string ProgID, ILogger logger) : base(ProgID)
}
}
- ///
- /// The short name of the driver, for display purposes
- ///
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public new string Name
{
get
@@ -167,146 +143,40 @@ public Focuser(string ProgID, ILogger logger) : base(ProgID)
}
}
- ///
- /// True if the focuser is capable of absolute position; that is, being commanded to a specific step location.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// Must be implemented
+ ///
public bool Absolute => Device.Absolute;
- ///
- /// True if the focuser is currently moving to a new position. False if the focuser is stationary.
- ///
- /// If the driver is not connected.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// Must be implemented
+ ///
public bool IsMoving => Device.IsMoving;
- ///
- /// Maximum increment size allowed by the focuser;
- /// i.e. the maximum number of steps allowed in one move operation.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented
- /// For most focusers this is the same as the property. This is normally used to limit the Increment display in the host software.
- ///
+ ///
public int MaxIncrement => Device.MaxIncrement;
- ///
- /// Maximum step position permitted.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented
- /// The focuser can step between 0 and . If an attempt is made to move the focuser beyond these limits, it will automatically stop at the limit.
- ///
+ ///
public int MaxStep => Device.MaxStep;
- ///
- /// Current focuser position, in steps.
- ///
- /// If the property is not available for this device.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Can throw a not implemented exception
Valid only for absolute positioning focusers (see the property).
- /// A NotImplementedException exception must be thrown if this device is a relative positioning focuser rather than an absolute position focuser.
- ///
+ ///
public int Position => Device.Position;
- ///
- /// Step size (microns) for the focuser.
- ///
- /// If the focuser does not intrinsically know what the step size is.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// Can throw a not implemented exception
Must throw an exception if the focuser does not intrinsically know what the step size is.
+ ///
public double StepSize => Device.StepSize;
- ///
- /// The state of temperature compensation mode (if available), else always False.
- ///
- /// If is False and an attempt is made to set to true.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// TempComp Read must be implemented and must not throw a NotImplementedException.
- /// TempComp Write can throw a NotImplementedException.
- /// If the property is True, then setting to True puts the focuser into temperature tracking mode; setting it to False will turn off temperature tracking.
- /// If temperature compensation is not available, this property must always return False.
- /// A exception must be thrown if is False and an attempt is made to set to true.
- /// BEHAVIOURAL CHANGE - Platform 6.4
- /// Prior to Platform 6.4, the interface specification mandated that drivers must throw an if a move was attempted when was True, even if the focuser
- /// was able to execute the move safely without disrupting temperature compensation.
- /// Following discussion on ASCOM-Talk in January 2018, the Focuser interface specification has been revised to IFocuserV3, removing the requirement to throw the InvalidOperationException exception. IFocuserV3 compliant drivers
- /// are expected to execute Move requests when temperature compensation is active and to hide any specific actions required by the hardware from the client. For example this could be achieved by disabling temperature compensation, moving the focuser and re-enabling
- /// temperature compensation or simply by moving the focuser with compensation enabled if the hardware supports this.
- /// Conform will continue to pass IFocuserV2 drivers that throw InvalidOperationException exceptions. However, Conform will now fail IFocuserV3 drivers that throw InvalidOperationException exceptions, in line with this revised specification.
- ///
+ ///
public bool TempComp { get => Device.TempComp; set => Device.TempComp = value; }
- ///
- /// True if focuser has temperature compensation available.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented
- /// Will be True only if the focuser's temperature compensation can be turned on and off via the property.
- ///
+ ///
public bool TempCompAvailable => Device.TempCompAvailable;
- ///
- /// Current ambient temperature as measured by the focuser.
- ///
- /// If the property is not available for this device.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// Can throw a not implemented exception
- /// Raises an exception if ambient temperature is not available. Commonly available on focusers with a built-in temperature compensation mode.
- ///
+ ///
public double Temperature => Device.Temperature;
- ///
- /// Immediately stop any focuser motion due to a previous method call.
- ///
- /// Focuser does not support this method.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Can throw a not implemented exception
Some focusers may not support this function, in which case an exception will be raised.
- /// This method must be short-lived; it is defined as synchronous in this specification.
- /// Recommendation: Host software should call this method upon initialization and,
- /// if it fails, disable the Halt button in the user interface.
- ///
+ ///
public void Halt()
{
Device.Halt();
}
- ///
- /// Moves the focuser by the specified amount or to the specified position depending on the value of the property.
- ///
- /// Step distance or absolute position, depending on the value of the property.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// Must be implemented
- /// If the property is True, then this is an absolute positioning focuser. The Move command tells the focuser to move to an exact step position, and the Position parameter
- /// of the Move method is an integer between 0 and .
- /// If the property is False, then this is a relative positioning focuser. The Move command tells the focuser to move in a relative direction, and the Position parameter
- /// of the Move method (in this case, step distance) is an integer between minus and plus .
- /// BEHAVIOURAL CHANGE - Platform 6.4
- /// Prior to Platform 6.4, the interface specification mandated that drivers must throw an if a move was attempted when was True, even if the focuser
- /// was able to execute the move safely without disrupting temperature compensation.
- /// Following discussion on ASCOM-Talk in January 2018, the Focuser interface specification has been revised to IFocuserV3, removing the requirement to throw the InvalidOperationException exception. IFocuserV3 compliant drivers
- /// are expected to execute Move requests when temperature compensation is active and to hide any specific actions required by the hardware from the client. For example this could be achieved by disabling temperature compensation, moving the focuser and re-enabling
- /// temperature compensation or simply by moving the focuser with compensation enabled if the hardware supports this.
- /// Conform will continue to pass IFocuserV2 drivers that throw InvalidOperationException exceptions. However, Conform will now fail IFocuserV3 drivers that throw InvalidOperationException exceptions, in line with this revised specification.
- ///
+ ///
public void Move(int Position)
{
Device.Move(Position);
diff --git a/ASCOM.Com/ASCOM.Com.DriverAccess/ObservingConditions.cs b/ASCOM.Com/ASCOM.Com.DriverAccess/ObservingConditions.cs
index c358e108..7d0bac9e 100644
--- a/ASCOM.Com/ASCOM.Com.DriverAccess/ObservingConditions.cs
+++ b/ASCOM.Com/ASCOM.Com.DriverAccess/ObservingConditions.cs
@@ -9,6 +9,9 @@ namespace ASCOM.Com.DriverAccess
///
/// ObservingConditions device class
///
+#if NET8_0_OR_GREATER
+ [System.Runtime.Versioning.SupportedOSPlatform("windows")]
+#endif
public class ObservingConditions : ASCOMDevice, IObservingConditionsV2
{
@@ -75,428 +78,61 @@ public ObservingConditions(string ProgID, ILogger logger) : base(ProgID)
#region IObservingConditionsV1 and IObservingConditionsV2
- ///
- /// Gets And sets the time period over which observations will be averaged
- ///
- /// Time period (hours) over which to average sensor readings
- /// If the value set is not available for this driver. All drivers must accept 0.0 to specify that an instantaneous value is available.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Mandatory property, must be implemented, can NOT throw a NotImplementedException
- /// This property should return the time period (hours) over which sensor readings will be averaged. If your driver is delivering instantaneous sensor readings this property should return a value of 0.0.
- /// Please resist the temptation to throw exceptions when clients query sensor properties when insufficient time has passed to get a true average reading.
- /// A best estimate of the average sensor value should be returned in these situations.
- ///
+ ///
public double AveragePeriod { get => Device.AveragePeriod; set => Device.AveragePeriod = value; }
- ///
- /// Amount of sky obscured by cloud
- ///
- /// percentage of the sky covered by cloud
- /// If this property is not available.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Optional property, can throw a NotImplementedException
- /// This property should return a value between 0.0 and 100.0 where 0.0 = clear sky and 100.0 = 100% cloud coverage
- ///
+ ///
public double CloudCover => Device.CloudCover;
- ///
- /// Atmospheric dew point at the observatory
- ///
- /// Atmospheric dew point reported in °C.
- /// If this property is not available.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Optional property, can throw a NotImplementedException when the property also throws a NotImplementedException.
- /// Mandatory property, must NOT throw a NotImplementedException when the property is implemented.
- /// The units of this property are degrees Celsius. Driver and application authors can use the ASCOM.Tools.Utilities.ConvertUnits method to convert these units to and from degrees Fahrenheit.
- /// The ASCOM specification requires that DewPoint and Humidity are either both implemented or both throw NotImplementedExceptions. It is not allowed for
- /// one to be implemented and the other to throw a NotImplementedException. The ASCOM.Tools.Utilities component contains methods DewPoint2Humidity and
- /// Humidity2DewPoint to convert DewPoint to Humidity and vice versa given the ambient temperature.
- ///
+ ///
public double DewPoint => Device.DewPoint;
- ///
- /// Atmospheric humidity at the observatory
- ///
- /// Atmospheric humidity (%)
- /// If this property is not available.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Optional property, can throw a NotImplementedException when the property also throws a NotImplementedException.
- /// Mandatory property, must NOT throw a NotImplementedException when the property is implemented.
- /// The ASCOM specification requires that DewPoint and Humidity are either both implemented or both throw NotImplementedExceptions. It is not allowed for
- /// one to be implemented and the other to throw a NotImplementedException. The ASCOM.Tools.Utilities component contains methods DewPoint2Humidity and
- /// Humidity2DewPoint to convert DewPoint to Humidity and vice versa given the ambient temperature.
- /// This property should return a value between 0.0 and 100.0 where 0.0 = 0% relative humidity and 100.0 = 100% relative humidity.
- ///
+ ///
public double Humidity => Device.Humidity;
- ///
- /// Atmospheric pressure at the observatory
- ///
- /// Atmospheric pressure at the observatory (hPa)
- /// If this property is not available.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Optional property, can throw a NotImplementedException
- /// The units of this property are hectoPascals. Client and driver authors can use the method ASCOM.Tools.Utilities.ConvertUnits
- /// to convert these units to and from milliBar, mm of mercury and inches of mercury.
- /// This must be the pressure at the observatory altitude and not the adjusted pressure at sea level.
- /// Please check whether your pressure sensor delivers local observatory pressure or sea level pressure and, if it returns sea level pressure,
- /// adjust this to actual pressure at the observatory's altitude before returning a value to the client.
- /// The ASCOM.Tools.Utilities.ConvertPressure method can be used to effect this adjustment.
- ///
- ///
+ ///
public double Pressure => Device.Pressure;
- ///
- /// Rain rate at the observatory
- ///
- /// Rain rate (mm / hour)
- /// If this property is not available.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Optional property, can throw a NotImplementedException
- /// The units of this property are millimetres per hour. Client and driver authors can use the methodASCOM.Tools.Utilities.ConvertUnits
- /// to convert these units to and from inches per hour.
- /// This property can be interpreted as 0.0 = Dry any positive non-zero value = wet.
- /// Rainfall intensity is classified according to the rate of precipitation:
- ///
- /// - Light rain — when the precipitation rate is less than 2.5 mm (0.098 in) per hour
- /// - Moderate rain — when the precipitation rate is between 2.5 mm (0.098 in) and 10 mm (0.39 in) per hour
- /// - Heavy rain — when the precipitation rate is between 10 mm (0.39 in) and 50 mm (2.0 in) per hour
- /// - Violent rain — when the precipitation rate is > 50 mm (2.0 in) per hour
- ///
- ///
+ ///
public double RainRate => Device.RainRate;
- ///
- /// Sky brightness at the observatory
- ///
- /// Sky brightness (Lux)
- /// If this property is not available.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Optional property, can throw a NotImplementedException
- /// This property returns the sky brightness measured in Lux.
- /// Luminance Examples in Lux
- ///
- ///
- /// IlluminanceSurfaces illuminated by:
- ///
- /// - 0.0001 luxMoonless, overcast night sky (starlight)
- /// - 0.002 luxMoonless clear night sky with airglow
- /// - 0.27–1.0 luxFull moon on a clear night
- /// - 3.4 luxDark limit of civil twilight under a clear sky
- /// - 50 luxFamily living room lights (Australia, 1998)
- /// - 80 luxOffice building hallway/toilet lighting
- /// - 100 luxVery dark overcast day
- /// - 320–500 luxOffice lighting
- /// - 400 luxSunrise or sunset on a clear day.
- /// - 1000 luxOvercast day; typical TV studio lighting
- /// - 10000–25000 luxFull daylight (not direct sun)
- /// - 32000–100000 luxDirect sunlight
- ///
- ///
+ ///
public double SkyBrightness => Device.SkyBrightness;
- ///
- /// Sky quality at the observatory
- ///
- /// Sky quality measured in magnitudes per square arc second
- /// If this property is not available.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Optional property, can throw a NotImplementedException
- /// Sky quality is typically measured in units of magnitudes per square arc second. A sky quality of 20 magnitudes per square arc second means that the
- /// overall sky appears with a brightness equivalent to having 1 magnitude 20 star in each square arc second of sky.
- /// Examples of typical sky quality values were published by Sky and Telescope (http://www.skyandtelescope.com/astronomy-resources/rate-your-skyglow/) and, in slightly adapted form, are reproduced below:
- ///
- ///
- ///
- ///
- ///
- /// |
- /// Sky Quality (mag/arcsec2) |
- ///
- /// Description |
- ///
- ///
- /// |
- /// 22.0 |
- ///
- /// By convention, this is often assumed to be the average brightness of a moonless night sky that's completely free of artificial light pollution. |
- ///
- ///
- /// |
- /// 21.0 |
- ///
- /// This is typical for a rural area with a medium-sized city not far away. It's comparable to the glow of the brightest section of the northern Milky Way, from Cygnus through Perseus. |
- ///
- ///
- /// |
- /// 20.0 |
- ///
- /// This is typical for the outer suburbs of a major metropolis. The summer Milky Way is readily visible but severely washed out. |
- ///
- ///
- /// |
- /// 19.0 |
- ///
- /// Typical for a suburb with widely spaced single-family homes. It's a little brighter than a remote rural site at the end of nautical twilight, when the Sun is 12° below the horizon. |
- ///
- ///
- /// |
- /// 18.0 |
- ///
- /// Bright suburb or dark urban neighborhood. It's also a typical zenith skyglow at a rural site when the Moon is full. The Milky Way is invisible, or nearly so. |
- ///
- ///
- /// |
- /// 17.0 |
- ///
- /// Typical near the center of a major city. |
- ///
- ///
- /// |
- /// 13.0 |
- ///
- /// The zenith skyglow at the end of civil twilight, roughly a half hour after sunset, when the Sun is 6° below the horizon. Venus and Jupiter are easy to see, but bright stars are just beginning to appear. |
- ///
- ///
- /// |
- /// 7.0 |
- ///
- /// The zenith skyglow at sunrise or sunset |
- ///
- ///
- ///
- ///
+ ///
public double SkyQuality => Device.SkyQuality;
- ///
- /// Seeing at the observatory measured as star full width half maximum (FWHM) in arc secs.
- ///
- /// Seeing reported as star full width half maximum (arc seconds)
- /// If this property is not available.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Optional property, can throw a NotImplementedException
- ///
+ ///
public double StarFWHM => Device.StarFWHM;
- ///
- /// Sky temperature at the observatory
- ///
- /// Sky temperature in °C
- /// If this property is not available.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Optional property, can throw a NotImplementedException
- /// The units of this property are degrees Celsius. Driver and application authors can use the ASCOM.Tools.Utilities.ConvertUnits method
- /// to convert these units to and from degrees Fahrenheit.
- /// This is expected to be returned by an infra-red sensor looking at the sky. The lower the temperature the more the sky is likely to be clear.
- ///
+ ///
public double SkyTemperature => Device.SkyTemperature;
- ///
- /// Temperature at the observatory
- ///
- /// Temperature in °C
- /// If this property is not available.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Optional property, can throw a NotImplementedException
- /// The units of this property are degrees Celsius. Driver and application authors can use the ASCOM.Tools.Utilities.ConvertUnits method
- /// to convert these units to and from degrees Fahrenheit.
- /// This is expected to be the ambient temperature at the observatory.
- ///
+ ///
public double Temperature => Device.Temperature;
- ///
- /// Wind direction at the observatory
- ///
- /// Wind direction (degrees, 0..360.0)
- /// If this property is not available.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Optional property, can throw a NotImplementedException
- /// The returned value must be between 0.0 and 360.0, interpreted according to the meteorological standard, where a special value of 0.0 is returned when the wind speed is 0.0.
- /// Wind direction is measured clockwise from north, through east, where East=90.0, South=180.0, West=270.0 and North=360.0.
- ///
+ ///
public double WindDirection => Device.WindDirection;
- ///
- /// Peak 3 second wind gust at the observatory over the last 2 minutes
- ///
- /// Wind gust (m/s) Peak 3 second wind speed over the last 2 minutes
- /// If this property is not available.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Optional property, can throw a NotImplementedException
- /// The units of this property are metres per second. Driver and application authors can use the ASCOM.Tools.Utilities.ConvertUnits method
- /// to convert these units to and from miles per hour or knots.
- ///
+ ///
public double WindGust => Device.WindGust;
- ///
- /// Wind speed at the observatory
- ///
- /// Wind speed (m/s)
- /// If this property is not available.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Optional property, can throw a NotImplementedException
- /// The units of this property are metres per second. Driver and application authors can use the ASCOM.Tools.Utilities.ConvertUnits method
- /// to convert these units to and from miles per hour or knots.
- ///
+ ///
public double WindSpeed => Device.WindSpeed;
- ///
- /// Provides the time since the sensor value was last updated
- ///
- /// Name of the property whose time since last update is required
- /// Time in seconds since the last sensor update for this property
- /// If the sensor is not implemented.
- /// If an invalid property name parameter is supplied.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must Not throw a NotImplementedException when the specified sensor Is implemented but must throw a NotImplementedException when the specified sensor Is Not implemented.
- /// PropertyName must be the name of one of the sensor properties specified in the interface. If the caller supplies some other value, throw an InvalidValueException.
- /// Return a negative value to indicate that no valid value has ever been received from the hardware.
- /// If an empty string is supplied as the PropertyName, the driver must return the time since the most recent update of any sensor. A NotImplementedException must not be thrown in this circumstance.
- ///
+ ///
public double TimeSinceLastUpdate(string PropertyName)
{
return Device.TimeSinceLastUpdate(PropertyName);
}
- ///
- /// Provides a description of the sensor providing the requested property
- ///
- /// Name of the sensor whose description is required
- /// The description of the specified sensor.
- /// If the sensor is not implemented.
- /// If an invalid property name parameter is supplied.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must Not throw a NotImplementedException when the specified sensor Is implemented
- /// but must throw a NotImplementedException when the specified sensor Is Not implemented.
- /// PropertyName must be the name of one of the sensor properties specified in the interface. If the caller supplies some other value, throw an InvalidValueException.
- /// If the sensor is implemented, this must return a valid string, even if the driver is not connected, so that applications can use this to determine what sensors are available.
- /// If the sensor is not implemented, this must throw a NotImplementedException.
- ///
+ ///
public string SensorDescription(string PropertyName)
{
return Device.SensorDescription(PropertyName);
}
- ///
- /// Forces the driver to immediately query its attached hardware to refresh sensor values
- ///
- /// If this method is not available.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Optional method, can throw a MethodNotImplementedException
- /// This must be a short-lived synchronous call that triggers a refresh. It must not wait for long running processes to complete.
- /// It is the client's responsibility to poll , to determine whether / when the data has been refreshed.
- ///
+ ///
public void Refresh()
{
Device.Refresh();
diff --git a/ASCOM.Com/ASCOM.Com.DriverAccess/Rotator.cs b/ASCOM.Com/ASCOM.Com.DriverAccess/Rotator.cs
index bd5d3d04..4f891454 100644
--- a/ASCOM.Com/ASCOM.Com.DriverAccess/Rotator.cs
+++ b/ASCOM.Com/ASCOM.Com.DriverAccess/Rotator.cs
@@ -9,6 +9,9 @@ namespace ASCOM.Com.DriverAccess
///
/// Rotator device class
///
+#if NET8_0_OR_GREATER
+ [System.Runtime.Versioning.SupportedOSPlatform("windows")]
+#endif
public class Rotator : ASCOMDevice, IRotatorV4
{
@@ -66,14 +69,7 @@ public Rotator(string ProgID, ILogger logger) : base(ProgID)
#region IRotatorV3 and IRotatorV4
- ///
- /// Returns a description of the driver, such as manufacturer and model
- /// number. Any ASCII characters may be used. The string shall not exceed 68
- /// characters (for compatibility with FITS headers).
- ///
- /// The description.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public new string Description
{
get
@@ -86,14 +82,7 @@ public Rotator(string ProgID, ILogger logger) : base(ProgID)
}
}
- ///
- /// Descriptive and version information about this ASCOM driver.
- /// This string may contain line endings and may be hundreds to thousands of characters long.
- /// It is intended to display detailed information on the ASCOM driver, including version and copyright data.
- /// See the Description property for descriptive info on the telescope itself.
- /// To get the driver version in a parseable string, use the DriverVersion property.
- ///
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public new string DriverInfo
{
get
@@ -106,12 +95,7 @@ public Rotator(string ProgID, ILogger logger) : base(ProgID)
}
}
- ///
- /// A string containing only the major and minor version of the driver.
- /// This must be in the form "n.n".
- /// Not to be confused with the InterfaceVersion property, which is the version of this specification supported by the driver (currently 2).
- ///
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public new string DriverVersion
{
get
@@ -124,10 +108,7 @@ public Rotator(string ProgID, ILogger logger) : base(ProgID)
}
}
- ///
- /// The short name of the driver, for display purposes
- ///
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public new string Name
{
get
@@ -140,115 +121,25 @@ public Rotator(string ProgID, ILogger logger) : base(ProgID)
}
}
- ///
- /// Indicates whether the Rotator supports the method.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// True if the Rotator supports the method.
- ///
- ///
- /// Must be implemented and must always return True for the IRotatorV3 interface or later.
- ///
+ ///
public bool CanReverse => Device.CanReverse;
- ///
- /// Indicates whether the rotator is currently moving
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// True if the Rotator is moving to a new position. False if the Rotator is stationary.
- ///
- /// Must be implemented.
- /// During rotation, must be True, otherwise it must be False.
- /// NOTE
- /// IRotatorV3, released in Platform 6.5, requires this method to be implemented, in previous interface versions implementation was optional.
- ///
+ ///
public bool IsMoving => Device.IsMoving;
- ///
- /// Current instantaneous Rotator position, allowing for any sync offset, in degrees.
- ///
- /// If Position is invalid.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented.
- /// SPECIFICATION REVISION - IRotatorV3 - Platform 6.5
- ///
- /// Position reports the synced position rather than the mechanical position. The synced position is defined
- /// as the mechanical position plus an offset. The offset is determined when the method is called and must be persisted across driver starts and device reboots.
- ///
- ///
- /// The position is expressed as an angle from 0 up to but not including 360 degrees, counter-clockwise against the
- /// sky. This is the standard definition of Position Angle. However, the rotator does not need to (and in general will not)
- /// report the true Equatorial Position Angle, as the attached imager may not be precisely aligned with the rotator's indexing.
- /// It is up to the client to determine any offset between mechanical rotator position angle and the true Equatorial Position
- /// Angle of the imager, and compensate for any difference.
- ///
- ///
- /// The property is provided in order to manage rotators being used on optics with odd or
- /// even number of reflections. With the Reverse switch in the correct position for the optics, the reported position angle must
- /// be counter-clockwise against the sky.
- ///
- /// NOTE
- /// IRotatorV3, released in Platform 6.5, requires this method to be implemented, in previous interface versions implementation was optional.
- ///
+ ///
public float Position => Device.Position;
- ///
- /// Sets or Returns the rotator’s Reverse state.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// True if the rotation and angular direction must be reversed for the optics
- ///
- /// Must be implemented.
- /// See the definition of .
- /// NOTE
- /// IRotatorV3, released in Platform 6.5, requires this method to be implemented, in previous interface versions implementation was optional.
- ///
+ ///
public bool Reverse { get => Device.Reverse; set => Device.Reverse = value; }
- ///
- /// The minimum StepSize, in degrees.
- ///
- /// Throw a NotImplementedException if the rotator does not know its step size.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Optional - can throw a not implemented exception
- /// Raises an exception if the rotator does not intrinsically know what the step size is.
- ///
+ ///
public float StepSize => Device.StepSize;
- ///
- /// The destination position angle for Move() and MoveAbsolute().
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// The destination position angle forMove and MoveAbsolute.
- ///
- /// Must be implemented.
- /// Upon calling Move or MoveAbsolute, this property immediately changes to the position angle to which the rotator is moving.
- /// The value is retained until a subsequent call to Move or MoveAbsolute.
- /// NOTE
- /// IRotatorV3, released in Platform 6.5, requires this method to be implemented, in previous interface versions implementation was optional.
- ///
+ ///
public float TargetPosition => Device.TargetPosition;
- ///
- /// This returns the raw mechanical position of the rotator in degrees.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented.
- /// Introduced in IRotatorV3.
- /// Returns the mechanical position of the rotator, which is equivalent to the IRotatorV2 property. Other clients (beyond the one that performed the sync)
- /// can calculate the current offset using this and the value.
- ///
+ ///
public float MechanicalPosition
{
get
@@ -258,99 +149,32 @@ public float MechanicalPosition
}
}
- ///
- /// Immediately stop any Rotator motion due to a previous Move or MoveAbsolute method call.
- ///
- /// Throw a NotImplementedException if the rotator cannot halt.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// Optional - can throw a not implemented exception
+ ///
public void Halt()
{
Device.Halt();
}
- ///
- /// Causes the rotator to move Position degrees relative to the current value.
- ///
- /// If Position is invalid.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// Relative position to move in degrees from current .
- ///
- /// Must be implemented.
- /// This is an asynchronous method that returns as soon as the rotation operation has been successfully started, with the
- /// property True (unless already at the requested position). After the requested angle is successfully reached and motion stops,
- /// the property must become False.
- /// Calling Move causes the property to change to the sum of the current angular position
- /// and the value of the parameter (modulo 360 degrees), then starts rotation to .
- /// NOTE
- /// IRotatorV3, released in Platform 6.5, requires this method to be implemented, in previous interface versions implementation was optional.
- ///
+ ///
public void Move(float Position)
{
Device.Move(Position);
}
- ///
- /// Causes the rotator to move the absolute position of degrees.
- ///
- /// Absolute position in degrees.
- /// If Position is invalid.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented.
- /// This is an asynchronous method that returns as soon as the rotation operation has been successfully started, with the
- /// property True (unless already at the requested position). After the requested angle is successfully reached and motion stops,
- /// the property must become False.
- ///
- /// Calling causes the property to change to the value of the
- /// parameter, then starts rotation to .
- ///
- /// NOTE
- /// IRotatorV3, released in Platform 6.5, requires this method to be implemented, in previous interface versions implementation was optional.
- ///
+ ///
public void MoveAbsolute(float Position)
{
Device.MoveAbsolute(Position);
}
- ///
- /// Moves the rotator to the specified mechanical angle.
- ///
- /// Mechanical rotator position angle.
- /// If Position is invalid.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented.
- /// This is an asynchronous method that returns as soon as the rotation operation has been successfully started, with the
- /// property True (unless already at the requested position). After the requested angle is successfully reached and motion stops,
- /// the property must become False.
- /// Moves the rotator to the requested mechanical angle, independent of any sync offset that may have been set. This method is to address requirements that need a physical rotation
- /// angle such as taking sky flats.
- /// Client applications should use the method in preference to this method when imaging.
- ///
+ ///
public void MoveMechanical(float Position)
{
AssertMethodImplemented(3, "MoveMechanical is not implemented because the driver is IRotatorV2 or earlier.");
Device.MoveMechanical(Position);
}
- ///
- /// Syncs the rotator to the specified position angle without moving it.
- ///
- /// Synchronised rotator position angle.
- /// If Position is invalid.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented.
- /// Introduced in IRotatorV3.
- /// Once this method has been called and the sync offset determined, both the method and the property must function in synced coordinates
- /// rather than mechanical coordinates. The sync offset must persist across driver starts and device reboots.
- ///
+ ///
public void Sync(float Position)
{
AssertMethodImplemented(3, "Sync is not implemented because the driver is IRotatorV2 or earlier.");
diff --git a/ASCOM.Com/ASCOM.Com.DriverAccess/SafetyMonitor.cs b/ASCOM.Com/ASCOM.Com.DriverAccess/SafetyMonitor.cs
index 208f2ded..75f5127d 100644
--- a/ASCOM.Com/ASCOM.Com.DriverAccess/SafetyMonitor.cs
+++ b/ASCOM.Com/ASCOM.Com.DriverAccess/SafetyMonitor.cs
@@ -5,10 +5,13 @@
using ASCOM.Common.DeviceStateClasses;
namespace ASCOM.Com.DriverAccess
-{
+{
///
/// SafetyMonitor device class
///
+#if NET8_0_OR_GREATER
+ [System.Runtime.Versioning.SupportedOSPlatform("windows")]
+#endif
public class SafetyMonitor : ASCOMDevice, ISafetyMonitorV3
{
@@ -65,17 +68,7 @@ public SafetyMonitor(string ProgID, ILogger logger) : base(ProgID)
#region ISafetyMonitor V1, ISafetyMonitorV2 and ISafetyMonitorV3
- ///
- /// Indicates whether the monitored state is safe for use.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// True if the state is safe, False if it is unsafe.
- ///
- /// Must be implemented and must not throw a NotImplementedException.
- ///
- ///
-
+ ///
public bool IsSafe => Device.IsSafe;
#endregion
diff --git a/ASCOM.Com/ASCOM.Com.DriverAccess/Switch.cs b/ASCOM.Com/ASCOM.Com.DriverAccess/Switch.cs
index 865005da..92870416 100644
--- a/ASCOM.Com/ASCOM.Com.DriverAccess/Switch.cs
+++ b/ASCOM.Com/ASCOM.Com.DriverAccess/Switch.cs
@@ -8,6 +8,9 @@ namespace ASCOM.Com.DriverAccess
///
/// Switch device class
///
+#if NET8_0_OR_GREATER
+ [System.Runtime.Versioning.SupportedOSPlatform("windows")]
+#endif
public class Switch : ASCOMDevice, ISwitchV3
{
@@ -47,143 +50,46 @@ public Switch(string ProgID, ILogger logger) : base(ProgID)
#region ISwitchV2
- ///
- /// The number of switch devices managed by this driver
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// The number of devices managed by this driver.
- /// Must be implemented, must not throw a
- /// Devices are numbered from 0 to - 1
+ ///
public short MaxSwitch => Device.MaxSwitch;
- ///
- /// Return the name of switch device n.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// The device number (0 to - 1)
- /// The name of the device
- /// If id is outside the range 0 to - 1
- /// Must be implemented, must not throw an ASCOM.NotImplementedException
- /// Devices are numbered from 0 to - 1
+ ///
public string GetSwitchName(short id)
{
return Device.GetSwitchName(id);
}
- ///
- /// Set a switch device name to a specified value.
- ///
- /// The device number (0 to - 1)
- /// The name of the device
- /// If the device name cannot be set in the application code.
- /// If id is outside the range 0 to - 1
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// Can throw a if the device name can not be set by the application.
- /// Devices are numbered from 0 to - 1
- ///
+ ///
public void SetSwitchName(short id, string name)
{
Device.SetSwitchName(id, name);
}
- ///
- /// Gets the description of the specified switch device. This is to allow a fuller description of
- /// the device to be returned, for example for a tool tip.
- ///
- /// The device number (0 to - 1)
- ///
- /// String giving the device description.
- ///
- /// If id is outside the range 0 to - 1
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// Must be implemented, must not throw an ASCOM.NotImplementedException
- /// Devices are numbered from 0 to - 1
- /// This is a Version 2 method.
- ///
+ ///
public string GetSwitchDescription(short id)
{
return Device.GetSwitchDescription(id);
}
- ///
- /// Reports if the specified switch device can be written to, default true.
- /// This is false if the device cannot be written to, for example a limit switch or a sensor.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// The device number (0 to - 1)
- ///
- /// true if the device can be written to, otherwise false.
- ///
- /// If id is outside the range 0 to - 1
- /// Must be implemented, must not throw an ASCOM.NotImplementedException
- /// Devices are numbered from 0 to - 1
- /// This is a Version 2 method, version 1 switch devices can be assumed to be writeable.
- ///
+ ///
public bool CanWrite(short id)
{
return Device.CanWrite(id);
}
- ///
- /// Return the state of switch device id as a boolean
- ///
- /// The device number (0 to - 1)
- /// True or false
- /// If there is a temporary condition that prevents the device value being returned.
- /// If id is outside the range 0 to - 1
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// Must be implemented, must not throw a .
- /// All devices must implement this. A multi-state device will return true if the device is at the maximum value, false if the value is at the minimum
- /// and either true or false as specified by the driver developer for intermediate values.
- /// Some devices do not support reading their state although they do allow state to be set. In these cases, on start-up, the driver can not know the hardware state and it is recommended that the
- /// driver either:
- ///
- /// - Sets the device to a known state on connection
- /// - Throws an until the client software has set the device state for the first time
- ///
- /// In both cases the driver should save a local copy of the state which it last set and return this through and
- /// Devices are numbered from 0 to - 1
+ ///
public bool GetSwitch(short id)
{
return Device.GetSwitch(id);
}
- ///
- /// Sets a switch controller device to the specified state, true or false.
- ///
- /// The device number (0 to - 1)
- /// The required control state
- /// If is false.
- /// If id is outside the range 0 to - 1
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// Can throw a if is False.
- /// must return if the set state is true and if the set state is false.
- /// Devices are numbered from 0 to - 1
+ ///
public void SetSwitch(short id, bool state)
{
Device.SetSwitch(id, state);
}
- ///
- /// Returns the maximum value for this switch device, this must be greater than .
- ///
- /// The device number (0 to - 1)
- /// The maximum value to which this device can be set or which a read only sensor will return.
- /// If id is outside the range 0 to - 1
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// Must be implemented, must not throw a .
- /// If a two state device cannot report its state, should return the value 1.0.
- /// Devices are numbered from 0 to - 1.
- /// This is a Version 2 method.
- ///
+ ///
public double MaxSwitchValue(short id)
{
try
@@ -196,19 +102,7 @@ public double MaxSwitchValue(short id)
}
}
- ///
- /// Returns the minimum value for this switch device, this must be less than
- ///
- /// The device number (0 to - 1)
- /// The minimum value to which this device can be set or which a read only sensor will return.
- /// If id is outside the range 0 to - 1
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// Must be implemented, must not throw a .
- /// If a two state device cannot report its state, should return the value 0.0.
- /// Devices are numbered from 0 to - 1.
- /// This is a Version 2 method.
- ///
+ ///
public double MinSwitchValue(short id)
{
try
@@ -221,24 +115,7 @@ public double MinSwitchValue(short id)
}
}
- ///
- /// Returns the step size that this device supports (the difference between successive values of the device).
- ///
- /// The device number (0 to - 1)
- /// The step size for this device.
- /// If id is outside the range 0 to - 1
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// Must be implemented, must not throw .
- /// SwitchStep, MinSwitchValue and MaxSwitchValue can be used to determine the way the device is controlled and/or displayed,
- /// for example by setting the number of decimal places or number of states for a display.
- /// must be greater than zero and the number of steps can be calculated as:
- /// (( - ) / ) + 1.
- /// The switch range ( - ) must be an exact multiple of .
- /// If a two state device cannot report its state, should return the value 1.0.
- /// Devices are numbered from 0 to - 1.
- /// This is a Version 2 method.
- ///
+ ///
public double SwitchStep(short id)
{
try
@@ -251,27 +128,7 @@ public double SwitchStep(short id)
}
}
- ///
- /// Returns the value for switch device id as a double
- ///
- /// The device number (0 to - 1)
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// The value for this switch, this is expected to be between and
- /// .
- /// If there is a temporary condition that prevents the device value being returned.
- /// If id is outside the range 0 to - 1
- /// Must be implemented, must not throw a .
- /// Some devices do not support reading their state although they do allow state to be set. In these cases, on start-up, the driver can not know the hardware state and it is recommended that the
- /// driver either:
- ///
- /// - Sets the device to a known state on connection
- /// - Throws an until the client software has set the device state for the first time
- ///
- /// In both cases the driver should save a local copy of the state which it last set and return this through and
- /// Devices are numbered from 0 to - 1.
- /// This is a Version 2 method.
- ///
+ ///
public double GetSwitchValue(short id)
{
try
@@ -284,23 +141,7 @@ public double GetSwitchValue(short id)
}
}
- ///
- /// Set the value for this device as a double.
- ///
- /// The device number (0 to - 1)
- /// The value to be set, between and
- /// If is false.
- /// If id is outside the range 0 to - 1
- /// If value is outside the range to
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// Can throw a if is False.
- /// If the value is more than or less than
- /// then the method must throw an .
- /// A set value that is intermediate between the values specified by should result in the device being set to an achievable value close to the requested set value.
- /// Devices are numbered from 0 to - 1.
- /// This is a Version 2 method.
- ///
+ ///
public void SetSwitchValue(short id, double value)
{
try
diff --git a/ASCOM.Com/ASCOM.Com.DriverAccess/Telescope.cs b/ASCOM.Com/ASCOM.Com.DriverAccess/Telescope.cs
index 8b2d05b1..3f8bb66e 100644
--- a/ASCOM.Com/ASCOM.Com.DriverAccess/Telescope.cs
+++ b/ASCOM.Com/ASCOM.Com.DriverAccess/Telescope.cs
@@ -12,10 +12,11 @@ namespace ASCOM.Com.DriverAccess
///
/// Telescope device class
///
+#if NET8_0_OR_GREATER
+ [System.Runtime.Versioning.SupportedOSPlatform("windows")]
+#endif
public class Telescope : ASCOMDevice, ITelescopeV4
{
- Operation currentOperation = Operation.None; // Current operation name
-
#region Convenience members
///
@@ -33,7 +34,7 @@ public TelescopeState TelescopeState
// Create a state object to return.
TelescopeState state = new TelescopeState(DeviceState, TL);
TL.LogMessage(LogLevel.Debug,nameof(TelescopeState), $"Returning: '{state.Altitude}' '{state.AtHome}' '{state.AtPark}' '{state.Azimuth}' '{state.Declination}' '{state.IsPulseGuiding}' " +
- $"'{state.RightAscension}' '{state.SideOfPier}' '{state.SiderealTime}' '{state.Slewing}' '{state.Tracking}' '{state.UTCDate}' '{state.TimeStamp}' '{currentOperation}'");
+ $"'{state.RightAscension}' '{state.SideOfPier}' '{state.SiderealTime}' '{state.Slewing}' '{state.Tracking}' '{state.UTCDate}' '{state.TimeStamp}'");
// Return the device specific state class
return state;
@@ -67,23 +68,7 @@ public Telescope(string ProgID, ILogger logger) : base(ProgID)
#region ITelescopeV3
- ///
- /// Returns the list of action names supported by this driver.
- ///
- /// An ArrayList of strings (SafeArray collection) containing the names of supported actions.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// Must be implemented
This method must return an empty IList object if no actions are supported. Please do not throw a .
- /// This is an aid to client authors and testers who would otherwise have to repeatedly poll the driver to determine its capabilities.
- /// Returned action names may be in mixed case to enhance presentation but will be recognised case insensitively in
- /// the Action method.
- /// An array list collection has been selected as the vehicle for action names in order to make it easier for clients to
- /// determine whether a particular action is supported. This is easily done through the Contains method. Since the
- /// collection is also enumerable it is easy to use constructs such as For Each ... to operate on members without having to be concerned
- /// about how many members are in the collection.
- /// Collections have been used in the Telescope specification for a number of years and are known to be compatible with COM. Within .NET
- /// the ArrayList is the correct implementation to use as the .NET Generic methods are not compatible with COM.
- ///
+ ///
public new IList SupportedActions
{
get
@@ -96,15 +81,7 @@ public Telescope(string ProgID, ILogger logger) : base(ProgID)
}
}
- ///
- /// The alignment mode of the mount (Alt/Az, Polar, German Polar).
- ///
- /// If the property is not implemented
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// This is only available for telescope Interface Versions 2 and later.
- ///
+ ///
public AlignmentMode AlignmentMode
{
get
@@ -117,23 +94,10 @@ public AlignmentMode AlignmentMode
}
}
- ///
- /// The Altitude above the local horizon of the telescope's current position (degrees, positive up)
- ///
- /// If the property is not implemented
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public double Altitude => Device.Altitude;
- ///
- /// The area of the telescope's aperture, taking into account any obstructions (square meters)
- ///
- /// If the property is not implemented
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// This is only available for telescope Interface Versions 2 and later.
- ///
+ ///
public double ApertureArea
{
get
@@ -146,15 +110,7 @@ public double ApertureArea
}
}
- ///
- /// The telescope's effective aperture diameter (meters)
- ///
- /// If the property is not implemented
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// This is only available for telescope Interface Versions 2 and later.
- ///
+ ///
public double ApertureDiameter
{
get
@@ -167,33 +123,10 @@ public double ApertureDiameter
}
}
- ///
- /// True if the telescope is stopped in the Home position. Set only following a operation,
- /// and reset with any slew operation. This property must be False if the telescope does not support homing.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// This is the correct property to use to determine successful completion of the (asynchronous) operation.
- /// This is only available for telescope Interface Versions 2 and later.
- ///
+ ///
public bool AtHome => Device.AtHome;
- ///
- /// True if the telescope has been put into the parked state by the see method. Set False by calling the Unpark() method.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// AtPark is True when the telescope is in the parked state. This is achieved by calling the method. When AtPark is true,
- /// the telescope movement is stopped (or restricted to a small safe range of movement) and all calls that would cause telescope
- /// movement (e.g. slewing, changing Tracking state) must not do so, and must raise an error.
- /// The telescope is taken out of parked state by calling the method. If the telescope cannot be parked,
- /// then AtPark must always return False.
- /// This is only available for telescope Interface Versions 2 and later.
- ///
+ ///
public bool AtPark
{
get
@@ -206,24 +139,10 @@ public bool AtPark
}
}
- ///
- /// The azimuth at the local horizon of the telescope's current position (degrees, North-referenced, positive East/clockwise).
- ///
- /// If the property is not implemented
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public double Azimuth => Device.Azimuth;
- ///
- /// True if this telescope is capable of programmed finding its home position ( method).
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// May raise an error if the telescope is not connected.
- /// This is only available for telescope Interface Versions 2 and later.
- ///
+ ///
public bool CanFindHome
{
get
@@ -236,16 +155,7 @@ public bool CanFindHome
}
}
- ///
- /// True if this telescope is capable of programmed parking (method)
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// May raise an error if the telescope is not connected.
- /// This is only available for telescope Interface Versions 2 and later.
- ///
+ ///
public bool CanPark
{
get
@@ -258,38 +168,13 @@ public bool CanPark
}
}
- ///
- /// True if this telescope is capable of software-pulsed guiding (via the method)
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// May raise an error if the telescope is not connected.
- ///
+ ///
public bool CanPulseGuide => Device.CanPulseGuide;
- ///
- /// True if the property can be changed to provide offset tracking in the declination axis.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// May raise an error if the telescope is not connected.
- ///
+ ///
public bool CanSetDeclinationRate => Device.CanSetDeclinationRate;
- ///
- /// True if the guide rate properties used for can be adjusted.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// May raise an error if the telescope is not connected.
- /// This is only available for telescope Interface Versions 2 and later.
- ///
+ ///
public bool CanSetGuideRates
{
get
@@ -302,16 +187,7 @@ public bool CanSetGuideRates
}
}
- ///
- /// True if this telescope is capable of programmed setting of its park position ( method)
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// May raise an error if the telescope is not connected.
- /// This is only available for telescope Interface Versions 2 and later.
- ///
+ ///
public bool CanSetPark
{
get
@@ -324,17 +200,7 @@ public bool CanSetPark
}
}
- ///
- /// True if the property can be set, meaning that the mount can be forced to flip.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// This will always return False for mounts that do not have to be flipped.
- /// May raise an error if the telescope is not connected.
- /// This is only available for telescope Interface Versions 2 and later.
- ///
+ ///
public bool CanSetPierSide
{
get
@@ -347,108 +213,31 @@ public bool CanSetPierSide
}
}
- ///
- /// True if the property can be changed to provide offset tracking in the right ascension axis.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// May raise an error if the telescope is not connected.
- ///
+ ///
public bool CanSetRightAscensionRate => Device.CanSetRightAscensionRate;
- ///
- /// True if the property can be changed, turning telescope sidereal tracking on and off.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// May raise an error if the telescope is not connected.
- ///
+ ///
public bool CanSetTracking => Device.CanSetTracking;
- ///
- /// True if this telescope is capable of programmed slewing (synchronous or asynchronous) to equatorial coordinates
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// If this is true, the property must also return true because all drivers must implement asynchronous slewing in this interface version.
- /// May raise an error if the telescope is not connected.
- ///
+ ///
public bool CanSlew => Device.CanSlew;
- ///
- /// True if this telescope is capable of programmed slewing (synchronous or asynchronous) to local horizontal coordinates
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// If this is true, the property must also return true because all drivers must implement asynchronous slewing in this interface version.
- /// May raise an error if the telescope is not connected.
- ///
+ ///
public bool CanSlewAltAz => Device.CanSlewAltAz;
- ///
- /// True if this telescope is capable of programmed asynchronous slewing to local horizontal coordinates
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// If this is true, the property must also return true because all drivers must implement synchronous slewing in this interface version to ensure backward compatibility with older clients..
- /// May raise an error if the telescope is not connected.
- ///
+ ///
public bool CanSlewAltAzAsync => Device.CanSlewAltAzAsync;
- ///
- /// True if this telescope is capable of programmed asynchronous slewing to equatorial coordinates.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// If this is true, the property must also return true because all drivers must implement synchronous slewing in this interface version to ensure backward compatibility with older clients..
- /// May raise an error if the telescope is not connected.
- ///
+ ///
public bool CanSlewAsync => Device.CanSlewAsync;
- ///
- /// True if this telescope is capable of programmed synching to equatorial coordinates.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// May raise an error if the telescope is not connected.
- ///
+ ///
public bool CanSync => Device.CanSync;
- ///
- /// True if this telescope is capable of programmed synching to local horizontal coordinates
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// May raise an error if the telescope is not connected.
- ///
+ ///
public bool CanSyncAltAz => Device.CanSyncAltAz;
- ///
- /// True if this telescope is capable of programmed unparking ( method).
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// If this is true, then will also be true. May raise an error if the telescope is not connected.
- /// This is only available for telescope Interface Versions 2 and later.
- ///
+ ///
public bool CanUnpark
{
get
@@ -461,93 +250,16 @@ public bool CanUnpark
}
}
- ///
- /// The declination (degrees) of the telescope's current equatorial coordinates, in the coordinate system given by the property.
- /// Reading the property will raise an error if the value is unavailable.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- ///
+ ///
public double Declination => Device.Declination;
- ///
- /// The declination tracking rate (arcseconds per SI second, default = 0.0)
- ///
- /// If DeclinationRate Write is not implemented.
- /// If an invalid DeclinationRate is specified
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// DeclinationRate Read must be implemented and must not throw a NotImplementedException.
- /// DeclinationRate Write can throw a NotImplementedException.
- /// This property, together with , provides support for "offset tracking".
- /// Offset tracking is used primarily for tracking objects that move relatively slowly against the equatorial coordinate system.
- /// It also may be used by a software guiding system that controls rates instead of using the PulseGuide method.
- ///
- /// NOTES:
- ///
- ///
- /// - The property value represents an offset from zero motion.
- /// - If is False, this property will always return 0.
- /// - To discover whether this feature is supported, test the property.
- /// - The supported range of this property is telescope specific, however, if this feature is supported,
- /// it can be expected that the range is sufficient to allow correction of guiding errors caused by moderate misalignment
- /// and periodic error.
- /// - If this property is non-zero when an equatorial slew is initiated, the telescope should continue to update the slew
- /// destination coordinates at the given offset rate.
- /// - This will allow precise slews to a fast-moving target with a slow-slewing telescope.
- /// - When the slew completes, the and properties should reflect the final (adjusted) destination.
- /// - The units of this property are arcseconds per SI (atomic) second. Please note that for historic reasons the units of the property are seconds of RA per sidereal second.
- ///
- ///
- ///
- /// This is not a required feature of this specification, however it is desirable.
- ///
- ///
+ ///
public double DeclinationRate { get => Device.DeclinationRate; set => Device.DeclinationRate = value; }
- ///
- /// True if the telescope or driver applies atmospheric refraction to coordinates.
- ///
- /// Either read or write or both properties can throw NotImplementedException if not implemented
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// If this property is True, the coordinates sent to, and retrieved from, the telescope are unrefracted.
- /// This is only available for telescope Interface Versions 2 and later.
- ///
- /// NOTES:
- ///
- /// - If the driver does not know whether the attached telescope does its own refraction, and if the driver does not itself calculate
- /// refraction, this property (if implemented) must raise an error when read.
- /// - Writing to this property is optional. Often, a telescope (or its driver) calculates refraction using standard atmospheric parameters.
- /// - If the client wishes to calculate a more accurate refraction, then this property could be set to False and these
- /// client-refracted coordinates used.
- /// - If disabling the telescope or driver's refraction is not supported, the driver must raise an error when an attempt to set
- /// this property to False is made.
- /// - Setting this property to True for a telescope or driver that does refraction, or to False for a telescope or driver that
- /// does not do refraction, shall not raise an error. It shall have no effect.
- ///
- ///
- ///
+ ///
public bool DoesRefraction { get => Device.DoesRefraction; set => Device.DoesRefraction = value; }
- ///
- /// Equatorial coordinate system used by this telescope (e.g. Topocentric or J2000).
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// Most amateur telescopes use topocentric coordinates. This coordinate system is simply the apparent position in the sky
- /// (possibly uncorrected for atmospheric refraction) for "here and now", thus these are the coordinates that one would use with digital setting
- /// circles and most amateur scopes. More sophisticated telescopes use one of the standard reference systems established by professional astronomers.
- /// The most common is the Julian Epoch 2000 (J2000). These instruments apply corrections for precession,nutation, aberration, etc. to adjust the coordinates
- /// from the standard system to the pointing direction for the time and location of "here and now".
- /// This is only available for telescope Interface Versions 2 and later.
- ///
+ ///
public EquatorialCoordinateType EquatorialSystem
{
get
@@ -560,16 +272,7 @@ public EquatorialCoordinateType EquatorialSystem
}
}
- ///
- /// The telescope's focal length, meters
- ///
- /// If the property is not implemented
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// This property may be used by clients to calculate telescope field of view and plate scale when combined with detector pixel size and geometry.
- /// This is only available for telescope Interface Versions 2 and later.
- ///
+ ///
public double FocalLength
{
get
@@ -582,28 +285,7 @@ public double FocalLength
}
}
- ///
- /// The current Declination movement rate offset for telescope guiding (degrees/sec)
- ///
- /// If the property is not implemented
- /// If an invalid guide rate is set.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// This is the rate for both hardware/relay guiding and the PulseGuide() method.
- /// This is only available for telescope Interface Versions 2 and later.
- ///
- /// NOTES:
- ///
- /// - To discover whether this feature is supported, test the property.
- /// - The supported range of this property is telescope specific, however, if this feature is supported, it can be expected that the range is sufficient to
- /// allow correction of guiding errors caused by moderate misalignment and periodic error.
- /// - If a telescope does not support separate guiding rates in Right Ascension and Declination, then it is permissible for and GuideRateDeclination to be tied together.
- /// In this case, changing one of the two properties will cause a change in the other.
- /// - Mounts must start up with a known or default declination guide rate, and this property must return that known/default guide rate until changed.
- ///
- ///
- ///
+ ///
public double GuideRateDeclination
{
get
@@ -624,28 +306,7 @@ public double GuideRateDeclination
}
}
- ///
- /// The current Right Ascension movement rate offset for telescope guiding (degrees/sec)
- ///
- /// If the property is not implemented
- /// If an invalid guide rate is set.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// This is the rate for both hardware/relay guiding and the PulseGuide() method.
- /// This is only available for telescope Interface Versions 2 and later.
- ///
- /// NOTES:
- ///
- /// - To discover whether this feature is supported, test the property.
- /// - The supported range of this property is telescope specific, however, if this feature is supported, it can be expected that the range is sufficient to allow correction of guiding errors caused by moderate
- /// misalignment and periodic error.
- /// - If a telescope does not support separate guiding rates in Right Ascension and Declination, then it is permissible for GuideRateRightAscension and to be tied together.
- /// In this case, changing one of the two properties will cause a change in the other.
- /// - Mounts must start up with a known or default right ascension guide rate, and this property must return that known/default guide rate until changed.
- ///
- ///
- ///
+ ///
public double GuideRateRightAscension
{
get
@@ -666,176 +327,29 @@ public double GuideRateRightAscension
}
}
- ///
- /// True if a command is in progress, False otherwise
- ///
- /// If is False
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Raises an error if the value of the property is false (the driver does not support the method).
- ///
+ ///
public bool IsPulseGuiding => Device.IsPulseGuiding;
- ///
- /// The right ascension (hours) of the telescope's current equatorial coordinates,
- /// in the coordinate system given by the EquatorialSystem property
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// Reading the property will raise an error if the value is unavailable.
- ///
+ ///
public double RightAscension => Device.RightAscension;
- ///
- /// The right ascension tracking rate offset from sidereal (seconds per sidereal second, default = 0.0)
- ///
- /// If RightAscensionRate Write is not implemented.
- /// If an invalid rate is set.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// RightAscensionRate Read must be implemented and must not throw a NotImplementedException.
- /// RightAscensionRate Write can throw a NotImplementedException.
- /// This property, together with , provides support for "offset tracking". Offset tracking is used primarily for tracking objects that move relatively slowly
- /// against the equatorial coordinate system. It also may be used by a software guiding system that controls rates instead of using the PulseGuide method.
- ///
- /// NOTES:
- /// The property value represents an offset from the currently selected .
- ///
- /// - If this property is zero, tracking will be at the selected .
- /// - If is False, this property must always return 0.
- /// To discover whether this feature is supported, test the property.
- /// - The units of this property are seconds of right ascension per sidereal second. Please note that for historic reasons the units of the property are arcseconds per SI second.
- /// - To convert a given rate in (the more common) units of sidereal seconds per UTC (clock) second, multiply the value by 0.9972695677
- /// (the number of UTC seconds in a sidereal second) then set the property. Please note that these units were chosen for the Telescope V1 standard,
- /// and in retrospect, this was an unfortunate choice. However, to maintain backwards compatibility, the units cannot be changed.
- /// A simple multiplication is all that's needed, as noted. The supported range of this property is telescope specific, however,
- /// if this feature is supported, it can be expected that the range is sufficient to allow correction of guiding errors
- /// caused by moderate misalignment and periodic error.
- /// - If this property is non-zero when an equatorial slew is initiated, the telescope should continue to update the slew destination coordinates
- /// at the given offset rate. This will allow precise slews to a fast-moving target with a slow-slewing telescope. When the slew completes,
- /// the and properties should reflect the final (adjusted) destination. This is not a required
- /// feature of this specification, however it is desirable.
- /// - Use the property to enable and disable sidereal tracking (if supported).
- ///
- ///
- ///
+ ///
public double RightAscensionRate { get => Device.RightAscensionRate; set => Device.RightAscensionRate = value; }
- ///
- /// Indicates the pointing state of the mount.
- ///
- /// If the property is not implemented.
- /// If an invalid side of pier is set.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// This is an asynchronous method and should be set True while the operation is in progress.
- /// For historical reasons, this property's name does not reflect its true meaning. The name will not be changed (so as to preserve
- /// compatibility), but the meaning has since become clear. All conventional mounts have two pointing states for a given equatorial (sky) position.
- /// Mechanical limitations often make it impossible for the mount to position the optics at given HA/Dec in one of the two pointing
- /// states, but there are places where the same point can be reached sensibly in both pointing states (e.g. near the pole and
- /// close to the meridian). In order to understand these pointing states, consider the following (thanks to Patrick Wallace for this info):
- /// All conventional telescope mounts have two axes nominally at right angles. For an equatorial, the longitude axis is mechanical
- /// hour angle and the latitude axis is mechanical declination. Sky coordinates and mechanical coordinates are two completely separate arenas.
- /// This becomes rather more obvious if your mount is an altaz, but it's still true for an equatorial. Both mount axes can in principle
- /// move over a range of 360 deg. This is distinct from sky HA/Dec, where Dec is limited to a 180 deg range (+90 to -90). Apart from
- /// practical limitations, any point in the sky can be seen in two mechanical orientations. To get from one to the other the HA axis
- /// is moved 180 deg and the Dec axis is moved through the pole a distance twice the sky codeclination (90 - sky declination).
- /// Mechanical zero HA/Dec will be one of the two ways of pointing at the intersection of the celestial equator and the local meridian.
- /// In order to support Dome slaving, where it is important to know which side of the pier the mount is actually on, ASCOM has adopted the
- /// convention that the Normal pointing state will be the state where a German Equatorial mount is on the East side of the pier, looking West, with the
- /// counterweights below the optical assembly and that will represent this pointing state.
- /// Move your scope to this position and consider the two mechanical encoders zeroed. The two pointing states are, then:
- ///
- /// - Normal ()Where the mechanical Dec is in the range -90 deg to +90 deg
- /// - Beyond the pole ()Where the mechanical Dec is in the range -180 deg to -90 deg or +90 deg to +180 deg.
- ///
- ///
- /// "Side of pier" is a "consequence" of the former definition, not something fundamental.
- /// Apart from mechanical interference, the telescope can move from one side of the pier to the other without the mechanical Dec
- /// having changed: you could track Polaris forever with the telescope moving from west of pier to east of pier or vice versa every 12h.
- /// Thus, "side of pier" is, in general, not a useful term (except perhaps in a loose, descriptive, explanatory sense).
- /// All this applies to a fork mount just as much as to a GEM, and it would be wrong to make the "beyond pole" state illegal for the
- /// former. Your mount may not be able to get there if your camera hits the fork, but it's possible on some mounts. Whether this is useful
- /// depends on whether you're in Hawaii or Finland.
- /// To first order, the relationship between sky and mechanical HA/Dec is as follows:
- /// Normal state:
- ///
- /// - HA_sky = HA_mech
- /// - Dec_sky = Dec_mech
- ///
- ///
- /// Beyond the pole
- ///
- /// - HA_sky = HA_mech + 12h, expressed in range ± 12h
- /// - Dec_sky = 180d - Dec_mech, expressed in range ± 90d
- ///
- ///
- /// Astronomy software often needs to know which pointing state the mount is in. Examples include setting guiding polarities
- /// and calculating dome opening azimuth/altitude. The meaning of the SideOfPier property, then is:
- ///
- /// - pierEastNormal pointing state
- /// - pierWestBeyond the pole pointing state
- ///
- ///
- /// If the mount hardware reports neither the true pointing state (or equivalent) nor the mechanical declination axis position
- /// (which varies from -180 to +180), a driver cannot calculate the pointing state, and *must not* implement SideOfPier.
- /// If the mount hardware reports only the mechanical declination axis position (-180 to +180) then a driver can calculate SideOfPier as follows:
- ///
- /// - pierEast = abs(mechanical dec) <= 90 deg
- /// - pierWest = abs(mechanical Dec) > 90 deg
- ///
- ///
- /// It is allowed (though not required) that this property may be written to force the mount to flip. Doing so, however, may change
- /// the right ascension of the telescope. During flipping, Telescope.Slewing must return True.
- /// This property is only available in telescope Interface Versions 2 and later.
- /// Pointing State and Side of Pier - Help for Driver Developers
- /// A further document, "Pointing State and Side of Pier", is installed in the Developer Documentation folder by the ASCOM Developer
- /// Components installer. This further explains the pointing state concept and includes diagrams illustrating how it relates
- /// to physical side of pier for German equatorial telescopes. It also includes details of the tests performed by Conform to determine whether
- /// the driver correctly reports the pointing state as defined above.
- ///
+ ///
public PointingState SideOfPier
{
get => (PointingState)Device.SideOfPier;
set
{
- currentOperation = Operation.SideOfPier;
Device.SideOfPier = value;
}
}
- ///
- /// The local apparent sidereal time from the telescope's internal clock (hours, sidereal)
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// It is required for a driver to calculate this from the system clock if the telescope
- /// has no accessible source of sidereal time. Local Apparent Sidereal Time is the sidereal
- /// time used for pointing telescopes, and thus must be calculated from the Greenwich Mean
- /// Sidereal time, longitude, nutation in longitude and true ecliptic obliquity.
- ///
+ ///
public double SiderealTime => Device.SiderealTime;
- ///
- /// The elevation above mean sea level (meters) of the site at which the telescope is located
- ///
- /// If the property is not implemented.
- /// If an invalid elevation is set.
- /// If the application must set the elevation before reading it, but has not.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Setting this property will raise an error if the given value is outside the range -300 through +10000 metres.
- /// Reading the property will raise an error if the value has never been set or is otherwise unavailable.
- /// This is only available for telescope Interface Versions 2 and later.
- ///
+ ///
public double SiteElevation
{
get
@@ -856,19 +370,7 @@ public double SiteElevation
}
}
- ///
- /// The geodetic(map) latitude (degrees, positive North, WGS84) of the site at which the telescope is located.
- ///
- /// If the property is not implemented.
- /// If an invalid latitude is set.
- /// If the application must set the latitude before reading it, but has not.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Setting this property will raise an error if the given value is outside the range -90 to +90 degrees.
- /// Reading the property will raise an error if the value has never been set or is otherwise unavailable.
- /// This is only available for telescope Interface Versions 2 and later.
- ///
+ ///
public double SiteLatitude
{
get
@@ -889,20 +391,7 @@ public double SiteLatitude
}
}
- ///
- /// The longitude (degrees, positive East, WGS84) of the site at which the telescope is located.
- ///
- /// If the property is not implemented.
- /// If an invalid longitude is set.
- /// If the application must set the longitude before reading it, but has not.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Setting this property will raise an error if the given value is outside the range -180 to +180 degrees.
- /// Reading the property will raise an error if the value has never been set or is otherwise unavailable.
- /// Note that West is negative!
- /// This is only available for telescope Interface Versions 2 and later.
- ///
+ ///
public double SiteLongitude
{
get
@@ -923,94 +412,22 @@ public double SiteLongitude
}
}
- ///
- /// True if telescope is currently moving in response to one of the
- /// Slew methods or the method, False at all other times.
- ///
- /// If the property is not implemented.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Reading the property will raise an error if the value is unavailable. If the telescope is not capable of asynchronous slewing, this property will always be False.
- /// The definition of "slewing" excludes motion caused by sidereal tracking, PulseGuide, , and .
- /// It reflects only motion caused by one of the Slew commands, flipping caused by changing the property, or .
- ///
+ ///
public bool Slewing => Device.Slewing;
- ///
- /// Specifies a post-slew settling time (sec.).
- ///
- /// If the property is not implemented.
- /// If an invalid settle time is set.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Adds additional time to slew operations. Slewing methods will not return,
- /// and the property will not become False, until the slew completes and the SlewSettleTime has elapsed.
- /// This feature (if supported) may be used with mounts that require extra settling time after a slew.
- ///
+ ///
public short SlewSettleTime { get => Device.SlewSettleTime; set => Device.SlewSettleTime = value; }
- ///
- /// The declination (degrees, positive North) for the target of an equatorial slew or sync operation
- ///
- /// If the property is not implemented.
- /// If an invalid declination is set.
- /// If the property is read before being set for the first time.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Setting this property will raise an error if the given value is outside the range -90 to +90 degrees. Reading the property will raise an error if the value has never been set or is otherwise unavailable.
- ///
+ ///
public double TargetDeclination { get => Device.TargetDeclination; set => Device.TargetDeclination = value; }
- ///
- /// The right ascension (hours) for the target of an equatorial slew or sync operation
- ///
- /// If the property is not implemented.
- /// If an invalid right ascension is set.
- /// If the property is read before being set for the first time.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Setting this property will raise an error if the given value is outside the range 0 to 24 hours. Reading the property will raise an error if the value has never been set or is otherwise unavailable.
- ///
+ ///
public double TargetRightAscension { get => Device.TargetRightAscension; set => Device.TargetRightAscension = value; }
- ///
- /// The state of the telescope's sidereal tracking drive.
- ///
- /// If Tracking Write is not implemented.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Tracking Read must be implemented and must not throw a NotImplementedException.
- /// Tracking Write can throw a NotImplementedException.
- /// Changing the value of this property will turn the sidereal drive on and off.
- /// However, some telescopes may not support changing the value of this property
- /// and thus may not support turning tracking on and off.
- /// See the property.
- ///
+ ///
public bool Tracking { get => Device.Tracking; set => Device.Tracking = value; }
- ///
- /// The current tracking rate of the telescope's sidereal drive
- ///
- /// If TrackingRate Write is not implemented.
- /// If an invalid drive rate is set.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// TrackingRate Read must be implemented and must not throw a NotImplementedException.
- /// TrackingRate Write can throw a NotImplementedException.
- /// Supported rates (one of the values) are contained within the collection.
- /// Values assigned to TrackingRate must be one of these supported rates. If an unsupported value is assigned to this property, it will raise an error.
- /// The currently selected tracking rate can be further adjusted via the and properties. These rate offsets are applied to the currently
- /// selected tracking rate. Mounts must start up with a known or default tracking rate, and this property must return that known/default tracking rate until changed.
- /// If the mount's current tracking rate cannot be determined (for example, it is a write-only property of the mount's protocol),
- /// it is permitted for the driver to force and report a default rate on connect. In this case, the preferred default is Sidereal rate.
- /// This is only available for telescope Interface Versions 2 and later.
- ///
+ ///
public DriveRate TrackingRate
{
get
@@ -1031,17 +448,7 @@ public DriveRate TrackingRate
}
}
- ///
- /// Returns a collection of supported values that describe the permissible
- /// values of the property for this telescope type.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented and must not throw a NotImplementedException.
- /// At a minimum, this must contain an item for .
- /// This is only available for telescope Interface Versions 2 and later.
- ///
+ ///
public ITrackingRates TrackingRates
{
get
@@ -1071,56 +478,16 @@ public ITrackingRates TrackingRates
}
}
- ///
- /// The UTC date/time of the telescope's internal clock
- ///
- /// If UTCDate Write is not implemented.
- /// If an invalid is set.
- /// When UTCDate is read and the mount cannot provide this property itself and a value has not yet be established by writing to the property.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// UTCDate Read must be implemented and must not throw a NotImplementedException.
- /// UTCDate Write can throw a NotImplementedException.
- /// The driver must calculate this from the system clock if the telescope has no accessible source of UTC time. In this case, the property must not be writeable (this would change the system clock!) and will instead raise an error.
- /// However, it is permitted to change the telescope's internal UTC clock if it is being used for this property. This allows clients to adjust the telescope's UTC clock as needed for accuracy. Reading the property
- /// will raise an error if the value has never been set or is otherwise unavailable.
- ///
+ ///
public DateTime UTCDate { get => Device.UTCDate; set => Device.UTCDate = value; }
- ///
- /// Stops a slew in progress.
- ///
- /// If the method is not implemented
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Effective only after a call to , , , or .
- /// Does nothing if no slew/motion is in progress. Tracking is returned to its pre-slew state. Raises an error if is true.
- ///
+ ///
public void AbortSlew()
{
- currentOperation = Operation.AbortSlew;
Device.AbortSlew();
}
- ///
- /// Determine the rates at which the telescope may be moved about the specified axis by the method.
- ///
- /// The axis about which rate information is desired (TelescopeAxes value)
- /// Collection of rate objects
- /// If an invalid Axis is specified.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// See the description of for more information. This method must return an empty collection if is not supported.
- /// This is only available for telescope Interface Versions 2 and later.
- ///
- /// Please note that the rate objects must contain absolute non-negative values only. Applications determine the direction by applying a
- /// positive or negative sign to the rates provided. This obviates the need for the driver to present a duplicate set of negative rates
- /// as well as the positive rates.
- ///
+ ///
public IAxisRates AxisRates(TelescopeAxis Axis)
{
if (InterfaceVersion == 1)
@@ -1137,37 +504,13 @@ public IAxisRates AxisRates(TelescopeAxis Axis)
return rates;
}
- ///
- /// True if this telescope can move the requested axis
- ///
- /// If an invalid Axis is specified.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// Primary, Secondary or Tertiary axis
- /// Boolean indicating can or can not move the requested axis
- /// If an invalid Axis is specified.
- ///
- /// Must be implemented, must not throw a NotImplementedException.
- /// This is only available for telescope Interface Versions 2 and later.
- ///
+ ///
public bool CanMoveAxis(TelescopeAxis Axis)
{
return Device.CanMoveAxis(Axis);
}
- ///
- /// Predict side of pier for German equatorial mounts
- ///
- /// The destination right ascension (hours).
- /// The destination declination (degrees, positive North).
- /// The side of the pier on which the telescope would be on if a slew to the given equatorial coordinates is performed at the current instant of time.
- /// If the method is not implemented
- /// If an invalid RightAscension or Declination is specified.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// This is only available for telescope Interface Versions 2 and later.
- ///
+ ///
public PointingState DestinationSideOfPier(double RightAscension, double Declination)
{
if (InterfaceVersion == 1)
@@ -1177,153 +520,41 @@ public PointingState DestinationSideOfPier(double RightAscension, double Declina
return (PointingState)Device.DestinationSideOfPier(RightAscension, Declination);
}
- ///
- /// Locates the telescope's "home" position (synchronous)
- ///
- /// If the method is not implemented and is False
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// This is an asynchronous method: Use the property to monitor the operation's progress.
- /// When the mount has successfully reached its home position, becomes False and becomes True.
- /// Raises an error if there is a problem.
- /// Raises an error if AtPark is true.
- /// This is only available for telescope Interface Versions 2 and later.
- ///
+ ///
public void FindHome()
{
if (InterfaceVersion == 1)
{
throw new ASCOM.NotImplementedException("FindHome is only supported by Interface Versions 2 and above.");
}
-
- currentOperation = Operation.FindHome;
Device.FindHome();
}
- ///
- /// Move the telescope in one axis at the given rate.
- ///
- /// The physical axis about which movement is desired
- /// The rate of motion (deg/sec) about the specified axis
- /// If the method is not implemented.
- /// If an invalid axis or rate is given.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// This method supports control of the mount about its mechanical axes.
- /// The telescope will start moving at the specified rate about the specified axis and continue indefinitely.
- /// This method can be called for each axis separately, and have them all operate concurrently at separate rates of motion.
- /// Set the rate for an axis to zero to restore the motion about that axis to the rate set by the property.
- /// Tracking motion (if enabled, see note below) is suspended during this mode of operation.
- ///
- /// Raises an error if is true.
- /// This must be implemented for the if the property returns True for the given axis.
- /// This is only available for telescope Interface Versions 2 and later.
- ///
- /// NOTES:
- ///
- /// - The movement rate must be within the value(s) obtained from a object in the
- /// the collection. This is a signed value with negative rates moving in the opposite direction to positive rates.
- /// - The values specified in are absolute, unsigned values and apply to both directions, determined by the sign used in this command.
- /// - The value of must be True if the telescope is moving about any of its axes as a result of this method being called.
- /// This can be used to simulate a handbox by initiating motion with the MouseDown event and stopping the motion with the MouseUp event.
- /// - When the motion is stopped by setting the rate to zero the scope will be set to the previous or to no movement, depending on the state of the property.
- /// - It may be possible to implement satellite tracking by using the method to move the scope in the required manner to track a satellite.
- ///
- ///
- ///
+ ///
public void MoveAxis(TelescopeAxis Axis, double Rate)
{
- currentOperation = Operation.MoveAxis;
Device.MoveAxis(Axis, Rate);
}
- ///
- /// Move the telescope to its park position, stop all motion (or restrict to a small safe range), and set to True.
- ///
- /// If the method is not implemented and is False
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// This is an asynchronous method: Use the property to monitor the operation's progress.
- /// When the mount has successfully reached its home position, becomes False and becomes True.
- /// Raises an error if there is a problem communicating with the telescope or if parking fails. Parking should put the telescope into a state where its pointing accuracy
- /// will not be lost if it is power-cycled (without moving it).Some telescopes must be power-cycled before unparking. Others may be unparked by simply calling the method.
- /// Calling this with = True does nothing (harmless)
- ///
+ ///
public void Park()
{
- currentOperation = Operation.Park;
Device.Park();
}
- ///
- /// Moves the scope in the given direction for the given interval or time at
- /// the rate given by the corresponding guide rate property
- ///
- /// The direction in which the guide-rate motion is to be made
- /// The duration of the guide-rate motion (milliseconds)
- /// If the method is not implemented and is False
- /// If an invalid direction or duration is given.
- /// If the pulse guide cannot be effected e.g. if the telescope is slewing or is not tracking or a pulse guide is already in progress and a second cannot be started asynchronously.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// This method is asynchronous and should return quickly using IsPulseGuiding as the completion property.
- /// If the mount cannot have simultaneous PulseGuide operations in both RightAscension and Declination, it must throw InvalidOperationException when the overlapping operation is attempted.
- ///
- /// NOTES:
- ///
- /// - Raises an error if is true.
- /// - The property must be True during pulse-guiding.
- /// - The rate of motion for movements about the right ascension axis is
- /// specified by the property. The rate of motion
- /// for movements about the declination axis is specified by the
- /// property. These two rates may be tied together
- /// into a single rate, depending on the driver's implementation
- /// and the capabilities of the telescope.
- ///
- ///
- ///
+ ///
public void PulseGuide(GuideDirection Direction, int Duration)
{
- currentOperation = Operation.PulseGuide;
Device.PulseGuide(Direction, Duration);
}
- ///
- /// Sets the telescope's park position to be its current position.
- ///
- /// If the method is not implemented and is False
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public void SetPark()
{
Device.SetPark();
}
- ///
- /// Move the telescope to the given local horizontal coordinates, return when slew is complete
- ///
- /// If the method is not implemented and is False
- /// If an invalid azimuth or elevation is given.
- /// If the telescope is parked
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Deprecated for client applications.
- /// This method must not be used by applications, use the asynchronous method instead.
- /// If the mount is capable of slewing, drivers must implement this method to ensure backward compatibility with older clients.
- ///
- /// This Method must be implemented if returns True. Raises an error if the slew fails. The slew may fail if the target coordinates are beyond limits imposed within the driver component.
- /// Such limits include mechanical constraints imposed by the mount or attached instruments, building or dome enclosure restrictions, etc.
- ///
- /// The and properties are not changed by this method.
- /// Raises an error if is True, or if is True. This is only available for telescope Interface Versions 2 and later.
- ///
- /// Target azimuth (degrees, North-referenced, positive East/clockwise).
- /// Target altitude (degrees, positive up)
+ ///
public void SlewToAltAz(double Azimuth, double Altitude)
{
if (InterfaceVersion == 1)
@@ -1333,154 +564,41 @@ public void SlewToAltAz(double Azimuth, double Altitude)
Device.SlewToAltAz(Azimuth, Altitude);
}
- ///
- /// This Method must be implemented if returns True.
- ///
- /// Azimuth to which to move
- /// Altitude to which to move to
- /// If the method is not implemented and is False
- /// If an invalid azimuth or elevation is given.
- /// If the telescope is parked
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// This method should only be implemented if the properties , ,
- /// , and can be read while the scope is slewing. Raises an error if starting the slew fails. Returns immediately after starting the slew.
- /// The client may monitor the progress of the slew by reading the , , and properties during the slew. When the slew completes, Slewing becomes False.
- /// The slew may fail if the target coordinates are beyond limits imposed within the driver component. Such limits include mechanical constraints imposed by the mount or attached instruments, building or dome enclosure restrictions, etc.
- /// The and properties are not changed by this method.
- /// Raises an error if is True, or if is True.
- /// This is only available for telescope Interface Versions 2 and later.
- /// For drivers, must also be implemented and must return True when this method is implemented.
- ///
+ ///
public void SlewToAltAzAsync(double Azimuth, double Altitude)
{
if (InterfaceVersion == 1)
{
throw new ASCOM.NotImplementedException("SlewToAltAzAsync is only supported by Interface Versions 2 and above.");
}
-
- currentOperation = Operation.SlewToAltAzAsync;
Device.SlewToAltAzAsync(Azimuth, Altitude);
}
- ///
- /// Move the telescope to the given equatorial coordinates, return when slew is complete
- ///
- /// If an invalid right ascension or declination is given.
- /// The destination right ascension (hours). Copied to .
- /// The destination declination (degrees, positive North). Copied to .
- /// If the method is not implemented and is False
- /// If the telescope is parked
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Deprecated for client applications.
- /// This method must not be used by applications, use the asynchronous method instead.
- /// If the mount is capable of slewing, drivers must implement this method to ensure backward compatibility with older clients.
- ///
- ///
- /// This Method must be implemented if returns True. Raises an error if the slew fails.
- /// The slew may fail if the target coordinates are beyond limits imposed within the driver component.
- /// Such limits include mechanical constraints imposed by the mount or attached instruments,
- /// building or dome enclosure restrictions, etc. The target coordinates are copied to
- /// and whether or not the slew succeeds.
- ///
- /// Raises an error if is True, or if is False.
- ///
- ///
+ ///
public void SlewToCoordinates(double RightAscension, double Declination)
{
Device.SlewToCoordinates(RightAscension, Declination);
}
- ///
- /// Move the telescope to the given equatorial coordinates, return immediately after starting the slew.
- ///
- /// The destination right ascension (hours). Copied to .
- /// The destination declination (degrees, positive North). Copied to .
- /// If the method is not implemented and is False
- /// If the telescope is parked
- /// If an invalid right ascension or declination is given.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// This method must be implemented if returns True. Raises an error if starting the slew failed.
- /// Returns immediately after starting the slew. The client may monitor the progress of the slew by reading
- /// the , , and properties during the slew. When the slew completes,
- /// becomes False. The slew may fail to start if the target coordinates are beyond limits
- /// imposed within the driver component. Such limits include mechanical constraints imposed
- /// by the mount or attached instruments, building or dome enclosure restrictions, etc.
- /// The target coordinates are copied to and
- /// whether or not the slew succeeds.
- /// Raises an error if is True, or if is False.
- /// For drivers, must also be implemented and must return True when this method is implemented.
- ///
+ ///
public void SlewToCoordinatesAsync(double RightAscension, double Declination)
{
- currentOperation = Operation.SlewToCoordinatesAsync;
Device.SlewToCoordinatesAsync(RightAscension, Declination);
}
- ///
- /// Move the telescope to the and coordinates, return when slew complete.
- ///
- /// If the method is not implemented and is False
- /// If the telescope is parked
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Deprecated for client applications.
- /// This method must not be used by applications, use the asynchronous method instead.
- /// If the mount is capable of slewing, drivers must implement this method to ensure backward compatibility with older clients.
- /// This Method must be implemented if returns True. Raises an error if the slew fails.
- /// The slew may fail if the target coordinates are beyond limits imposed within the driver component.
- /// Such limits include mechanical constraints imposed by the mount or attached
- /// instruments, building or dome enclosure restrictions, etc.
- /// Raises an error if is True, or if is False.
- ///
+ ///
public void SlewToTarget()
{
Device.SlewToTarget();
}
- ///
- /// Move the telescope to the and coordinates,
- /// returns immediately after starting the slew.
- ///
- /// If the method is not implemented and is False
- /// If the telescope is parked
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// This Method must be implemented if returns True.
- /// Raises an error if starting the slew failed. Returns immediately after starting the slew. The client may monitor the progress of the slew by reading the RightAscension, Declination,
- /// and Slewing properties during the slew. When the slew completes, becomes False. The slew may fail to start if the target coordinates are beyond limits imposed within
- /// the driver component. Such limits include mechanical constraints imposed by the mount or attached instruments, building or dome enclosure restrictions, etc.
- /// Raises an error if is True, or if is False.
- /// For drivers, must also be implemented and must return True when this method is implemented.
- ///
+ ///
public void SlewToTargetAsync()
{
- currentOperation = Operation.SlewToTargetAsync;
Device.SlewToTargetAsync();
}
- ///
- /// Matches the scope's local horizontal coordinates to the given local horizontal coordinates.
- ///
- /// Target azimuth (degrees, North-referenced, positive East/clockwise)
- /// Target altitude (degrees, positive up)
- /// If the method is not implemented and is False
- /// If an invalid azimuth or altitude is given.
- /// If the telescope is parked
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// This must be implemented if the property is True. Raises an error if matching fails.
- /// Raises an error if is True, or if is True.
- /// This is only available for telescope Interface Versions 2 and later.
- ///
+ ///
public void SyncToAltAz(double Azimuth, double Altitude)
{
if (InterfaceVersion == 1)
@@ -1490,66 +608,21 @@ public void SyncToAltAz(double Azimuth, double Altitude)
Device.SyncToAltAz(Azimuth, Altitude);
}
- ///
- /// Matches the scope's equatorial coordinates to the given equatorial coordinates.
- ///
- /// The corrected right ascension (hours). Copied to the property.
- /// The corrected declination (degrees, positive North). Copied to the property.
- /// If the method is not implemented and is False
- /// If an invalid right ascension or declination is given.
- /// If the telescope is parked
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// This must be implemented if the property is True. Raises an error if matching fails.
- /// Raises an error if AtPark is True, or if is False.
- /// The way that Sync is implemented is mount dependent and it should only be relied on to improve pointing for positions close to
- /// the position at which the sync is done.
- ///
+ ///
public void SyncToCoordinates(double RightAscension, double Declination)
{
Device.SyncToCoordinates(RightAscension, Declination);
}
- ///
- /// Matches the scope's equatorial coordinates to the given equatorial coordinates.
- ///
- /// If the method is not implemented and is False
- /// If the telescope is parked
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// This must be implemented if the property is True. Raises an error if matching fails.
- /// Raises an error if AtPark is True, or if is False.
- /// The way that Sync is implemented is mount dependent and it should only be relied on to improve pointing for positions close to
- /// the position at which the sync is done.
- ///
+ ///
public void SyncToTarget()
{
Device.SyncToTarget();
}
- ///
- /// Takes telescope out of the Parked state.
- ///
- /// If the method is not implemented and is False
- /// If the telescope is parked
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- ///
- /// This is an asynchronous method and must be set True while the mount is parking and False when the operation is complete.
- /// will be set True when the mount has parked successfully.
- ///
- ///
- /// The state of after unparking is undetermined. Valid only after . Applications must check and change Tracking as needed after unparking.
- /// Raises an error if unparking fails. Calling this with = False does nothing (harmless)
- ///
- ///
+ ///
public void Unpark()
{
- currentOperation = Operation.Unpark;
-
Device.Unpark();
}
diff --git a/ASCOM.Com/ASCOM.Com.DriverAccess/Video.cs b/ASCOM.Com/ASCOM.Com.DriverAccess/Video.cs
index 3ad2f39a..c7eb06fa 100644
--- a/ASCOM.Com/ASCOM.Com.DriverAccess/Video.cs
+++ b/ASCOM.Com/ASCOM.Com.DriverAccess/Video.cs
@@ -12,6 +12,9 @@ namespace ASCOM.Com.DriverAccess
///
/// Video device class
///
+#if NET8_0_OR_GREATER
+ [System.Runtime.Versioning.SupportedOSPlatform("windows")]
+#endif
public class Video : ASCOMDevice, IVideoV2
{
@@ -68,274 +71,67 @@ public Video(string ProgID, ILogger logger) : base(ProgID)
#region IVideoV1 and IVideov2
- ///
- /// Reports the bit depth the camera can produce.
- ///
- /// The bit depth per pixel. Typical analogue videos are 8-bit while some digital cameras can provide 12, 14 or 16-bit images.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw an ASCOM.NotImplementedException.
- ///
+ ///
public int BitDepth => Device.BitDepth;
- ///
- /// Returns the current camera operational state.
- ///
- ///
- /// Must be implemented, must not throw an ASCOM.NotImplementedException.
- /// Returns one of the following status information:
- ///
- /// Value State Meaning
- /// - 0 CameraRunning The camera is running and video frames are available for viewing and recording
- /// - 1 CameraRecording The camera is running and recording a video
- /// - 2 CameraError Camera error condition serious enough to prevent further operations (connection fail, etc.).
- ///
- /// CameraIdle and CameraBusy are optional states. Free running cameras cannot be stopped and don't have a CameraIdle state. When those cameras are powered they immediately enter CameraRunning state.
- /// Some digital cameras or video systems may support operations that take longer to complete. While those longer operations are running the camera will remain in the state it was before the operation started.
- /// The video camera state diagram is shown below:
- ///
- ///
- ///
- /// The state of the camera.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public VideoCameraState CameraState => (VideoCameraState)Device.CameraState;
- ///
- /// Returns True if the driver supports custom device properties configuration via the method.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. Include sufficient detail in the message text to enable the issue to be accurately diagnosed by someone other than yourself.
- /// Must be implemented, must not throw an ASCOM.NotImplementedException.
- ///
+ ///
public bool CanConfigureDeviceProperties => Device.CanConfigureDeviceProperties;
- ///
- /// The maximum supported exposure (integration time) in seconds.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw an ASCOM.NotImplementedException.
- /// This value is for information purposes only. The exposure cannot be set directly in seconds, use property to change the exposure.
- ///
+ ///
public double ExposureMax => Device.ExposureMax;
- ///
- /// The minimum supported exposure (integration time) in seconds.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw an ASCOM.NotImplementedException.
- /// This value is for information purposes only. The exposure cannot be set directly in seconds, use property to change the exposure.
- ///
+ ///
public double ExposureMin => Device.ExposureMin;
- ///
- /// The frame rate at which the camera is running.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw an ASCOM.NotImplementedException.
- /// Analogue cameras run in one of the two fixed frame rates - 25fps for PAL video and 29.97fps for NTSC video.
- /// Digital cameras usually can run at a variable frame rate. This value is for information purposes only and cannot be set. The FrameRate has the same value during the entire operation of the device.
- /// Changing the property may change the actual variable frame rate but cannot change the return value of this property.
- ///
+ ///
public VideoCameraFrameRate FrameRate => (VideoCameraFrameRate)Device.FrameRate;
- ///
- /// Index into the array for the selected camera gain.
- ///
- /// Short integer index for the current camera gain in the string array.
- /// Index into the Gains array for the selected camera gain
- /// Must throw an exception if gain is not supported.
- /// Must throw an exception if not valid.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// can be used to adjust the gain setting of the camera, if supported. There are two typical usage scenarios:
- ///
- /// - Discrete gain video cameras will return a 0-based array of strings - , which correspond to different discrete gain settings supported by the camera. must be set to an integer in this range. and must thrown an exception if
- /// this mode is used.
- /// - Adjustable gain video cameras - and return integers, which specify the valid range for .
- ///
- /// The driver must default to a valid value.
- ///
+ ///
public short Gain
{
get => Device.Gain;
set => Device.Gain = value;
}
- ///
- /// Maximum value of .
- ///
- /// Short integer representing the maximum gain value supported by the camera.
- /// The maximum gain value that this camera supports
- /// Must throw an exception if GainMax is not supported.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// When specifying the gain setting with an integer value, is used in conjunction with to
- /// specify the range of valid settings.
- /// shall be greater than . If either is available, then both must be available.
- /// Please see for more information.
- /// It is recommended that this function be called only after a connection is established with the camera hardware, to ensure
- /// that the driver is aware of the capabilities of the specific camera model.
- ///
+ ///
public short GainMax => Device.GainMax;
- ///
- /// Minimum value of .
- ///
- /// The minimum gain value that this camera supports
- /// Must throw an exception if GainMin is not supported.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// When specifying the gain setting with an integer value, is used in conjunction with to
- /// specify the range of valid settings.
- /// shall be greater than . If either is available, then both must be available.
- /// Please see for more information.
- /// It is recommended that this function be called only after a connection is established with the camera hardware, to ensure
- /// that the driver is aware of the capabilities of the specific camera model.
- ///
+ ///
public short GainMin => Device.GainMin;
- ///
- /// Gains supported by the camera.
- ///
- /// An ArrayList of gain names or values
- /// Must throw an exception if Gains is not supported
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// provides a 0-based array of available gain settings.
- /// Typically the application software will display the available gain settings in a drop list. The application will then supply
- /// the selected index to the driver via the property.
- /// The setting may alternatively be specified using integer values; if this mode is used then is invalid
- /// and must throw an exception. Please see and for more information.
- /// It is recommended that this function be called only after a connection is established with the camera hardware,
- /// to ensure that the driver is aware of the capabilities of the specific camera model.
- ///
+ ///
public IList Gains => (Device.Gains as IEnumerable).Cast().ToList();
- ///
- /// Index into the array for the selected camera gamma.
- ///
- /// Short integer index for the current camera gamma in the string array.
- /// Index into the Gammas array for the selected camera gamma
- /// Must throw an exception if Gamma is not supported.
- /// Must throw an exception if not valid.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// can be used to adjust the gamma setting of the camera, if supported. There are two typical usage scenarios:
- ///
- /// - Discrete gamma video cameras will return a 0-based array of strings - , which correspond to different discrete gamma settings supported by the camera. must be set to an integer in this range. and must thrown an exception if
- /// this mode is used.
- /// - Adjustable gain video cameras - and return integers, which specify the valid range for .
- ///
- /// The driver must default to a valid value.
- ///
+ ///
public short Gamma
{
get => Device.Gamma;
set => Device.Gamma = value;
}
- ///
- /// Maximum value of .
- ///
- /// Short integer representing the maximum gamma value supported by the camera.
- /// The maximum gain value that this camera supports
- /// Must throw an exception if GammaMax is not supported
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// When specifying the gamma setting with an integer value, is used in conjunction with to
- /// specify the range of valid settings.
- /// shall be greater than . If either is available, then both must be available.
- /// Please see for more information.
- /// It is recommended that this function be called only after a connection is established with the camera hardware, to ensure
- /// that the driver is aware of the capabilities of the specific camera model.
- ///
+ ///
public short GammaMax => Device.GammaMax;
- ///
- /// Minimum value of .
- ///
- /// The minimum gamma value that this camera supports
- /// Must throw an exception if GammaMin is not supported.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// When specifying the gamma setting with an integer value, is used in conjunction with to
- /// specify the range of valid settings.
- /// shall be greater than . If either is available, then both must be available.
- /// Please see for more information.
- /// It is recommended that this function be called only after a connection is established with the camera hardware, to ensure
- /// that the driver is aware of the capabilities of the specific camera model.
- ///
+ ///
public short GammaMin => Device.GammaMin;
- ///
- /// Gammas supported by the camera.
- ///
- /// An ArrayList of gamma names or values
- /// Must throw an exception if Gammas is not supported
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// provides a 0-based array of available gamma settings. This list can contain the widely used values of OFF, LO and HI that correspond to gammas of 1.00, 0.45 and 0.35 as well as other extended values.
- /// Typically the application software will display the available gamma settings in a drop list. The application will then supply
- /// the selected index to the driver via the property.
- /// The setting may alternatively be specified using integer values; if this mode is used then is invalid
- /// and must throw an exception. Please see and for more information.
- /// It is recommended that this function be called only after a connection is established with the camera hardware,
- /// to ensure that the driver is aware of the capabilities of the specific camera model.
- ///
+ ///
public IList Gammas => (Device.Gammas as IEnumerable).Cast().ToList();
- ///
- /// Returns the height of the video frame in pixels.
- ///
- /// The video frame height.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw an ASCOM.NotImplementedException.
- /// For analogue video cameras working via a frame grabber the dimensions of the video frames may be different than the dimension of the CCD chip
- ///
+ ///
public int Height => Device.Height;
- ///
- /// Index into the array for the selected camera integration rate.
- ///
- /// Integer index for the current camera integration rate in the string array.
- /// Index into the SupportedIntegrationRates array for the selected camera integration rate.
- /// Must throw an exception if the camera supports only one integration rate (exposure) that cannot be changed.
- /// Must throw an exception if not valid.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// can be used to adjust the integration rate (exposure) of the camera, if supported. A 0-based array of strings - ,
- /// which correspond to different discrete integration rate settings supported by the camera will be returned. must be set to an integer in this range.
- /// The driver must default to a valid value when integration rate is supported by the camera.
- ///
+ ///
public int IntegrationRate
{
get => Device.IntegrationRate;
set => Device.IntegrationRate = value;
}
- ///
- /// Returns an with its property populated.
- ///
- /// The current video frame.
- /// If called before any video frame has been taken.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw an ASCOM.NotImplementedException.
- ///
+ ///
public IVideoFrame LastVideoFrame
{
get
@@ -375,428 +171,49 @@ public IVideoFrame LastVideoFrame
}
}
- ///
- /// Returns the width of the CCD chip pixels in microns.
- ///
- /// The pixel size X if known.
- /// Must throw exception if not implemented.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public double PixelSizeX => Device.PixelSizeX;
- ///
- /// Returns the height of the CCD chip pixels in microns.
- ///
- /// The pixel size Y if known.
- /// Must throw exception if not implemented.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public double PixelSizeY => Device.PixelSizeY;
- ///
- /// Sensor name.
- ///
- /// The name of sensor used within the camera.
- /// Must throw exception if not implemented.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// Returns the name (data sheet part number) of the sensor, e.g. ICX285AL. The format is to be exactly as shown on
- /// manufacturer data sheet, subject to the following rules. All letter shall be upper case. Spaces shall not be included.
- /// Any extra suffixes that define region codes, package types, temperature range, coatings, grading, color/monochrome,
- /// etc. shall not be included. For color sensors, if a suffix differentiates different Bayer matrix encodings, it shall be
- /// included.
- /// Examples:
- ///
- /// - ICX285AL-F shall be reported as ICX285
- /// - KAF-8300-AXC-CD-AA shall be reported as KAF-8300
- ///
- /// Note:
- /// The most common usage of this property is to select approximate color balance parameters to be applied to
- /// the Bayer matrix of one-shot color sensors. Application authors should assume that an appropriate IR cut-off filter is
- /// in place for color sensors.
- /// It is recommended that this function be called only after a connection is established with
- /// the camera hardware, to ensure that the driver is aware of the capabilities of the specific camera model.
- ///
+ ///
public string SensorName => Device.SensorName;
- ///
- /// Type of colour information returned by the camera sensor.
- ///
- ///
- /// The enum value of the camera sensor
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw an ASCOM.NotImplementedException.
- /// returns a value indicating whether the sensor is monochrome, or what Bayer matrix it encodes.
- /// The following values are defined:
- ///
- ///
- ///
- ///
- ///
- ///
- /// |
- /// Value |
- ///
- /// Enumeration |
- ///
- /// Meaning |
- ///
- ///
- /// |
- /// 0 |
- ///
- /// Monochrome |
- ///
- /// Camera produces monochrome array with no Bayer encoding |
- ///
- ///
- /// |
- /// 1 |
- ///
- /// Colour |
- ///
- /// Camera produces color image directly, requiring not Bayer decoding. The monochrome pixels for the R, G and B channels are returned in this order in the . |
- ///
- ///
- /// |
- /// 2 |
- ///
- /// RGGB |
- ///
- /// Camera produces RGGB encoded Bayer array images |
- ///
- ///
- /// |
- /// 3 |
- ///
- /// CMYG |
- ///
- /// Camera produces CMYG encoded Bayer array images |
- ///
- ///
- /// |
- /// 4 |
- ///
- /// CMYG2 |
- ///
- /// Camera produces CMYG2 encoded Bayer array images |
- ///
- ///
- /// |
- /// 5 |
- ///
- /// LRGB |
- ///
- /// Camera produces Kodak TRUESENSE Bayer LRGB array images |
- ///
- ///
- ///
- /// Please note that additional values may be defined in future updates of the standard, as new Bayer matrices may be created
- /// by sensor manufacturers in the future. If this occurs, then a new enumeration value shall be defined. The pre-existing enumeration
- /// values shall not change.
- /// In the following definitions, R = red, G = green, B = blue, C = cyan, M = magenta, Y = yellow. The Bayer matrix is
- /// defined with X increasing from left to right, and Y increasing from top to bottom. The pattern repeats every N x M pixels for the
- /// entire pixel array, where N is the height of the Bayer matrix, and M is the width.
- /// RGGB indicates the following matrix:
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// |
- /// |
- ///
- /// X = 0 |
- ///
- /// X = 1 |
- ///
- ///
- /// |
- /// Y = 0 |
- ///
- /// R |
- ///
- /// G |
- ///
- ///
- /// |
- /// Y = 1 |
- ///
- /// G |
- ///
- /// B |
- ///
- ///
- ///
- /// CMYG indicates the following matrix:
- ///
- ///
- ///
- ///
- ///
- ///
- /// |
- /// |
- ///
- /// X = 0 |
- ///
- /// X = 1 |
- ///
- ///
- /// |
- /// Y = 0 |
- ///
- /// Y |
- ///
- /// C |
- ///
- ///
- /// |
- /// Y = 1 |
- ///
- /// G |
- ///
- /// M |
- ///
- ///
- ///
- /// CMYG2 indicates the following matrix:
- ///
- ///
- ///
- ///
- ///
- ///
- /// |
- /// |
- ///
- /// X = 0 |
- ///
- /// X = 1 |
- ///
- ///
- /// |
- /// Y = 0 |
- ///
- /// C |
- ///
- /// Y |
- ///
- ///
- /// |
- /// Y = 1 |
- ///
- /// M |
- ///
- /// G |
- ///
- ///
- /// |
- /// Y = 2 |
- ///
- /// C |
- ///
- /// Y |
- ///
- ///
- /// |
- /// Y = 3 |
- ///
- /// G |
- ///
- /// M |
- ///
- ///
- ///
- /// LRGB indicates the following matrix (Kodak TRUESENSE):
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// |
- /// |
- ///
- /// X = 0 |
- ///
- /// X = 1 |
- ///
- /// X = 2 |
- ///
- /// X = 3 |
- ///
- ///
- /// |
- /// Y = 0 |
- ///
- /// L |
- ///
- /// R |
- ///
- /// L |
- ///
- /// G |
- ///
- ///
- /// |
- /// Y = 1 |
- ///
- /// R |
- ///
- /// L |
- ///
- /// G |
- ///
- /// L |
- ///
- ///
- /// |
- /// Y = 2 |
- ///
- /// L |
- ///
- /// G |
- ///
- /// L |
- ///
- /// B |
- ///
- ///
- /// |
- /// Y = 3 |
- ///
- /// G |
- ///
- /// L |
- ///
- /// B |
- ///
- /// L |
- ///
- ///
- ///
- /// It is recommended that this function be called only after a connection is established with the camera hardware, to ensure that
- /// the driver is aware of the capabilities of the specific camera model.
- ///
+ ///
public SensorType SensorType => (SensorType)Device.SensorType;
- ///
- /// Returns the list of integration rates supported by the video camera.
- ///
- /// The list of supported integration rates in seconds.
- /// Must throw exception if camera supports only one integration rate (exposure) that cannot be changed.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Digital and integrating analogue video cameras allow the effective exposure of a frame to be changed. If the camera supports setting the exposure directly i.e. 2.153 sec then the driver must only
- /// return a range of useful supported exposures. For many video cameras the supported exposures (integration rates) increase by a factor of 2 from a base exposure e.g. 1, 2, 4, 8, 16 sec or 0.04, 0.08, 0.16, 0.32, 0.64, 1.28, 2.56, 5.12, 10.24 sec.
- /// If the cameras supports only one exposure that cannot be changed (such as all non integrating PAL or NTSC video cameras) then this property must throw .
- ///
+ ///
public IList SupportedIntegrationRates => (Device.SupportedIntegrationRates as IEnumerable).Cast().ToList();
- ///
- /// The name of the video capture device when such a device is used.
- ///
- /// Must throw an exception if not implemented.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// For analogue video this is usually the video capture card or dongle attached to the computer.
- ///
+ ///
public string VideoCaptureDeviceName => Device.VideoCaptureDeviceName;
- ///
- /// Returns the video codec used to record the video file.
- ///
- /// Must throw exception if not implemented.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// For AVI files this is usually the FourCC identifier of the codec- e.g. XVID, DVSD, YUY2, HFYU etc.
- /// If the recorded video file doesn't use codecs an empty string must be returned.
- ///
+ ///
public string VideoCodec => Device.VideoCodec;
- ///
- /// Returns the file format of the recorded video file, e.g. AVI, MPEG, ADV etc.
- ///
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw an ASCOM.NotImplementedException.
- ///
+ ///
public string VideoFileFormat => Device.VideoFileFormat;
- ///
- /// The size of the video frame buffer.
- ///
- /// The size of the video frame buffer.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- /// Must be implemented, must not throw an ASCOM.NotImplementedException.
When retrieving video frames using the property
- /// the driver may use a buffer to queue the frames waiting to be read by the client. This property returns the size of the buffer in frames or
- /// if no buffering is supported then the value of less than 2 should be returned. The size of the buffer can be controlled by the end user from the driver setup dialog.
- ///
+ ///
public int VideoFramesBufferSize => Device.VideoFramesBufferSize;
- ///
- /// Returns the width of the video frame in pixels.
- ///
- /// The video frame width.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// Must be implemented, must not throw an ASCOM.NotImplementedException.
- /// For analogue video cameras working via a frame grabber the dimensions of the video frames may be different than the dimension of the CCD chip
- ///
+ ///
public int Width => Device.Width;
- ///
- /// Displays a device properties configuration dialog that allows the configuration of specialized settings.
- ///
- /// Must throw an exception if not implemented.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
- ///
- /// The dialog could also provide buttons for cameras that can be controlled via 'on screen display' menus and a set of navigation buttons such as Up, Down, Left, Right and Enter.
- /// This dialog is not intended to be used in unattended mode but can give greater control over video cameras that provide special features. The dialog may also allow
- /// changing standard interface settings such as Gamma and Gain. If a client software
- /// displays any interface settings then it should take care to keep in sync the values changed by this method and those changed directly via the interface.
- /// To support automated and unattended control over the specialized device settings or functions available on this dialog the driver should also allow their control via .
- /// This dialog is meant to be used by the applications to allow the user to adjust specialized device settings when those applications don't specifically use the specialized settings in their functionality.
- /// Examples for specialized settings that could be supported are white balance and sharpness.
- ///
+ ///
public void ConfigureDeviceProperties()
{
Device.ConfigureDeviceProperties();
}
- ///
- /// Starts recording a new video file.
- ///
- /// The file name requested by the client. Some systems may not allow the file name to be controlled directly and they should ignore this parameter.
- /// The actual file name of the file that is being recorded.
- /// Must throw exception if not implemented.
- /// Must throw exception if the current camera state doesn't allow to begin recording a file.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public string StartRecordingVideoFile(string PreferredFileName)
{
return Device.StartRecordingVideoFile(PreferredFileName);
}
- ///
- /// Stops the recording of a video file.
- ///
- /// Must throw exception if not implemented.
- /// Must throw exception if the current camera state doesn't allow to stop recording the file or no file is currently being recorded.
- /// When is False.
- /// An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
+ ///
public void StopRecordingVideoFile()
{
Device.StopRecordingVideoFile();
diff --git a/ASCOM.Com/ASCOM.Com.csproj b/ASCOM.Com/ASCOM.Com.csproj
index a29768fb..e7a49d01 100644
--- a/ASCOM.Com/ASCOM.Com.csproj
+++ b/ASCOM.Com/ASCOM.Com.csproj
@@ -1,56 +1,57 @@
-
- netstandard2.0
- ASCOM Initiative, Daniel Van Noord and Peter Simpson
- A .Net Standard library for accessing ASCOM COM based drivers on Windows platforms and for reading ASCOM Profile information.
- Copyright ASCOM Initiative 2022
- true
- ASCOM.Com.Components
- true
- ..\ASCOM.snk
- false
- ASCOMBoarderless.png
- ascom;alpaca;com;driveraccess
- ASCOM COM Components
- Debug;Release
- True
- MIT
- README.md
-
-
-
- embedded
-
-
-
- embedded
-
-
-
-
-
-
-
-
- True
-
-
-
- True
- \
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ $(LibraryFrameworks)
+ ASCOM Initiative, Daniel Van Noord and Peter Simpson
+
+ Library of components for accessing ASCOM COM based drivers on Windows platforms and for reading ASCOM Profile information.
+
+
+ See README.md for full details of changes in this release.
+
+ true
+ ASCOM.Com.Components
+ ASCOMBoarderless.png
+ ascom;alpaca;com;driveraccess
+ ASCOM COM Components
+ Debug;Release
+ True
+ MIT
+ README.md
+
+
+
+ embedded
+
+
+
+ embedded
+
+
+
+
+
+
+
+
+ True
+
+
+
+ True
+ \
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ASCOM.Com/Chooser.cs b/ASCOM.Com/Chooser.cs
index 5c5a8319..462d3e12 100644
--- a/ASCOM.Com/Chooser.cs
+++ b/ASCOM.Com/Chooser.cs
@@ -59,7 +59,7 @@ public Chooser(ILogger logger)
// Create a Chooser COM object and save the reference to the chooser variable
- LogMessage(LogLevel.Debug, "Initialise", $"FOund type {chooserType.FullName}.");
+ LogMessage(LogLevel.Debug, "Initialise", $"Found type {chooserType.FullName}, Creating Chooser COM instance...");
chooser = Activator.CreateInstance(chooserType);
LogMessage(LogLevel.Debug, "Initialise", $"Created Chooser OK.");
}
@@ -145,6 +145,7 @@ public DeviceTypes DeviceType
/// Select the ASCOM driver to use without pre-selecting one in the drop-down list
///
/// The ProgID of the selected device or an empty string if no device was chosen
+ [Obsolete("ASCOM.Com.Chooser wraps the .NET 3.5 COM Chooser component and is not Intel CET compatible. If you target .NET 9 or later, you should migrate to the Stand Alone Chooser (ASCOM.Com.ChooserSA) to avoid CET related crashes.")]
public string Choose()
{
CheckOK("Choose(\"\")");
@@ -159,7 +160,7 @@ public string Choose()
///