public class DigitalInput extends DigitalSource implements Sendable
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.
|
void |
initSendable(SendableBuilder builder)
Initializes this
Sendable object. |
boolean |
isAnalogTrigger()
Is this an analog trigger.
|
allocateInterrupts, cancelInterrupts, disableInterrupts, enableInterrupts, readFallingTimestamp, readRisingTimestamp, requestInterrupts, requestInterrupts, setUpSourceEdge, waitForInterrupt, waitForInterrupt
checkAnalogInputChannel, checkAnalogOutputChannel, checkDigitalChannel, checkPDPChannel, checkPDPModule, checkPWMChannel, checkRelayChannel, checkSolenoidChannel, checkSolenoidModule, getDefaultSolenoidModule, setDefaultSolenoidModule
addChild, getName, getSubsystem, setName, setName, setName, setSubsystem
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName, getSubsystem, setName, setName, setSubsystem
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 InterruptableSensorBase
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 void initSendable(SendableBuilder builder)
Sendable
Sendable
object.initSendable
in interface Sendable
builder
- sendable builder