|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.wpi.first.wpilibj.SensorBase
edu.wpi.first.wpilibj.InterruptableSensorBase
edu.wpi.first.wpilibj.DigitalSource
edu.wpi.first.wpilibj.DigitalOutput
public class DigitalOutput
Class to write digital outputs. This class will wrtie digital outputs. Other devices that are implemented elsewhere will automatically allocate digital inputs and outputs as required.
Field Summary |
---|
Fields inherited from class edu.wpi.first.wpilibj.InterruptableSensorBase |
---|
interrupts, m_interrupt, m_interruptIndex, m_manager |
Fields inherited from class edu.wpi.first.wpilibj.SensorBase |
---|
kAnalogChannels, kAnalogModules, kDigitalChannels, kPwmChannels, kRelayChannels, kSolenoidChannels, kSolenoidModules, kSystemClockTicksPerMicrosecond |
Constructor Summary | |
---|---|
DigitalOutput(int channel)
Create an instance of a digital output. |
|
DigitalOutput(int moduleNumber,
int channel)
Create an instance of a digital output. |
Method Summary | |
---|---|
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. |
void |
free()
Free the resources associated with a digital output. |
boolean |
getAnalogTriggerForRouting()
Is this an analog trigger |
int |
getChannel()
|
int |
getChannelForRouting()
Get the channel routing number |
int |
getModuleForRouting()
Get the module routing number |
java.lang.String |
getSmartDashboardType()
|
ITable |
getTable()
|
void |
initTable(ITable subtable)
Initializes a table for this sendable object. |
boolean |
isPulsing()
Determine if the pulse is still going. |
void |
pulse(double length)
Output a single pulse on the digital output line. |
void |
set(boolean value)
Set the value of a digital output. |
void |
setPWMRate(double rate)
Change the PWM frequency of the PWM output on a Digital Output line. |
void |
startLiveWindowMode()
Start having this sendable object automatically respond to value changes reflect the value on the table. |
void |
stopLiveWindowMode()
Stop having this sendable object automatically respond to value changes. |
void |
updateDutyCycle(double dutyCycle)
Change the duty-cycle that is being generated on the line. |
void |
updateTable()
Update the table for this sendable object with the latest values. |
Methods inherited from class edu.wpi.first.wpilibj.InterruptableSensorBase |
---|
allocateInterrupts, cancelInterrupts, disableInterrupts, enableInterrupts, readInterruptTimestamp, waitForInterrupt |
Methods inherited from class edu.wpi.first.wpilibj.SensorBase |
---|
checkAnalogChannel, checkAnalogModule, checkDigitalChannel, checkDigitalModule, checkPWMChannel, checkPWMModule, checkRelayChannel, checkRelayModule, checkSolenoidChannel, checkSolenoidModule, getDefaultAnalogModule, getDefaultDigitalModule, getDefaultSolenoidModule, setDefaultAnalogModule, setDefaultDigitalModule, setDefaultSolenoidModule |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DigitalOutput(int moduleNumber, int channel)
moduleNumber
- The number of the digital module to usechannel
- the port to use for the digital outputpublic DigitalOutput(int channel)
channel
- the port to use for the digital outputMethod Detail |
---|
public void free()
free
in class SensorBase
public void set(boolean value)
value
- true is on, off is falsepublic int getChannel()
public void pulse(double length)
length
- The pulselength in secondspublic boolean isPulsing()
public void setPWMRate(double rate)
rate
- The frequency to output all digital output PWM signals on this module.public void enablePWM(double initialDutyCycle)
initialDutyCycle
- The duty-cycle to start generating. [0..1]public void disablePWM()
public void updateDutyCycle(double dutyCycle)
dutyCycle
- The duty-cycle to change to. [0..1]public int getChannelForRouting()
DigitalSource
getChannelForRouting
in class DigitalSource
public int getModuleForRouting()
DigitalSource
getModuleForRouting
in class DigitalSource
public boolean getAnalogTriggerForRouting()
DigitalSource
getAnalogTriggerForRouting
in class DigitalSource
public java.lang.String getSmartDashboardType()
getSmartDashboardType
in interface Sendable
public void initTable(ITable subtable)
initTable
in interface Sendable
subtable
- The table to put the values in.public ITable getTable()
getTable
in interface Sendable
public void updateTable()
updateTable
in interface LiveWindowSendable
public void startLiveWindowMode()
startLiveWindowMode
in interface LiveWindowSendable
public void stopLiveWindowMode()
stopLiveWindowMode
in interface LiveWindowSendable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |