Public Member Functions | Static Public Attributes
RTT::dev::DigitalInInterface Class Reference

#include <DigitalInInterface.hpp>

Inheritance diagram for RTT::dev::DigitalInInterface:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DigitalInInterface (const std::string &name)
 DigitalInInterface ()
virtual bool isOff (unsigned int bit=0) const =0
virtual bool isOn (unsigned int bit=0) const =0
virtual unsigned int nbOfInputs () const =0
virtual bool readBit (unsigned int bit=0) const =0
virtual unsigned int readSequence (unsigned int start_bit, unsigned int stop_bit) const =0
virtual ~DigitalInInterface ()

Static Public Attributes

static NameServer
< DigitalInInterface * > 
nameserver

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 56 of file DigitalInInterface.hpp.


Constructor & Destructor Documentation

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

Construct a nameserved DigitalInInterface instance. The object can then be retrieved using DigitalInInterface::nameserver .

Parameters:
nameThe name which will refer to this instance.

Definition at line 67 of file DigitalInInterface.hpp.

Create a not nameserved DigitalInInterface instance.

Definition at line 75 of file DigitalInInterface.hpp.

Definition at line 78 of file DigitalInInterface.hpp.


Member Function Documentation

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

Inspect if a certain bit is on.

Parameters:
bitThe bit to check, starting from zero.
Returns:
true if the bit is low (0), false otherwise.

Implemented in RTT::FakeDigitalDevice.

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

Inspect if a certain bit is on.

Parameters:
bitThe bit to check, starting from zero.
Returns:
true if the bit is high (1), false otherwise.

Implemented in RTT::FakeDigitalDevice.

virtual unsigned int RTT::dev::DigitalInInterface::nbOfInputs ( ) const [pure virtual]

Returns the number of bits that can be read for digital input.

Implemented in RTT::FakeDigitalDevice.

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

Inspect a bit.

Parameters:
bitThe bit to check, starting from zero.
Returns:
true if the bit is high (1), false otherwise.

Implemented in RTT::FakeDigitalDevice.

virtual unsigned int RTT::dev::DigitalInInterface::readSequence ( unsigned int  start_bit,
unsigned int  stop_bit 
) const [pure virtual]

Inspect a sequence of bits.

Parameters:
start_bitThe first bit to check.
stop_bitThe 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.

Implemented in RTT::FakeDigitalDevice.


Member Data Documentation

The NameServer of this interface.

See also:
NameServer

Definition at line 85 of file DigitalInInterface.hpp.


The documentation for this class was generated from the following files:


rtt
Author(s): RTT Developers
autogenerated on Wed Aug 26 2015 16:16:23