示例#1
0
 public ClassInterfaceWithRtl433(Rtl_433_Panel owner)
 {
     _owner     = owner;
     stopw      = new Stopwatch();
     listData   = new Dictionary <String, String>();
     SampleRate = "Sample rate: 0";  //no display if init to Rtl_433_panel
     setTime();
     listOptionsRtl433 = new Dictionary <String, String>();
     dataForRs433      = new byte[Rtl_433_Processor.NBBYTEFORRTS_433];
     _copyIQBuffer     = new UnsafeBuffer[Rtl_433_Processor.NBBUFFERFORRTS_433];
     _copyIQPtr        = new Complex *[Rtl_433_Processor.NBBUFFERFORRTS_433];
     _copyIQBuffer[0]  = UnsafeBuffer.Create(Rtl_433_Processor.NBCOMPLEXFORRTS_433, sizeof(Complex));
     _copyIQPtr[0]     = (Complex *)_copyIQBuffer[0];
     for (int i = 1; i < Rtl_433_Processor.NBBUFFERFORRTS_433; i++)
     {
         _copyIQBuffer[i] = UnsafeBuffer.Create(Rtl_433_Processor.NBCOMPLEXFORRTS_433, sizeof(Complex));
         _copyIQPtr[i]    = (Complex *)_copyIQBuffer[i];
     }
     setOption("verbose", "-v");                    //setVerbose("-v");  //for list devices details
     call_main_Rtl_433();
 }
        public FormDevices(Rtl_433_Panel classParent)
        {
            InitializeComponent();
            this.SuspendLayout();
            NumberFormatInfo nfi = new CultureInfo("en-US", false).NumberFormat;

            nfi.NumberDecimalDigits = 3;
            _classParent            = classParent;
            listLabelKey            = new Dictionary <String, Label>();
            listLabelValue          = new Dictionary <String, Label>();
            this.tableLayoutPanelDeviceData.Name     = "tableLayoutPanelDeviceData";
            this.tableLayoutPanelDeviceData.TabIndex = 1;
            //toolStripSplitLabelRecordOneShoot.Visible = false;
            toolStripStatusLabelPeriodeCurrent.Text       = "Period: 0";
            toolStripStatusLabelPeriodeMax.Text           = "Period max: 0";
            toolStripStatusLabelNbMessages.Text           = "NB messages: 0";
            statusStrip1.ShowItemToolTips                 = true;
            toolStripSplitLabelRecordOneShoot.ToolTipText = "Record data buffer Mono Stereo or both(checkbox on panel) \n" +
                                                            " to directory Recordings if exist else in SdrSharp.exe directory \n" +
                                                            " You can replay Stereo file with SdrSharp\n" +
                                                            " or load Mono Stereo with Audacity...";
            this.Width = 540;      //left small in designer else no resize if width<540(if 540 in designer)
            this.ResumeLayout();
        }