MCPcopy Create free account
hub / github.com/deviceplug/btleplug / to_descriptor_value

Function to_descriptor_value

src/winrtble/utils.rs:40–52  ·  view source on GitHub ↗
(
    properties: GattCharacteristicProperties,
)

Source from the content-addressed store, hash-verified

38}
39
40pub 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
54pub fn to_uuid(uuid: &GUID) -> Uuid {
55 let guid_s = format!("{:?}", uuid);

Callers 1

subscribeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected