public class LimitSwitch extends DigitalInput implements SensorModule
| Modifier and Type | Class and Description |
|---|---|
static class |
LimitSwitch.SwitchType
The type of switch this is
Normally open is a switch that is normally false when not pushed
Normally closed is a switch that is normally true when not pushed
|
DigitalIO.DigitalChannel, DigitalIO.DirectionInterface.InterfaceTypeTrigger.ButtonScheduler| Modifier and Type | Field and Description |
|---|---|
private LimitSwitch.SwitchType |
m_type
The m_type.
|
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 |
|---|
LimitSwitch(DigitalIO.DigitalChannel channel) |
LimitSwitch(DigitalIO.DigitalChannel channel,
LimitSwitch.SwitchType type)
Instantiates a new limit switch.
|
| Modifier and Type | Method and Description |
|---|---|
void |
disableModule()
Disable the module
|
void |
enableModule()
Enable the module
|
boolean |
getModuleEnabled() |
boolean |
getState()
Get the value of this boolean source
|
LimitSwitch.SwitchType |
getType()
Gets the type.
|
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, waitcancelWhenActive, runWhenActive, runWhenInactive, runWhileActive, runWhileInactive, toggleWhenActiveprivate LimitSwitch.SwitchType m_type
public LimitSwitch(DigitalIO.DigitalChannel channel)
public LimitSwitch(DigitalIO.DigitalChannel channel, LimitSwitch.SwitchType type)
channel - the channeltype - the typepublic boolean getState()
getState in interface BooleanSourcegetState in class DigitalInputpublic LimitSwitch.SwitchType getType()
public void enableModule()
enableModule in interface Modulepublic void disableModule()
disableModule in interface Modulepublic boolean getModuleEnabled()
getModuleEnabled in interface Module