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

#include <DigitalInput.hpp>

List of all members.

Public Member Functions

 DigitalInput (const bool &value, bool invert=false)
 DigitalInput (DigitalInInterface *dig_in, unsigned int bit_nr, bool invert=false)
 DigitalInput (const bool &value, bool invert=false)
 DigitalInput (DigitalInInterface *dig_in, unsigned int bit_nr, bool invert=false)
bool isOn () const
bool isOn () const
 ~DigitalInput ()
 ~DigitalInput ()

Private Attributes

int bitnumber
DigitalInInterfaceboard
bool minvert
const bool & mvalue

Detailed Description

A class representing a switch which can be on or off. This class can be used in combination with a DigitalInInterface or as a 'virtual' switch in which case the on/off state is stored in an external boolean variable supplied to the constructor.

See also:
also DigitalOutput

Definition at line 54 of file install/include/rtt/extras/dev/DigitalInput.hpp.


Constructor & Destructor Documentation

RTT::dev::DigitalInput::DigitalInput ( DigitalInInterface dig_in,
unsigned int  bit_nr,
bool  invert = false 
) [inline]

Create an object to read the state of a switch which can be on or off.

Parameters:
dig_in The digital input device to use to read the status.
bit_nr The bit number to use on the device.
invert Set to true to return the inverted bit in isOn().

Definition at line 65 of file install/include/rtt/extras/dev/DigitalInput.hpp.

RTT::dev::DigitalInput::DigitalInput ( const bool &  value,
bool  invert = false 
) [inline]

Create an object to read the state of a boolean value which can be on or off.

Parameters:
value A reference to a boolean representing a digital input and which is used to read the status.
invert Set to true to return the inverted value in isOn().

Definition at line 78 of file install/include/rtt/extras/dev/DigitalInput.hpp.

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

Destruct the DigitalInput.

Definition at line 86 of file install/include/rtt/extras/dev/DigitalInput.hpp.

RTT::dev::DigitalInput::DigitalInput ( DigitalInInterface dig_in,
unsigned int  bit_nr,
bool  invert = false 
) [inline]

Create an object to read the state of a switch which can be on or off.

Parameters:
dig_in The digital input device to use to read the status.
bit_nr The bit number to use on the device.
invert Set to true to return the inverted bit in isOn().

Definition at line 65 of file rtt/extras/dev/DigitalInput.hpp.

RTT::dev::DigitalInput::DigitalInput ( const bool &  value,
bool  invert = false 
) [inline]

Create an object to read the state of a boolean value which can be on or off.

Parameters:
value A reference to a boolean representing a digital input and which is used to read the status.
invert Set to true to return the inverted value in isOn().

Definition at line 78 of file rtt/extras/dev/DigitalInput.hpp.

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

Destruct the DigitalInput.

Definition at line 86 of file rtt/extras/dev/DigitalInput.hpp.


Member Function Documentation

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

Status.

Returns:
true if the input is high.

Definition at line 93 of file rtt/extras/dev/DigitalInput.hpp.

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

Status.

Returns:
true if the input is high.

Definition at line 93 of file install/include/rtt/extras/dev/DigitalInput.hpp.


Member Data Documentation

const bool & RTT::dev::DigitalInput::mvalue [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