RTT::DigitalInInterface Class Reference
[Device Interfaces]

A class representing a Digital Input device from which a maximum of 32 bits can be read at once. More...

#include <rtt/dev/DigitalInInterface.hpp>

Inheritance diagram for RTT::DigitalInInterface:
RTT::NameServerRegistrator< DigitalInInterface * >

List of all members.

Public Member Functions

 DigitalInInterface (const std::string &name)
 Construct a nameserved DigitalInInterface instance.
 DigitalInInterface ()
 Create a not nameserved DigitalInInterface instance.
virtual bool isOn (unsigned int bit=0) const =0
 Inspect if a certain bit is on.
virtual bool isOff (unsigned int bit=0) const =0
 Inspect if a certain bit is on.
virtual bool readBit (unsigned int bit=0) const =0
 Inspect a bit.
virtual unsigned int readSequence (unsigned int start_bit, unsigned int stop_bit) const =0
 Inspect a sequence of bits.
virtual unsigned int nbOfInputs () const =0
 Returns the number of bits that can be read for digital input.

Static Public Attributes

static NameServer
< DigitalInInterface * > 
nameserver
 The NameServer of this interface.

Detailed Description

A class representing a Digital Input device from which a maximum of 32 bits can be read at once.

When there are N bits, the bits are numbered from Zero to N-1.

See also:
TemplateDigitalIn

Definition at line 55 of file DigitalInInterface.hpp.


Constructor & Destructor Documentation

RTT::DigitalInInterface::DigitalInInterface ( const std::string &  name  )  [inline]

Construct a nameserved DigitalInInterface instance.

The object can then be retrieved using DigitalInInterface::nameserver .

Parameters:
name The name which will refer to this instance.

Definition at line 66 of file DigitalInInterface.hpp.


Member Function Documentation

virtual bool RTT::DigitalInInterface::isOff ( unsigned int  bit = 0  )  const [pure virtual]

Inspect if a certain bit is on.

Parameters:
bit The bit to check, starting from zero.
Returns:
true if the bit is low (0), false otherwise.
virtual bool RTT::DigitalInInterface::isOn ( unsigned int  bit = 0  )  const [pure virtual]

Inspect if a certain bit is on.

Parameters:
bit The bit to check, starting from zero.
Returns:
true if the bit is high (1), false otherwise.
virtual bool RTT::DigitalInInterface::readBit ( unsigned int  bit = 0  )  const [pure virtual]

Inspect a bit.

Parameters:
bit The bit to check, starting from zero.
Returns:
true if the bit is high (1), false otherwise.
virtual unsigned int RTT::DigitalInInterface::readSequence ( unsigned int  start_bit,
unsigned int  stop_bit 
) const [pure virtual]

Inspect a sequence of bits.

Parameters:
start_bit The first bit to check.
stop_bit The last bit (inclusive) to check.
Returns:
a bit pattern denoting the bit status from start_bit to stop_bit where bit zero equals the value of start_bit.

Member Data Documentation

The NameServer of this interface.

See also:
NameServer

Definition at line 84 of file DigitalInInterface.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