A class representing a Digital Input device from which a maximum of 32 bits can be read at once.
More...
#include <rtt/extras/dev/DigitalInInterface.hpp>
A class representing a Digital Input device from which a maximum of 32 bits can be read at once.
When there are N bits, the bits are numbered from Zero to N-1.
- See also
- TemplateDigitalIn
Definition at line 56 of file DigitalInInterface.hpp.
RTT::dev::DigitalInInterface::DigitalInInterface |
( |
const std::string & |
name | ) |
|
|
inline |
RTT::dev::DigitalInInterface::DigitalInInterface |
( |
| ) |
|
|
inline |
virtual RTT::dev::DigitalInInterface::~DigitalInInterface |
( |
| ) |
|
|
inlinevirtual |
virtual bool RTT::dev::DigitalInInterface::isOff |
( |
unsigned int |
bit = 0 | ) |
const |
|
pure virtual |
Inspect if a certain bit is on.
- Parameters
-
bit | The bit to check, starting from zero. |
- Returns
- true if the bit is low (0), false otherwise.
virtual bool RTT::dev::DigitalInInterface::isOn |
( |
unsigned int |
bit = 0 | ) |
const |
|
pure virtual |
Inspect if a certain bit is on.
- Parameters
-
bit | The bit to check, starting from zero. |
- Returns
- true if the bit is high (1), false otherwise.
virtual unsigned int RTT::dev::DigitalInInterface::nbOfInputs |
( |
| ) |
const |
|
pure virtual |
Returns the number of bits that can be read for digital input.
virtual bool RTT::dev::DigitalInInterface::readBit |
( |
unsigned int |
bit = 0 | ) |
const |
|
pure virtual |
Inspect a bit.
- Parameters
-
bit | The bit to check, starting from zero. |
- Returns
- true if the bit is high (1), false otherwise.
virtual unsigned int RTT::dev::DigitalInInterface::readSequence |
( |
unsigned int |
start_bit, |
|
|
unsigned int |
stop_bit |
|
) |
| const |
|
pure virtual |
Inspect a sequence of bits.
- Parameters
-
start_bit | The first bit to check. |
stop_bit | The last bit (inclusive) to check. |
- Returns
- a bit pattern denoting the bit status from start_bit to stop_bit where bit zero equals the value of start_bit.
The documentation for this class was generated from the following files: