CEBL  2.1
RandomDataStream.cpp
Go to the documentation of this file.
1 
9 #include "RandomDataStream.hpp"
10 #include <cppR/cppR.hpp>
11 #include <iostream>
12 using namespace std;
13 //----------------------------------------------------------------------
14 // CONSTRUCTORS / DESTRUCTORS
15 
17 {}
19 {}
20 
21 
22 //----------------------------------------------------------------------
23 
24 void RandomDataStream::updater()
25 {
26  int samples = sample_rate * (timeout_length / 1000.0);
27  ublas::matrix<double> data
28  = cppR::createMatrix(static_cast<ublas::vector<double> >(cppR::runif<double>(24 * samples)),
29  24,samples);
30 
31  data *= 8;
32 
33  {
34  boost::mutex::scoped_lock lock(thread_lock);
35  buffer.append(data);
36  }
37 
38 }
39 
40 void RandomDataStream::onStart()
41 {
42 }
43 
44 void RandomDataStream::onStop()
45 {
46 }
47 
48 
49 
50