daily pastebin goal
68%
SHARE
TWEET

Untitled

a guest Mar 20th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Signal
  2. {
  3.     public double[] Times;
  4.     public double[] Intensities;
  5.     Random r = new Random();
  6.  
  7.     public Signal(double[] times, double[] intensities)
  8.     {
  9.         this.Times = times;
  10.         this.Intensities = intensities;
  11.     }
  12.     private double[] SimulateSignal()
  13.     {
  14.         double[] s = new double[1000];
  15.         for (int i = 0; i < 1000; i++)
  16.         {
  17.             s[i] = r.NextDouble();
  18.         }
  19.         return s;
  20.  
  21.     }
  22.  
  23.     public void StreamSimulator()
  24.     {
  25.         var time = SimulateSignal();
  26.         var inten = SimulateSignal();
  27.  
  28.         //simualte data sream generator
  29.         for(int i = 0;i < 1000; i++)
  30.         {
  31.             var signal = new Signal(time, inten);
  32.  
  33.             //while this simlator is creating this signal
  34.             //I want a separate process to buffer and
  35.             //stream the data to s3 storage (AWS
  36.         }
  37.     }
  38. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top