Struct spaceapi_server::sensors::SensorSpec
[−]
[src]
pub struct SensorSpec { pub template: Box<SensorTemplate>, pub data_key: String, }
A specification of a sensor.
The template
field contains the static data of a sensor and
the data_key
says how to find the sensor value in Redis.
Fields
template | |
data_key |
Methods
impl SensorSpec
fn get_sensor_value(&self, redis_connection_info: &ConnectionInfo) -> Result<String, SensorError>
Retrieve sensor value from Redis.
fn set_sensor_value(&self, redis_connection_info: &ConnectionInfo, value: &str) -> Result<(), SensorError>
Set sensor value in Redis.