Exemple #1
0
        public async Task ReadConnParamsAsync()
        {
            platform.customResponses.Add(new byte[] { 0x11, 0x89 },
                                         new byte[] { 0x11, 0x89, 0x06, 0x00, 0x09, 0x00, 0x00, 0x00, 0x58, 0x02 });

            var expected = new BleConnectionParameters(7.5f, 11.25f, 0, 6000);

            Assert.That(await settings.ReadBleConnParamsAsync(), Is.EqualTo(expected));
        }
Exemple #2
0
            public override bool Equals(Object o)
            {
                if (this == o)
                {
                    return(true);
                }
                if (o == null || GetType() != o.GetType())
                {
                    return(false);
                }

                BleConnectionParameters that = (BleConnectionParameters)o;

                return(MinConnectionInterval.Equals(that.MinConnectionInterval) && MaxConnectionInterval.Equals(that.MaxConnectionInterval) &&
                       SlaveLatency == that.SlaveLatency && SupervisorTimeout == that.SupervisorTimeout);
            }