| 38 | } |
| 39 | |
| 40 | pub fn to_descriptor_value( |
| 41 | properties: GattCharacteristicProperties, |
| 42 | ) -> GattClientCharacteristicConfigurationDescriptorValue { |
| 43 | let notify = GattCharacteristicProperties::Notify; |
| 44 | let indicate = GattCharacteristicProperties::Indicate; |
| 45 | if properties & indicate == indicate { |
| 46 | GattClientCharacteristicConfigurationDescriptorValue::Indicate |
| 47 | } else if properties & notify == notify { |
| 48 | GattClientCharacteristicConfigurationDescriptorValue::Notify |
| 49 | } else { |
| 50 | GattClientCharacteristicConfigurationDescriptorValue::None |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | pub fn to_uuid(uuid: &GUID) -> Uuid { |
| 55 | let guid_s = format!("{:?}", uuid); |