示例#1
0
 public GattCharacteristic(GattServerContext context, string uuid)
 {
     this.subscribers = new Dictionary <string, IPeripheral>();
     this.disposer    = new CompositeDisposable();
     this.context     = context;
     this.Uuid        = uuid;
 }
示例#2
0
        public GattService(GattServerContext context, Guid uuid, bool primary)
        {
            this.context = context;
            var type = primary ? GattServiceType.Primary : GattServiceType.Secondary;

            this.Native          = new BluetoothGattService(uuid.ToUuid(), type);
            this.characteristics = new List <GattCharacteristic>();
        }
示例#3
0
        public GattService(GattServerContext context, string uuid, bool primary)
        {
            this.context = context;
            var type = primary ? GattServiceType.Primary : GattServiceType.Secondary;

            this.Native          = new BluetoothGattService(UUID.FromString(uuid), type);
            this.characteristics = new List <GattCharacteristic>();

            this.Uuid    = uuid;
            this.Primary = primary;
        }
示例#4
0
 public PeripheralManager(AndroidContext context)
 {
     this.context  = new GattServerContext(context);
     this.services = new Dictionary <Guid, GattService>();
 }
示例#5
0
 public BleHostingManager(IAndroidContext context, IMessageBus messageBus)
 {
     this.context    = new GattServerContext(context);
     this.services   = new Dictionary <string, GattService>();
     this.messageBus = messageBus;
 }
示例#6
0
 public GattCharacteristic(GattServerContext context, Guid uuid)
 {
     this.context = context;
     this.Uuid    = uuid;
 }