Ejemplo n.º 1
0
 /// <summary>
 /// captures images at specified time intervals
 /// </summary>
 /// <param name="vb">a videobrush object for the camera</param>
 /// <param name="samplingFrequency">time between image captures(in minutes)</param>
 /// <param name="count">number of times images are to be captured</param>
 public void CaptureImage(VideoBrush vb,int samplingFrequency, int count)
 {
     this.count=count;
     source = new EventSource(samplingFrequency, 0);
     source.OnEvent += new EventSource.TickEventHandler(Source_OnEvent);
     source.Start();
     source.OffEvent += new EventSource.TickEventHandler(Source_OffEvent);
        InitializeCamera(vb);
 }
 /// <summary>
 /// gets accelerometer readings at continuous time intervals
 /// </summary>
 /// <param name="samplingFrequency">time between data collection(in minutes)</param>
 /// <param name="collectionDuration">duration of data collection(in minutes)</param>
 /// <param name="count">number of times data is to be collected in chunks</param>
 /// <param name="collectionFrequency">sets the TimeBetweenUpdates prop of accelerometer object(in milliseconds)</param>
 /// <param name="fileName">filename in which readings are to be stored</param>
 public void GetAccReading(int samplingFrequency, int collectionDuration, int count, int collectionFrequency,string fileName)
 {
     this.count = count;
     this.fileName = fileName;
     evs = new EventSource(samplingFrequency, collectionDuration);
     evs.OnEvent += new EventSource.TickEventHandler(Source_OnEvent);
     evs.Start();
     evs.OffEvent += new EventSource.TickEventHandler(Source_OffEvent);
     InitializeAcc(collectionFrequency);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// records data from default microphone for user defined intervals
 /// </summary>
 /// <param name="samplingFrequency">time between data collection(in minutes)</param>
 /// <param name="collectionDuration">duration of data collection(in minutes)</param>
 /// <param name="count">number of times data is to be collected in chunks</param>
 /// <param name="bufferDuration">duration of microphone buffer data in milliseconds</param>
 public void RecordMicData(int samplingFrequency, int collectionDuration, int count, int bufferDuration)
 {
     this.count = count;
     source = new EventSource(samplingFrequency, collectionDuration);
     source.OnEvent += new EventSource.TickEventHandler(Source_OnEvent);
     source.Start();
     itCount = 0;
     source.OffEvent += new EventSource.TickEventHandler(Source_OffEvent);
     InitializeMic(bufferDuration);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// collects multiple GPS readings after particular time intervals
 /// </summary>
 /// <param name="samplingFrequency">time between data collection(in minutes)</param>
 /// <param name="collectionDuration">duration of data collection(in minutes)</param>
 /// <param name="count">number of times data is to be collected in chunks</param>
 /// <param name="collectionFrequency">frequency of collecting GPS data(in milliseconds)</param>
 /// <param name="fileName">filename in which GPS readings are to be stored</param>
 public void GetMultipleGPSReadings(int samplingFrequency, int collectionDuration, int count, int collectionFrequency, string fileName)
 {
     this.fileName = fileName;
     this.count = count;
     this.collectionDuration = collectionDuration;
     InitializeGPS(collectionFrequency);
     source = new EventSource(samplingFrequency, collectionDuration);
     source.OnEvent += new EventSource.TickEventHandler(Source_OnEvent);
     source.Start();
     itCount = 0;
       source.OffEvent += new EventSource.TickEventHandler(Source_OffEvent);
 }