#include <DigitalInput.h>


Public Member Functions | |
| DigitalInput (UINT32 channel) | |
| DigitalInput (UINT8 moduleNumber, UINT32 channel) | |
| virtual | ~DigitalInput () |
| UINT32 | Get () |
| UINT32 | GetChannel () |
| virtual UINT32 | GetChannelForRouting () |
| virtual UINT32 | GetModuleForRouting () |
| virtual bool | GetAnalogTriggerForRouting () |
| virtual void | RequestInterrupts (tInterruptHandler handler, void *param=NULL) |
| Asynchronus handler version. | |
| virtual void | RequestInterrupts () |
| Synchronus Wait version. | |
| void | SetUpSourceEdge (bool risingEdge, bool fallingEdge) |
| void | UpdateTable () |
| void | StartLiveWindowMode () |
| void | StopLiveWindowMode () |
| std::string | GetSmartDashboardType () |
| void | InitTable (ITable *subTable) |
| ITable * | GetTable () |
Public Member Functions inherited from DigitalSource | |
| virtual | ~DigitalSource () |
Public Member Functions inherited from InterruptableSensorBase | |
| virtual void | CancelInterrupts () |
| Free up the underlying chipobject functions. | |
| virtual void | WaitForInterrupt (float timeout) |
| Synchronus version. | |
| virtual void | EnableInterrupts () |
| Enable interrupts - after finishing setup. | |
| virtual void | DisableInterrupts () |
| Disable, but don't deallocate. | |
| virtual double | ReadInterruptTimestamp () |
| Return the timestamp for the interrupt that occurred. | |
Public Member Functions inherited from SensorBase | |
| SensorBase () | |
| virtual | ~SensorBase () |
Public Member Functions inherited from ErrorBase | |
| virtual Error & | GetError () |
| Retrieve the current error. Get the current error information associated with this sensor. | |
| virtual const Error & | GetError () const |
| virtual void | SetErrnoError (const char *contextMessage, const char *filename, const char *function, UINT32 lineNumber) const |
| Set error information associated with a C library call that set an error to the "errno" global variable. | |
| virtual void | SetImaqError (int success, const char *contextMessage, const char *filename, const char *function, UINT32 lineNumber) const |
| Set the current error information associated from the nivision Imaq API. | |
| virtual void | SetError (Error::Code code, const char *contextMessage, const char *filename, const char *function, UINT32 lineNumber) const |
| Set the current error information associated with this sensor. | |
| virtual void | SetWPIError (const char *errorMessage, const char *contextMessage, const char *filename, const char *function, UINT32 lineNumber) const |
| Set the current error information associated with this sensor. | |
| virtual void | CloneError (ErrorBase *rhs) const |
| virtual void | ClearError () const |
| Clear the current error information associated with this sensor. | |
| virtual bool | StatusIsFatal () const |
| Check if the current error code represents a fatal error. | |
Additional Inherited Members | |
Static Public Member Functions inherited from SensorBase | |
| static void | DeleteSingletons () |
| static UINT32 | GetDefaultAnalogModule () |
| static UINT32 | GetDefaultDigitalModule () |
| static UINT32 | GetDefaultSolenoidModule () |
| static bool | CheckAnalogModule (UINT8 moduleNumber) |
| static bool | CheckDigitalModule (UINT8 moduleNumber) |
| static bool | CheckPWMModule (UINT8 moduleNumber) |
| static bool | CheckRelayModule (UINT8 moduleNumber) |
| static bool | CheckSolenoidModule (UINT8 moduleNumber) |
| static bool | CheckDigitalChannel (UINT32 channel) |
| static bool | CheckRelayChannel (UINT32 channel) |
| static bool | CheckPWMChannel (UINT32 channel) |
| static bool | CheckAnalogChannel (UINT32 channel) |
| static bool | CheckSolenoidChannel (UINT32 channel) |
Static Public Attributes inherited from SensorBase | |
| static const UINT32 | kSystemClockTicksPerMicrosecond = 40 |
| static const UINT32 | kDigitalChannels = 14 |
| static const UINT32 | kAnalogChannels = 8 |
| static const UINT32 | kAnalogModules = 2 |
| static const UINT32 | kDigitalModules = 2 |
| static const UINT32 | kSolenoidChannels = 8 |
| static const UINT32 | kSolenoidModules = 2 |
| static const UINT32 | kPwmChannels = 10 |
| static const UINT32 | kRelayChannels = 8 |
| static const UINT32 | kChassisSlots = 8 |
Protected Member Functions inherited from InterruptableSensorBase | |
| void | AllocateInterrupts (bool watcher) |
Protected Attributes inherited from InterruptableSensorBase | |
| tInterrupt * | m_interrupt |
| tInterruptManager * | m_manager |
| UINT32 | m_interruptIndex |
Static Protected Attributes inherited from ErrorBase | |
| static SEM_ID | _globalErrorMutex = semMCreate(SEM_Q_PRIORITY | SEM_DELETE_SAFE | SEM_INVERSION_SAFE) |
| static Error | _globalError |
Class to read a digital input. This class will read digital inputs and return the current value on the channel. Other devices such as encoders, gear tooth sensors, etc. that are implemented elsewhere will automatically allocate digital inputs and outputs as required. This class is only for devices like switches etc. that aren't implemented anywhere else.
Definition at line 22 of file DigitalInput.h.
|
explicit |
Create an instance of a Digital Input class. Creates a digital input given a channel and uses the default module.
| channel | The digital channel (1..14). |
Definition at line 50 of file DigitalInput.cpp.
| DigitalInput::DigitalInput | ( | UINT8 | moduleNumber, |
| UINT32 | channel | ||
| ) |
Create an instance of a Digital Input class. Creates a digital input given an channel and module.
| moduleNumber | The digital module (1 or 2). |
| channel | The digital channel (1..14). |
Definition at line 62 of file DigitalInput.cpp.
|
virtual |
Free resources associated with the Digital Input class.
Definition at line 70 of file DigitalInput.cpp.
|
virtual |
Implements DigitalSource.
Definition at line 120 of file DigitalInput.cpp.
| UINT32 DigitalInput::GetChannel | ( | ) |
Definition at line 95 of file DigitalInput.cpp.
|
virtual |
Implements DigitalSource.
Definition at line 103 of file DigitalInput.cpp.
|
virtual |
Implements DigitalSource.
Definition at line 111 of file DigitalInput.cpp.
|
virtual |
Implements Sendable.
Definition at line 216 of file DigitalInput.cpp.
|
virtual |
Implements Sendable.
Definition at line 225 of file DigitalInput.cpp.
|
virtual |
Initializes a table for this sendable object.
| subtable | The table to put the values in. |
Implements Sendable.
Definition at line 220 of file DigitalInput.cpp.
|
virtual |
Asynchronus handler version.
Request interrupts asynchronously on this digital input.
| handler | The address of the interrupt handler function of type tInterruptHandler that will be called whenever there is an interrupt on the digitial input port. Request interrupts in synchronus mode where the user program interrupt handler will be called when an interrupt occurs. The default is interrupt on rising edges only. |
Implements DigitalSource.
Definition at line 133 of file DigitalInput.cpp.
|
virtual |
Synchronus Wait version.
Request interrupts synchronously on this digital input. Request interrupts in synchronus mode where the user program will have to explicitly wait for the interrupt to occur. The default is interrupt on rising edges only.
Implements DigitalSource.
Definition at line 164 of file DigitalInput.cpp.
|
virtual |
Start having this sendable object automatically respond to value changes reflect the value on the table.
Implements LiveWindowSendable.
Definition at line 208 of file DigitalInput.cpp.
|
virtual |
Stop having this sendable object automatically respond to value changes.
Implements LiveWindowSendable.
Definition at line 212 of file DigitalInput.cpp.
|
virtual |
Update the table for this sendable object with the latest values.
Implements LiveWindowSendable.
Definition at line 202 of file DigitalInput.cpp.
1.8.1.2