コード例 #1
0
ファイル: NetworkAL.cs プロジェクト: danm-de/DrunkenOctoNinja
        private void RegisterCharacteristic(Guid service_uuid, Guid characteristicUuid)
        {
            var accData = DeviceServices.FirstOrDefault(s => s.Uuid == service_uuid).GetCharacteristics(characteristicUuid)[0];

            if (!Characteristics.ContainsKey(service_uuid.ToString()))
            {
                Characteristics.Add(service_uuid.ToString(), new List <GattCharacteristic>());
            }
            Characteristics[service_uuid.ToString()].Add(accData);
        }
コード例 #2
0
 public GattDeviceService GetServiceByGuid(Guid serviceId)
 {
     return(DeviceServices.FirstOrDefault(s => s.Uuid == serviceId));
 }