public class DigitalOutput extends DigitalIO implements BooleanSink
DigitalIO.DigitalChannel, DigitalIO.DirectionInterface.InterfaceType| Modifier and Type | Field and Description |
|---|---|
(package private) java.nio.ByteBuffer |
m_pwmGenerator |
m_channel, m_direction, m_portm_interrupt, m_interruptIndex, m_isSyncInterruptm_ifaceType, MAX_ANALOG_IN_CHANNELS, MAX_ANALOG_OUT_CHANNELS, MAX_DIGITAL_CHANNELS, MAX_PWM_CHANNELS, MAX_RELAY_CHANNELS| Constructor and Description |
|---|
DigitalOutput(DigitalIO.DigitalChannel channel) |
| Modifier and Type | Method and Description |
|---|---|
void |
disablePWM()
Change this line from a PWM output back to a static Digital Output line.
|
void |
enablePWM(double initialDutyCycle)
Enable a PWM Output on this line.
|
boolean |
isPulsing()
Determine if the pulse is still going.
|
void |
pulse(double pulseLength)
Generate a single pulse.
|
static void |
setPWMRate(double rate)
Change the PWM frequency of the PWM output on a Digital Output line.
|
void |
setState(boolean value)
Set the value of this BooleanSink
|
void |
updateDutyCycle(double dutyCycle)
Change the duty-cycle that is being generated on the line.
|
free, getChannel, getChannelName, getChannelNumber, getModuleNumber, isAnalogTriggerallocateInterrupt, cancelInterrupt, disableInterrupts, enableInterrupts, readFallingTimestamp, readRisingTimestamp, requestInterrupt, requestInterrupt, setUpSourceEdge, validateInterrupt, waitForInterrupt, waitForInterruptallocateMXPPin, checkAnalogInputChannel, checkAnalogOutputChannel, checkDigitalChannel, checkPWMChannel, checkRelayChannel, freeMXPPin, getInterfaceTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbindBoolean, bindBooleanpublic DigitalOutput(DigitalIO.DigitalChannel channel)
public void setState(boolean value)
setState in interface BooleanSinkvalue - the value true = High, false = Lowpublic final void pulse(double pulseLength)
pulseLength - The length of the pulse.public final boolean isPulsing()
public static final void setPWMRate(double rate)
rate - The frequency to output all digital output PWM signals.public final void enablePWM(double initialDutyCycle)
initialDutyCycle - The duty-cycle to start generating. [0..1]public final void disablePWM()
public final void updateDutyCycle(double dutyCycle)
dutyCycle - The duty-cycle to change to. [0..1]