RTT::dev::DigitalOutput Class Reference
[Device Interfaces]

#include <DigitalOutput.hpp>

List of all members.

Public Member Functions

 DigitalOutput (bool initial_state=false)
 DigitalOutput (DigitalOutInterface *dig_out, unsigned int relay_nr, bool _invert=false)
 DigitalOutput (bool initial_state=false)
 DigitalOutput (DigitalOutInterface *dig_out, unsigned int relay_nr, bool _invert=false)
bool isOn () const
bool isOn () const
void setBit (bool on_off)
void setBit (bool on_off)
void switchOff ()
void switchOff ()
void switchOn ()
void switchOn ()
 ~DigitalOutput ()
 ~DigitalOutput ()

Private Attributes

DigitalOutInterfaceboard
bool invert
unsigned int relaynumber

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 55 of file install/include/rtt/extras/dev/DigitalOutput.hpp.


Constructor & Destructor Documentation

RTT::dev::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 65 of file install/include/rtt/extras/dev/DigitalOutput.hpp.

RTT::dev::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 73 of file install/include/rtt/extras/dev/DigitalOutput.hpp.

RTT::dev::DigitalOutput::~DigitalOutput (  )  [inline]

Destruct a DigitalOutput

Definition at line 81 of file install/include/rtt/extras/dev/DigitalOutput.hpp.

RTT::dev::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 65 of file rtt/extras/dev/DigitalOutput.hpp.

RTT::dev::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 73 of file rtt/extras/dev/DigitalOutput.hpp.

RTT::dev::DigitalOutput::~DigitalOutput (  )  [inline]

Destruct a DigitalOutput

Definition at line 81 of file rtt/extras/dev/DigitalOutput.hpp.


Member Function Documentation

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

Check if the output is on (high).

Returns:
true if the bit is high.

Definition at line 123 of file rtt/extras/dev/DigitalOutput.hpp.

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

Check if the output is on (high).

Returns:
true if the bit is high.

Definition at line 123 of file install/include/rtt/extras/dev/DigitalOutput.hpp.

void RTT::dev::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 88 of file rtt/extras/dev/DigitalOutput.hpp.

void RTT::dev::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 88 of file install/include/rtt/extras/dev/DigitalOutput.hpp.

void RTT::dev::DigitalOutput::switchOff (  )  [inline]

Set the bit low of the digital output.

Definition at line 110 of file rtt/extras/dev/DigitalOutput.hpp.

void RTT::dev::DigitalOutput::switchOff (  )  [inline]

Set the bit low of the digital output.

Definition at line 110 of file install/include/rtt/extras/dev/DigitalOutput.hpp.

void RTT::dev::DigitalOutput::switchOn (  )  [inline]

Set the bit high of the digital output.

Definition at line 99 of file rtt/extras/dev/DigitalOutput.hpp.

void RTT::dev::DigitalOutput::switchOn (  )  [inline]

Set the bit high of the digital output.

Definition at line 99 of file install/include/rtt/extras/dev/DigitalOutput.hpp.


Member Data Documentation

unsigned int RTT::dev::DigitalOutput::relaynumber [private]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


rtt
Author(s): RTT Developers
autogenerated on Fri Jan 11 09:49:55 2013