RTT::DigitalOutput Class Reference
[Device Interfaces]

A DigitalOut represents any on/off output. More...

#include <rtt/dev/DigitalOutput.hpp>

List of all members.

Public Member Functions

 DigitalOutput (DigitalOutInterface *dig_out, unsigned int relay_nr, bool _invert=false)
 Create a new Relay acting on a digital output device.
 DigitalOutput (bool initial_state=false)
 Create a virtual (software) relay.
 ~DigitalOutput ()
 Destruct a DigitalOutput.
void setBit (bool on_off)
 Set the bit to the on or off state.
void switchOn ()
 Set the bit high of the digital output.
void switchOff ()
 Set the bit low of the digital output.
bool isOn () const
 Check if the output is on (high).

Detailed Description

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.

See also:
also DigitalInput

Definition at line 54 of file DigitalOutput.hpp.


Constructor & Destructor Documentation

RTT::DigitalOutput::DigitalOutput ( DigitalOutInterface dig_out,
unsigned int  relay_nr,
bool  _invert = false 
) [inline]

Create a new Relay acting on a digital output device.

Parameters:
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 64 of file DigitalOutput.hpp.

RTT::DigitalOutput::DigitalOutput ( bool  initial_state = false  )  [inline]

Create a virtual (software) relay.

Parameters:
initial_state The initial on/off state of the DigitalOutput.

Definition at line 72 of file DigitalOutput.hpp.


Member Function Documentation

bool RTT::DigitalOutput::isOn (  )  const [inline]

Check if the output is on (high).

Returns:
true if the bit is high.

Definition at line 122 of file DigitalOutput.hpp.

void RTT::DigitalOutput::setBit ( bool  on_off  )  [inline]

Set the bit to the on or off state.

Parameters:
on_off Set to true to turn the bit on.

Definition at line 87 of file DigitalOutput.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Dec 23 13:22:42 2010 for Orocos Real-Time Toolkit by  doxygen 1.6.3