Condividi tramite


GpioController.WaitForEvent Metodo

Definizione

Overload

WaitForEvent(Int32, PinEventTypes, CancellationToken)

Blocca l'esecuzione finché non viene ricevuto un evento di tipo eventType o viene richiesto un annullamento.

WaitForEvent(Int32, PinEventTypes, TimeSpan)

Blocca l'esecuzione fino a quando non viene ricevuto un evento di tipo eventType o un periodo di tempo scaduto.

WaitForEvent(Int32, PinEventTypes, CancellationToken)

Blocca l'esecuzione finché non viene ricevuto un evento di tipo eventType o viene richiesto un annullamento.

public System.Device.Gpio.WaitForEventResult WaitForEvent(int pinNumber, System.Device.Gpio.PinEventTypes eventTypes, System.Threading.CancellationToken cancellationToken);
public virtual System.Device.Gpio.WaitForEventResult WaitForEvent(int pinNumber, System.Device.Gpio.PinEventTypes eventTypes, System.Threading.CancellationToken cancellationToken);
member this.WaitForEvent : int * System.Device.Gpio.PinEventTypes * System.Threading.CancellationToken -> System.Device.Gpio.WaitForEventResult
abstract member WaitForEvent : int * System.Device.Gpio.PinEventTypes * System.Threading.CancellationToken -> System.Device.Gpio.WaitForEventResult
override this.WaitForEvent : int * System.Device.Gpio.PinEventTypes * System.Threading.CancellationToken -> System.Device.Gpio.WaitForEventResult
Public Function WaitForEvent (pinNumber As Integer, eventTypes As PinEventTypes, cancellationToken As CancellationToken) As WaitForEventResult
Public Overridable Function WaitForEvent (pinNumber As Integer, eventTypes As PinEventTypes, cancellationToken As CancellationToken) As WaitForEventResult

Parametri

pinNumber
Int32

Numero di pin nello schema di numerazione del controller.

eventTypes
PinEventTypes

I tipi di evento da attendere.

cancellationToken
CancellationToken

Token di annullamento di quando l'operazione deve interrompere l'attesa di un evento.

Restituisce

Struttura che contiene il risultato dell'operazione di attesa.

Si applica a

WaitForEvent(Int32, PinEventTypes, TimeSpan)

Blocca l'esecuzione fino a quando non viene ricevuto un evento di tipo eventType o un periodo di tempo scaduto.

public System.Device.Gpio.WaitForEventResult WaitForEvent(int pinNumber, System.Device.Gpio.PinEventTypes eventTypes, TimeSpan timeout);
member this.WaitForEvent : int * System.Device.Gpio.PinEventTypes * TimeSpan -> System.Device.Gpio.WaitForEventResult
Public Function WaitForEvent (pinNumber As Integer, eventTypes As PinEventTypes, timeout As TimeSpan) As WaitForEventResult

Parametri

pinNumber
Int32

Numero di pin nello schema di numerazione del controller.

eventTypes
PinEventTypes

I tipi di evento da attendere.

timeout
TimeSpan

Tempo di attesa dell'evento.

Restituisce

Struttura che contiene il risultato dell'operazione di attesa.

Si applica a