#include <DigitalOutput.hpp>
Public Member Functions | |
DigitalOutput (DigitalOutInterface *dig_out, unsigned int relay_nr, bool _invert=false) | |
DigitalOutput (bool initial_state=false) | |
bool | isOn () const |
void | setBit (bool on_off) |
void | switchOff () |
void | switchOn () |
~DigitalOutput () | |
Private Attributes | |
DigitalOutInterface * | board |
bool | invert |
unsigned int | relaynumber |
A DigitalOut represents any on/off output. Examples are brakes, valves, simple grippers etc. This class can be used in combination with a DigitalOutInterface or as a 'virtual' switch in which case the on/off state is stored in this object.
Definition at line 55 of file DigitalOutput.hpp.
|
inline |
Create a new Relay acting on a digital output device.
dig_out | The digital output device to use |
relay_nr | The bit number to use on dig_out |
_invert | Set to true if isOn() must return inverted signal |
Definition at line 65 of file DigitalOutput.hpp.
|
inline |
Create a virtual (software) relay
initial_state | The initial on/off state of the DigitalOutput. |
Definition at line 73 of file DigitalOutput.hpp.
|
inline |
Destruct a DigitalOutput
Definition at line 81 of file DigitalOutput.hpp.
|
inline |
Check if the output is on (high).
Definition at line 123 of file DigitalOutput.hpp.
|
inline |
Set the bit to the on or off state.
on_off | Set to true to turn the bit on. |
Definition at line 88 of file DigitalOutput.hpp.
|
inline |
Set the bit low of the digital output.
Definition at line 110 of file DigitalOutput.hpp.
|
inline |
Set the bit high of the digital output.
Definition at line 99 of file DigitalOutput.hpp.
|
private |
Definition at line 132 of file DigitalOutput.hpp.
|
private |
Definition at line 134 of file DigitalOutput.hpp.
|
private |
Definition at line 133 of file DigitalOutput.hpp.