コード例 #1
0
ファイル: Form1.cs プロジェクト: dustinnorwood/RadarServer
        private void async_SetConfigReceived(object sender, string data)
        {
            MRM_GET_CONFIG_REQUEST m = new MRM_GET_CONFIG_REQUEST();

            m.MessageID = 4;
            RadarRequest.SendMRM_GET_CONFIG_REQUEST((Radar)sender, m);
        }
コード例 #2
0
ファイル: Utility.cs プロジェクト: dustinnorwood/RadarServer
        public static void StopScanning(List <Radar> Radars)
        {
            MRM_CONTROL_REQUEST t = new MRM_CONTROL_REQUEST();

            t.MessageID        = 2;
            t.ScanCount        = 0;
            t.ScanIntervalTime = 100000;
            foreach (Radar r in Radars)
            {
                RadarRequest.SendMRM_CONTROL_REQUEST(r, t);
            }
        }
コード例 #3
0
ファイル: Utility.cs プロジェクト: dustinnorwood/RadarServer
        public static void StartScanning(List <Radar> Radars, uint ScanInterval)
        {
            MRM_CONTROL_REQUEST t = new MRM_CONTROL_REQUEST();

            t.MessageID        = 2;
            t.ScanCount        = 65535;
            t.ScanIntervalTime = ScanInterval;
            foreach (Radar r in Radars)
            {
                RadarRequest.SendMRM_CONTROL_REQUEST(r, t);
            }
        }
コード例 #4
0
        public Radar(Socket h, string name, int x, int y)
        {
            Location        = new Point(x, y);
            Name            = name;
            Offset          = 0.0;
            Scans           = new List <MRM_SCAN_INFO>();
            CurrentScan     = new MRM_SCAN_INFO();
            UnfilteredScans = new MRM_SCAN_INFO[FilterCoeffs.Length];
            _handler        = h;
            MRM_GET_STATUSINFO_REQUEST t = new MRM_GET_STATUSINFO_REQUEST();

            t.MessageID = 0;
            if (_handler != null)
            {
                RadarRequest.SendMRM_GET_STATUSINFO_REQUEST(this, t);
            }
        }
コード例 #5
0
ファイル: Form1.cs プロジェクト: dustinnorwood/RadarServer
        private void async_ScanReceived(object sender, string data)
        {
            Radar         r = (Radar)sender;
            MRM_SCAN_INFO t;

            if (RadarRequest.ReceiveMRM_SCAN_INFO(data, out t))
            {
                Filter.BandpassFilter(ref t.ScanData);
                Filter.MotionFilter(ref r, ref t);
                //  lock (Program.lockObj)
                //  {
                r.CurrentScan          = t;
                r.CurrentScan.ScanData = new int[t.ScanData.Length];
                t.ScanData.CopyTo(r.CurrentScan.ScanData, 0);
                r.CurrentScan          = t;
                r.CurrentScan.ScanData = new int[t.ScanData.Length];
                t.ScanData.CopyTo(r.CurrentScan.ScanData, 0);

                //  }
            }
        }
コード例 #6
0
ファイル: Form1.cs プロジェクト: dustinnorwood/RadarServer
        private void SetConfigButton_Click(object sender, EventArgs e)
        {
            MRM_SET_CONFIG_REQUEST set_config = new MRM_SET_CONFIG_REQUEST();

            set_config.MessageID            = (ushort)MessageIDVal.Value;
            set_config.NodeID               = (ushort)NodeIDVal.Value;
            set_config.BaseIntegrationIndex = (ushort)(PIIVal.SelectedIndex + 6);
            set_config.AntennaMode          = (byte)(AntennaVal.SelectedIndex + 2);
            set_config.CodeChannel          = (byte)CodeChannelVal.Value;
            set_config.TransmitGain         = (byte)TransmitGainVal.Value;
            set_config.PersistFlag          = (byte)PersistVal.SelectedIndex;
            set_config.ScanStartPS          = (int)ScanStartVal.Value;
            set_config.ScanResolutions      = 32;
            set_config.ScanStopPS           = (int)ScanStopVal.Value;
            //set_config.RadarNumber = (int) RadarNumberVal.Value;
            for (int k = 0; k < Radars.Count; k++)
            {
                set_config.NodeID      = (ushort)(100 + k);
                set_config.CodeChannel = (byte)k;
                //    set_config.ScanStartPS = FindNearestCorner(Radars[k].Location.X, Radars[k].Location.Y, XDIM, YDIM) + 12000;
                //   set_config.ScanStopPS = FindFurthestCorner(Radars[k].Location.X, Radars[k].Location.Y, XDIM, YDIM) + 12000;
                RadarRequest.SendMRM_SET_CONFIG_REQUEST(Radars[k], set_config);
            }
        }