}//PopulateAllCaptures /// <summary> /// Populates all captures with a defined length (numberMinutes) /// </summary> public void PopulateTimedCaptures() { list = new List <CaptureTesting>(); ConnectionStringSettingsCollection connections = ConfigurationManager.ConnectionStrings; CaptureDbTest captureInfo = new CaptureDbTest(connections["LOCALDB"].ConnectionString); DataTable dt = captureInfo.ReturnTimedCaptures(); foreach (DataRow dr in dt.Rows) { AddCapture(dr); } }
/// <summary> /// Populates metadata about each capture session available /// allData will load additional metadata, like when movement occurs /// </summary> /// <param name="movementData"></param> public new void PopulateAllCaptures(bool movementData) { list = new List <CaptureTesting>(); ConnectionStringSettingsCollection connections = ConfigurationManager.ConnectionStrings; captureInfo = new CaptureDbTest(connections["LOCALDB"].ConnectionString); DataTable dt = captureInfo.ReturnAllCaptures(); foreach (DataRow dr in dt.Rows) { AddCapture(dr); } if (movementData) { PopulateMovement(); } }//PopulateAllCaptures
/// <summary> /// Records a number of live captures across a range of time periods, and saves to the /// capture database. Later used for lag testing. /// </summary> static void CreateTimedTests() { //1 to 20 minutes for (int i = 1; i < 21; i++) { Write("Setting up " + i + " minute test"); //set up the extractor ImageExtractor imageExtractor = new ImageExtractor(url, username, password); //set up the save file object imageSaver = new ImageSaver(0, 1); imageExtractor.imageCreated += new ImageExtractor.ImageCreatedEvent(imageSaver.ImageCreatedAsync); imageExtractor.framerateBroadcast += new ImageExtractor.FramerateBroadcastEvent(FramerateBroadcastEventHandler); imageExtractor.Run(i); CaptureDbTest db = new CaptureDbTest(ConfigurationManager.ConnectionStrings["LOCALDB"].ConnectionString); db.AddTimedCapture(imageSaver.captureId, i); } }
internal override void WriteToDatabase(CaptureTesting captureTest, MotionSensorSettingsTest motionSettings) { var db = new CaptureDbTest(ConfigurationManager.ConnectionStrings["LOCALDB"].ConnectionString); db.CreateLagTestSession(captureTest.captureId, motionSettings.asynchronous, elapsedMilliseconds); }
internal override void WriteToDatabase(CaptureTesting captureTest, MotionSensorSettingsTest motionSettings) { var db = new CaptureDbTest(ConfigurationManager.ConnectionStrings["LOCALDB"].ConnectionString); db.CreateDetectionSession(captureTest.SerialiseMe(), motionSettings.SerialiseMe(), captureTest.captureId); }