|
libstp
Robotics library for Botball
|
#include <Digital.hpp>
Public Member Functions | |
| DigitalSensor (int port) | |
| Create a digital input bound to a platform-defined port index. | |
| virtual | ~DigitalSensor () |
| virtual bool | read () const |
| Return the current boolean state for the configured input. | |
Public Attributes | |
| int | port |
Digital input wrapper implemented by the active platform bundle.
The wrapper only owns the requested port number and shared safety-check bookkeeping. Platform drivers provide the actual I/O behavior.
read() is virtual so composite inputs (see ButtonGroup) can override the sensing logic while still being usable anywhere a DigitalSensor is.
Definition at line 19 of file Digital.hpp.
|
explicit |
Create a digital input bound to a platform-defined port index.
|
virtual |
|
virtual |
Return the current boolean state for the configured input.
Reimplemented in libstp::hal::digital::ButtonGroup.
| int libstp::hal::digital::DigitalSensor::port |
Definition at line 27 of file Digital.hpp.