1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
use super::Device;
use crate::{ASCOMError, ASCOMResult};
use macro_rules_attribute::apply;
/// ObservingConditions Specific Methods.
#[apply(rpc_trait)]
pub trait ObservingConditions: Device + Send + Sync {
/// Gets the time period over which observations will be averaged.
#[http("averageperiod", method = Get)]
async fn average_period(&self) -> ASCOMResult<f64>;
/// Sets the time period over which observations will be averaged.
#[http("averageperiod", method = Put)]
async fn set_average_period(
&self,
#[http("AveragePeriod")] average_period: f64,
) -> ASCOMResult<()> {
Err(ASCOMError::NOT_IMPLEMENTED)
}
/// Gets the percentage of the sky obscured by cloud.
#[http("cloudcover", method = Get, device_state = "CloudCover")]
async fn cloud_cover(&self) -> ASCOMResult<f64> {
Err(ASCOMError::NOT_IMPLEMENTED)
}
/// Gets the atmospheric dew point at the observatory reported in °C.
#[http("dewpoint", method = Get, device_state = "DewPoint")]
async fn dew_point(&self) -> ASCOMResult<f64> {
Err(ASCOMError::NOT_IMPLEMENTED)
}
/// Gets the atmospheric humidity (%) at the observatory.
#[http("humidity", method = Get, device_state = "Humidity")]
async fn humidity(&self) -> ASCOMResult<f64> {
Err(ASCOMError::NOT_IMPLEMENTED)
}
/// Gets the atmospheric pressure in hectoPascals at the observatory's altitude - NOT reduced to sea level.
#[http("pressure", method = Get, device_state = "Pressure")]
async fn pressure(&self) -> ASCOMResult<f64> {
Err(ASCOMError::NOT_IMPLEMENTED)
}
/// Gets the rain rate (mm/hour) at the observatory.
#[http("rainrate", method = Get, device_state = "RainRate")]
async fn rain_rate(&self) -> ASCOMResult<f64> {
Err(ASCOMError::NOT_IMPLEMENTED)
}
/// Gets the sky brightness at the observatory (Lux).
#[http("skybrightness", method = Get, device_state = "SkyBrightness")]
async fn sky_brightness(&self) -> ASCOMResult<f64> {
Err(ASCOMError::NOT_IMPLEMENTED)
}
/// Gets the sky quality at the observatory (magnitudes per square arc second).
#[http("skyquality", method = Get, device_state = "SkyQuality")]
async fn sky_quality(&self) -> ASCOMResult<f64> {
Err(ASCOMError::NOT_IMPLEMENTED)
}
/// Gets the sky temperature(°C) at the observatory.
#[http("skytemperature", method = Get, device_state = "SkyTemperature")]
async fn sky_temperature(&self) -> ASCOMResult<f64> {
Err(ASCOMError::NOT_IMPLEMENTED)
}
/// Gets the seeing at the observatory measured as star full width half maximum (FWHM) in arc secs.
#[http("starfwhm", method = Get)]
async fn star_fwhm(&self) -> ASCOMResult<f64> {
Err(ASCOMError::NOT_IMPLEMENTED)
}
/// Gets the temperature(°C) at the observatory.
#[http("temperature", method = Get, device_state = "Temperature")]
async fn temperature(&self) -> ASCOMResult<f64> {
Err(ASCOMError::NOT_IMPLEMENTED)
}
/// Gets the wind direction.
///
/// The returned value must be between 0.0 and 360.0, interpreted according to the metereological 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.
#[http("winddirection", method = Get, device_state = "WindDirection")]
async fn wind_direction(&self) -> ASCOMResult<f64> {
Err(ASCOMError::NOT_IMPLEMENTED)
}
/// Gets the peak 3 second wind gust(m/s) at the observatory over the last 2 minutes.
#[http("windgust", method = Get, device_state = "WindGust")]
async fn wind_gust(&self) -> ASCOMResult<f64> {
Err(ASCOMError::NOT_IMPLEMENTED)
}
/// Gets the wind speed(m/s) at the observatory.
#[http("windspeed", method = Get, device_state = "WindSpeed")]
async fn wind_speed(&self) -> ASCOMResult<f64> {
Err(ASCOMError::NOT_IMPLEMENTED)
}
/// Forces the driver to immediately query its attached hardware to refresh sensor values.
#[http("refresh", method = Put)]
async fn refresh(&self) -> ASCOMResult<()> {
Err(ASCOMError::NOT_IMPLEMENTED)
}
/// Gets a description of the sensor with the name specified in the SensorName parameter.
#[http("sensordescription", method = Get)]
async fn sensor_description(
&self,
#[http("SensorName")] sensor_name: String,
) -> ASCOMResult<String> {
Err(ASCOMError::NOT_IMPLEMENTED)
}
/// Gets the time since the sensor specified in the SensorName parameter was last updated.
#[http("timesincelastupdate", method = Get)]
async fn time_since_last_update(
&self,
#[http("SensorName")] sensor_name: String,
) -> ASCOMResult<f64> {
Err(ASCOMError::NOT_IMPLEMENTED)
}
/// 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.
#[http("interfaceversion", method = Get)]
async fn interface_version(&self) -> ASCOMResult<u16> {
Ok(2)
}
}