コード例 #1
0
        public static void SetMeasurePoint(SharedBeacon sharedBeaconItem)
        {
            //if (sharedBeaconItem == null)
            //{
            //    return;
            //}

            WirelessCalculationClient _client = new WirelessCalculationClient(binding, endPoint);

            List<MeasurePoint> measurePointList = new List<MeasurePoint>
            {
                new MeasurePoint
                    {
                        Bssid = "00-1C-28-1A-53-FF",
                        Ssid = "NETCOLOGNE-6003",
                        RssiLevel = -50,
                        CenterFrequency = 2437000,
                        Quality = 0
                    },
                new MeasurePoint
                    {
                        Bssid = "BC-05-43-16-35-9C",
                        Ssid = "Hallen der Erleuchtung",
                        RssiLevel = -60,
                        CenterFrequency = 2437000,
                        Quality = 0
                    },
                new MeasurePoint
                    {
                        Bssid = "54-88-0E-1A-51-48",
                        Ssid = "Shantos 2.4GHz",
                        RssiLevel = -70,
                        CenterFrequency = 2437000,
                        Quality = 0
                    }
            };

            MeasureSector measureSector = new MeasureSector();
            measureSector.ApList = measurePointList.ToArray();
            measureSector.X = 1;
            measureSector.Y = 2;
            measureSector.XReal = 3;
            measureSector.YReal = 4;

            _client.SetMeasurePointAsync(measureSector);
            _client.SetMeasurePointCompleted += _client_SetMeasurePointCompleted;
        }
コード例 #2
0
        public static void SetMeasurePoint(List<SharedBeacon> list, System.Drawing.Point position)
        {
            if (list == null || list.Count == 0)
            {
                return;
            }

            List<MeasurePoint> measurePointList = list.Select(x => new MeasurePoint
            {
                Bssid = x.Bssid,
                Ssid = x.Bssid,
                RssiLevel = x.RssiLevel,
                CenterFrequency = x.CenterFrequency,
                Quality = 0,
                Constant = 0
            }).ToList();

            MeasureSector measureSector = new MeasureSector();
            measureSector.ApList = measurePointList.ToArray();
            measureSector.X = 1;
            measureSector.Y = 2;
            measureSector.XReal = 3;
            measureSector.YReal = 4;

            WirelessCalculationClient client = new WirelessCalculationClient(binding, endPoint);
            client.SetMeasurePointCompleted += _client_SetMeasurePointCompleted;
            client.SetMeasurePointAsync(measureSector);
        }