Example #1
0
        private void form_OnSendComplete(object sender, CaptureProgram captureProgram)
        {
            CaptureProgram = captureProgram;
            captureProgram.SendProcessRequest(_socket);
            total = BitConverter.ToInt64(_socket.Receive(), 0);
            curr  = 0;

            pollTimer.Start();
        }
Example #2
0
        private void btnStart_Click(object sender, EventArgs e)
        {
            if (lbSources.Items.Count < 1)
            {
                MessageBox.Show("No capture sources specified.");
                return;
            }

            string[] files = new string[lbSources.Items.Count];
            for (int k = 0; k < files.Length; k++)
            {
                files[k] = lbSources.Items[k].ToString();
            }

            CaptureProgram program      = new CaptureProgram(files);
            string         outputFolder = tbProjectFolder.Text + tbProjectName.Text + "\\";

            if (!Directory.Exists(outputFolder))
            {
                Directory.CreateDirectory(outputFolder);
            }

            program.CreateIndex(outputFolder, chIndexing.Checked);

            if (chFilter.Checked)
            {
                if (!cbGpu.Enabled)
                {
                    MessageBox.Show("Filtering requires a CUDA capable GPU with a compute capability of 3.5 or greater.");
                }
                else
                {
                    program.CreateFilter(tbFilterProgram.Text, outputFolder + "filter\\", cbGpu.SelectedIndex, Convert.ToInt32(cbBufferSize.SelectedItem.ToString()), Convert.ToInt32(cbStreams.SelectedItem.ToString()));
                }
            }

            GpfProjectFile file = new GpfProjectFile(program, outputFolder, tbProjectName.Text);

            if (GpfProjectFile.Serialize(file) != true)
            {
                return;
            }


            this.Close();

            if (OnSendComplete != null)
            {
                OnSendComplete(this, program);
            }
        }
Example #3
0
        public GpfProjectFile(CaptureProgram program, string projectFolder, string projectName)
        {
            _captureFiles = program.FileNames.ToList();
            _timeIndex    = program.TimeIndexFile.Substring(projectFolder.Length);
            _packetIndex  = program.PacketIndexFile.Substring(projectFolder.Length);;

            _filterFiles = program.GetFilterFiles();
            _fieldFiles  = program.GetFieldFiles();
            RootFolder   = projectFolder; //reset each time capture is deserialised to the folder in which the project file sits
            ProjectName  = projectName;


            program.ProjectPath = Path;
        }