Uses of Interface
com.pi4j.crowpi.components.events.EventHandler
-
Uses of EventHandler in com.pi4j.crowpi.components
Modifier and TypeMethodDescriptionvoid
RfidComponent.onCardDetected
(EventHandler<RfidCard> handler) Sets or disables the handler for any new card which gets in the proximity of the PCD.void
IrReceiverComponent.onKeyPressed
(EventHandler<IrReceiverComponent.Key> handler) Sets or disables the handler for received IR key presses.void
RfidComponent.waitForAnyCard
(EventHandler<RfidCard> handler) Blocks current thread until any card has been detected, then runs the handler and continues.void
RfidComponent.waitForNewCard
(EventHandler<RfidCard> handler) Blocks current thread until a new card has been detected, then runs the handler and continues. -
Uses of EventHandler in com.pi4j.crowpi.components.events
Modifier and TypeClassDescriptionclass
Generic event provider to trigger aSimpleEventHandler
once a value has flapped between two values for a couple times.Modifier and TypeFieldDescriptionprotected final EventHandler<V>
DigitalEventListener.handler
Handler function which gets calledModifier and TypeMethodDescriptiondefault DigitalEventListener<V>
DigitalEventProvider.addListener
(EventHandler<V> handler) Adds a new event listener to this component.EventProvider.addListener
(EventHandler<V> handler) Adds a new event listener which uses the given handler.ModifierConstructorDescriptionDigitalEventListener
(com.pi4j.io.gpio.digital.DigitalInput digitalInput, Function<com.pi4j.io.gpio.digital.DigitalState, V> mapper, EventHandler<V> handler) Creates a new digital event listener for the given digital input which uses the provided mapper and event handler.