ascom_alpaca/api/
focuser.rs1use super::Device;
2use crate::{ASCOMError, ASCOMResult};
3use macro_rules_attribute::apply;
4
5#[apply(rpc_trait)]
7pub trait Focuser: Device + Send + Sync {
8 #[http("absolute", method = Get)]
10 async fn absolute(&self) -> ASCOMResult<bool>;
11
12 #[http("ismoving", method = Get, device_state = IsMoving)]
16 async fn is_moving(&self) -> ASCOMResult<bool>;
17
18 #[http("maxincrement", method = Get)]
20 async fn max_increment(&self) -> ASCOMResult<i32>;
21
22 #[http("maxstep", method = Get)]
24 async fn max_step(&self) -> ASCOMResult<i32>;
25
26 #[http("position", method = Get, device_state = Position)]
28 async fn position(&self) -> ASCOMResult<i32> {
29 Err(ASCOMError::NOT_IMPLEMENTED)
30 }
31
32 #[http("stepsize", method = Get)]
34 async fn step_size(&self) -> ASCOMResult<f64> {
35 Err(ASCOMError::NOT_IMPLEMENTED)
36 }
37
38 #[http("tempcomp", method = Get)]
40 async fn temp_comp(&self) -> ASCOMResult<bool>;
41
42 #[http("tempcomp", method = Put)]
44 async fn set_temp_comp(&self, #[http("TempComp")] temp_comp: bool) -> ASCOMResult<()> {
45 Err(ASCOMError::NOT_IMPLEMENTED)
46 }
47
48 #[http("tempcompavailable", method = Get)]
50 async fn temp_comp_available(&self) -> ASCOMResult<bool>;
51
52 #[http("temperature", method = Get, device_state = Temperature)]
54 async fn temperature(&self) -> ASCOMResult<f64> {
55 Err(ASCOMError::NOT_IMPLEMENTED)
56 }
57
58 #[http("halt", method = Put)]
60 async fn halt(&self) -> ASCOMResult<()> {
61 Err(ASCOMError::NOT_IMPLEMENTED)
62 }
63
64 #[http("move", method = Put)]
66 async fn move_(&self, #[http("Position")] position: i32) -> ASCOMResult<()>;
67
68 #[http("interfaceversion", method = Get)]
72 async fn interface_version(&self) -> ASCOMResult<i32> {
73 Ok(4_i32)
74 }
75}