changeset 608:71f045231a07 rust

remove unused file
author Matt Johnston <matt@ucc.asn.au>
date Fri, 17 Feb 2017 23:07:33 +0800
parents 282fae1c12e4
children 7bda01659426
files rust/src/configwaiter.rs
diffstat 1 files changed, 0 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/rust/src/configwaiter.rs	Fri Feb 17 22:27:44 2017 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-extern crate tokio_core;
-extern crate futures;
-extern crate rand;
-
-use std::time::Duration;
-use std::io;
-
-use tokio_core::reactor::Interval;
-use tokio_core::reactor::Handle;
-use futures::Stream;
-use types::*;
-
-pub struct ParamWaiter {
-}
-
-impl ParamWaiter {
-    fn step(&mut self) -> Params {
-        let mut p = Params::defaults();
-        let mut rng = rand::thread_rng();
-        p.fridge_setpoint = 17.0 + 4.0*rand::random::<f32>();
-        p
-    }
-
-    pub fn new() -> Self {
-        ParamWaiter {}
-    }
-
-    pub fn run(handle: &Handle, rate: u64) -> Box<Stream<Item=Params, Error=io::Error>> {
-        let mut s = ParamWaiter::new();
-
-        let dur = Duration::from_millis(rate);
-        Interval::new(dur, handle).unwrap().map(move |()| {
-            s.step()
-        }).boxed()
-    }
-}
-