SafetyMonitor

Trait SafetyMonitor 

Source
pub trait SafetyMonitor:
    Device
    + Send
    + Sync {
    // Required method
    fn is_safe<'this: 'async_trait, 'async_trait>(
        &'this self,
    ) -> ASCOMResultFuture<'async_trait, bool>;

    // Provided methods
    fn interface_version<'this: 'async_trait, 'async_trait>(
        &'this self,
    ) -> ASCOMResultFuture<'async_trait, i32> { ... }
    fn device_state<'this: 'async_trait, 'async_trait>(
        &'this self,
    ) -> ASCOMResultFuture<'async_trait, TimestampedDeviceState<DeviceState>> { ... }
}
Available on crate feature safety_monitor only.
Expand description

SafetyMonitor Specific Methods.

Required Methods§

Source

fn is_safe<'this: 'async_trait, 'async_trait>( &'this self, ) -> ASCOMResultFuture<'async_trait, bool>

async fn is_safe(&self) -> ASCOMResult<bool>

Indicates whether the monitored state is safe for use.

True if the state is safe, False if it is unsafe.

Provided Methods§

Source

fn interface_version<'this: 'async_trait, 'async_trait>( &'this self, ) -> ASCOMResultFuture<'async_trait, i32>

async fn interface_version(&self) -> ASCOMResult<i32>

This method returns the version of the ASCOM device interface contract to which this device complies.

Only one interface version is current at a moment in time and all new devices should be built to the latest interface version. Applications can choose which device interface versions they support and it is in their interest to support previous versions as well as the current version to ensure thay can use the largest number of devices.

Source

fn device_state<'this: 'async_trait, 'async_trait>( &'this self, ) -> ASCOMResultFuture<'async_trait, TimestampedDeviceState<DeviceState>>

Return all operational properties of this device.

See What is the “read all” feature and what are its rules?.

Trait Implementations§

Source§

impl Hash for dyn SafetyMonitor

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
Source§

impl PartialEq for dyn SafetyMonitor

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for dyn SafetyMonitor

Implementors§