GattCharacteristic.ValueChanged Événement

Définition

Une application peut inscrire un gestionnaire d’événements pour recevoir des événements lorsque des notifications ou des indications sont reçues d’un appareil, après avoir défini le descripteur de configuration des caractéristiques du client.

// Register
event_token ValueChanged(TypedEventHandler<GattCharacteristic, GattValueChangedEventArgs const&> const& handler) const;

// Revoke with event_token
void ValueChanged(event_token const* cookie) const;

// Revoke with event_revoker
GattCharacteristic::ValueChanged_revoker ValueChanged(auto_revoke_t, TypedEventHandler<GattCharacteristic, GattValueChangedEventArgs const&> const& handler) const;
public event TypedEventHandler<GattCharacteristic,GattValueChangedEventArgs> ValueChanged;
function onValueChanged(eventArgs) { /* Your code */ }
gattCharacteristic.addEventListener("valuechanged", onValueChanged);
gattCharacteristic.removeEventListener("valuechanged", onValueChanged);
- or -
gattCharacteristic.onvaluechanged = onValueChanged;
Public Custom Event ValueChanged As TypedEventHandler(Of GattCharacteristic, GattValueChangedEventArgs) 

Type d'événement

Configuration requise pour Windows

Fonctionnalités de l’application
bluetooth

Remarques

L’objet GattValueChangedEventArgs représente les arguments reçus par un gestionnaire d’événements ValueChanged utilisé pour traiter les événements de notification de modification de valeur caractéristique et d’indication envoyés par un appareil Bluetooth LE.

S’applique à

Voir aussi