接入蓝牙基本结构

This commit is contained in:
suntao committed 2021-06-04 13:22:59 +08:00
1 parent 84e8b50bbf
commit 2f84f70a5f
152 files changed
+6426 -56

No files matched your search

@@ -0,0 +1,40 @@
using Assets.Scripts.Devices.Ant;
using Assets.Scripts.Devices.Ble;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Assets.Scripts.Ble.Scan
{
/// <summary>
/// 广播数据
/// </summary>
public class BleAdvertisementInfo
{
public BlePeripheralInfo Peripheral { get; }
public int Rssi { get; }
public SensorType SensorType { get; }
public BleAdvertisementInfo(BlePeripheralInfo peripheral, int rssi, bool connectible, List<Guid> services, byte[] manufactureData, SensorType sensor)
{
this.Peripheral = peripheral;
this.Rssi = rssi;
//this.Connectible = connectible;
this.services = services;
//this.ManufactureData = manufactureData;
this.SensorType = sensor;
}
private readonly List<Guid> services;
public IReadOnlyList<Guid> Services
{
get
{
return this.services;
}
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4809c38d934e9a247a4e70bbcf6fd67b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: