Ejemplo n.º 1
0
        public async Task getAllRssiData()
        {
            var Tuples = await referencepointService.GetAllAsync();

            foreach (var t in Tuples)
            {
                rssiData.Add(Tuple.Create(new List <int> {
                    t.RSSI1, t.RSSI2, t.RSSI3
                }, t.Category, t.ReferencepointId));
            }

            numberOfClusters = (int)Math.Sqrt(Tuples.Count);
        }
Ejemplo n.º 2
0
        public async Task GetAllPoints()
        {
            Tuples = await referencepointService.GetAllAsync();

            foreach (var t in Tuples)
            {
                Point2D p = new Point2D(t.X, t.Y);
                p.id = Tuples.IndexOf(t); // The tuples are not zero indexed so minus their id by 1.
                points.Add(p);
            }

            numberOfReferencePoints = Tuples.Count;
            k = (int)Math.Sqrt(numberOfReferencePoints);
        }
Ejemplo n.º 3
0
        public async Task AddAsync()
        {
            await _referencepointService.AddAsync(new Referencepoint());

            Assert.That((await _referencepointService.GetAllAsync()).Count == 1);
        }