public abstract class DigitalIO extends InterruptBase
| Modifier and Type | Class and Description |
|---|---|
static class |
DigitalIO.DigitalChannel
The Enum Channel.
|
static class |
DigitalIO.Direction
The Enum Direction.
|
Interface.InterfaceType| Modifier and Type | Field and Description |
|---|---|
protected DigitalIO.DigitalChannel |
m_channel
The DigitalIO Channel this DigitalIO is operating on.
|
protected DigitalIO.Direction |
m_direction
The direction of this digital io.
|
protected java.nio.ByteBuffer |
m_port
The The RoboRIO port identifier.
|
private static boolean[] |
USED_CHANNELS
Keep track of already used channels.
|
m_interrupt, m_interruptIndex, m_isSyncInterruptm_ifaceType, MAX_ANALOG_IN_CHANNELS, MAX_ANALOG_OUT_CHANNELS, MAX_DIGITAL_CHANNELS, MAX_PWM_CHANNELS, MAX_RELAY_CHANNELS| Modifier | Constructor and Description |
|---|---|
protected |
DigitalIO()
Constructor for use with analog trigger output.
|
protected |
DigitalIO(DigitalIO.DigitalChannel channel,
DigitalIO.Direction dir)
Instantiates a new DigitalIO.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
allocateChannel(DigitalIO.DigitalChannel channel)
Allocate a DigitalIO channel.
|
void |
free()
Free the DigitalIO channel.
|
private void |
freeChannel(DigitalIO.DigitalChannel channel)
Free a DigitalIO channel.
|
DigitalIO.DigitalChannel |
getChannel()
The channel this DigitalIO is operating on.
|
java.lang.String |
getChannelName()
The channel this DigitalIO is operating on, in string form.
|
int |
getChannelNumber()
The channel this DigitalIO is operating on, in integer form.
|
byte |
getModuleNumber()
Get the module number for this interrupt.
|
boolean |
isAnalogTrigger()
Get whether this interrupt is an analog trigger or not
|
allocateInterrupt, cancelInterrupt, disableInterrupts, enableInterrupts, readFallingTimestamp, readRisingTimestamp, requestInterrupt, requestInterrupt, setUpSourceEdge, validateInterrupt, waitForInterrupt, waitForInterruptallocateMXPPin, checkAnalogInputChannel, checkAnalogOutputChannel, checkDigitalChannel, checkPWMChannel, checkRelayChannel, freeMXPPin, getInterfaceTypeprivate static final boolean[] USED_CHANNELS
protected java.nio.ByteBuffer m_port
protected DigitalIO.DigitalChannel m_channel
protected DigitalIO.Direction m_direction
protected DigitalIO(DigitalIO.DigitalChannel channel, DigitalIO.Direction dir)
channel - the channel for this DigitalIOprotected DigitalIO()
public final void free()
private final void allocateChannel(DigitalIO.DigitalChannel channel)
channel - the DigitalIO channel to allocateprivate final void freeChannel(DigitalIO.DigitalChannel channel)
channel - the DigitalIO channel to freepublic final DigitalIO.DigitalChannel getChannel()
DigitalIO.DigitalChannel representation of the DigitalIO channelpublic int getChannelNumber()
getChannelNumber in class InterruptBasepublic byte getModuleNumber()
getModuleNumber in class InterruptBasepublic java.lang.String getChannelName()
public boolean isAnalogTrigger()
isAnalogTrigger in class InterruptBaseAnalogInput.initTrigger(),
AnalogInput.createTriggerOutput(AnalogTriggerType),
AnalogTriggerOutput,
AnalogInput.AnalogTriggerType