public interface GenerationListener extends DeviceEventListener, AsyncErrorHandler<PWMChannel>
GenerationListener
interface defines methods for getting notified of pulse generation completion
conditions (i.e. maximum generated pulse count value reached) as well as device errors.
A GenerationListener
can be registered using
one of the PWMChannel.startGeneration(int)
methods.Modifier and Type | Method and Description |
---|---|
void |
failed(java.lang.Throwable exception,
PWMChannel source)
Invoked when an I/O operation fails.
|
void |
pulseGenerationCompleted(GenerationEvent event)
Invoked when the generated pulse count has reached the maximum value.
|
void pulseGenerationCompleted(GenerationEvent event)
PWMChannel.startGeneration(int)
. This may be used to
generate a subsequent pulse train with different specifications: pulse period and/or width/duty cycle.event
- the event that occurred.void failed(java.lang.Throwable exception, PWMChannel source)
failed
in interface AsyncErrorHandler<PWMChannel>
exception
- The exception to indicate why the I/O operation failedsource
- The PWMChannel
instance that generated the error.Copyright © 2012, 2014, Oracle and/or its affiliates. All rights reserved.
Legal Notices