public class DigitalInput extends DigitalSource implements LiveWindowSendable
InterruptableSensorBase.WaitResult
m_interrupt, m_isSynchronousInterrupt
kAnalogInputChannels, kAnalogOutputChannels, kDigitalChannels, kPCMModules, kPDPChannels, kPDPModules, kPwmChannels, kRelayChannels, kSolenoidChannels, kSystemClockTicksPerMicrosecond
Constructor and Description |
---|
DigitalInput(int channel)
Create an instance of a Digital Input class.
|
Modifier and Type | Method and Description |
---|---|
void |
free()
Frees the resources for this output.
|
boolean |
get()
Get the value from a digital input channel.
|
int |
getAnalogTriggerTypeForRouting()
Get the analog trigger type.
|
int |
getChannel()
Get the channel of the digital input
|
int |
getPortHandleForRouting()
Get the HAL Port Handle.
|
java.lang.String |
getSmartDashboardType()
The string representation of the named data type that will be used by the smart dashboard for
this
Sendable . |
ITable |
getTable()
The table that is associated with this
Sendable . |
void |
initTable(ITable subtable)
Initializes a table for this
Sendable object. |
boolean |
isAnalogTrigger()
Is this an analog trigger.
|
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 |
updateTable()
Update the table for this sendable object with the latest values.
|
allocateInterrupts, cancelInterrupts, disableInterrupts, enableInterrupts, readFallingTimestamp, readRisingTimestamp, requestInterrupts, requestInterrupts, setUpSourceEdge, waitForInterrupt, waitForInterrupt
checkAnalogInputChannel, checkAnalogOutputChannel, checkDigitalChannel, checkPDPChannel, checkPDPModule, checkPWMChannel, checkRelayChannel, checkSolenoidChannel, checkSolenoidModule, getDefaultSolenoidModule, setDefaultSolenoidModule
public DigitalInput(int channel)
channel
- the DIO channel for the digital input 0-9 are on-board, 10-25 are on the MXPpublic void free()
free
in class SensorBase
public boolean get()
public int getChannel()
getChannel
in class DigitalSource
public int getAnalogTriggerTypeForRouting()
getAnalogTriggerTypeForRouting
in class InterruptableSensorBase
public boolean isAnalogTrigger()
isAnalogTrigger
in class DigitalSource
public int getPortHandleForRouting()
getPortHandleForRouting
in class InterruptableSensorBase
public java.lang.String getSmartDashboardType()
Sendable
Sendable
.getSmartDashboardType
in interface Sendable
Sendable
.public void initTable(ITable subtable)
Sendable
Sendable
object.public void updateTable()
LiveWindowSendable
updateTable
in interface LiveWindowSendable
public ITable getTable()
Sendable
Sendable
.public void startLiveWindowMode()
LiveWindowSendable
startLiveWindowMode
in interface LiveWindowSendable
public void stopLiveWindowMode()
LiveWindowSendable
stopLiveWindowMode
in interface LiveWindowSendable