ascom_alpaca/api/
filter_wheel.rs1use super::Device;
2use crate::{ASCOMError, ASCOMResult};
3use macro_rules_attribute::apply;
4
5#[apply(rpc_trait)]
7pub trait FilterWheel: Device + Send + Sync {
8 #[http("focusoffsets", method = Get)]
10 async fn focus_offsets(&self) -> ASCOMResult<Vec<i32>>;
11
12 #[http("names", method = Get)]
14 async fn names(&self) -> ASCOMResult<Vec<String>>;
15
16 #[http("position", method = Get, device_state = Position)]
18 async fn position(&self) -> ASCOMResult<i32>;
19
20 #[http("position", method = Put)]
22 async fn set_position(&self, #[http("Position")] position: i32) -> ASCOMResult<()> {
23 Err(ASCOMError::NOT_IMPLEMENTED)
24 }
25
26 #[http("interfaceversion", method = Get)]
30 async fn interface_version(&self) -> ASCOMResult<i32> {
31 Ok(3_i32)
32 }
33}