Public Member Functions | Static Public Attributes | List of all members
RTT::dev::DigitalOutInterface Class Referenceabstract

#include <DigitalOutInterface.hpp>

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

Public Member Functions

virtual bool checkBit (unsigned int n) const =0
 
virtual unsigned int checkSequence (unsigned int start_bit, unsigned int stop_bit) const =0
 
 DigitalOutInterface (const std::string &name)
 
 DigitalOutInterface ()
 
virtual unsigned int nbOfOutputs () const =0
 
virtual void setBit (unsigned int bit, bool value)=0
 
virtual void setSequence (unsigned int start_bit, unsigned int stop_bit, unsigned int value)=0
 
virtual void switchOff (unsigned int n)=0
 
virtual void switchOn (unsigned int n)=0
 
virtual ~DigitalOutInterface ()
 

Static Public Attributes

static NameServer< DigitalOutInterface * > nameserver
 

Additional Inherited Members

- Private Member Functions inherited from RTT::dev::NameServerRegistrator< DigitalOutInterface * >
 NameServerRegistrator ()
 
 NameServerRegistrator (typename boost::call_traits< NameServer< DigitalOutInterface * > >::reference nameserver, const NameType &name, typename boost::call_traits< DigitalOutInterface * >::const_reference object)
 
 ~NameServerRegistrator ()
 

Detailed Description

A class representing a Digital Output device which can read or write a maximum of 32 bits at once. When there are N bits, the bits are numbered from Zero to N-1.

Invariant
Bit 0 denotes the first digital output on the card.
No more than 32 bits can be addressed
See also
TemplateDigitalOut

Definition at line 58 of file DigitalOutInterface.hpp.

Constructor & Destructor Documentation

RTT::dev::DigitalOutInterface::DigitalOutInterface ( const std::string &  name)
inline

Create a DigitalOutInterface with an optional name. When name is not "", and unique, it can be retrieved through DigitalOutInterface::nameserver .

Definition at line 68 of file DigitalOutInterface.hpp.

RTT::dev::DigitalOutInterface::DigitalOutInterface ( )
inline

Create a not nameserverd DigitalOutInterface instance.

Definition at line 75 of file DigitalOutInterface.hpp.

virtual RTT::dev::DigitalOutInterface::~DigitalOutInterface ( )
inlinevirtual

Definition at line 78 of file DigitalOutInterface.hpp.

Member Function Documentation

virtual bool RTT::dev::DigitalOutInterface::checkBit ( unsigned int  n) const
pure virtual

Returns the status of bit n, starting from zero.

Returns
true if the bit is 1, false otherwise.

Implemented in RTT::FakeDigitalDevice.

virtual unsigned int RTT::dev::DigitalOutInterface::checkSequence ( unsigned int  start_bit,
unsigned int  stop_bit 
) const
pure virtual

Returns the sequence of bits between start_bit and stop_bit inclusive, where start_bit occurs at position zero in the returned result.

Implemented in RTT::FakeDigitalDevice.

virtual unsigned int RTT::dev::DigitalOutInterface::nbOfOutputs ( ) const
pure virtual

Query the number of outputs of this card

Returns
the number of digital output channels addressable

Implemented in RTT::FakeDigitalDevice.

virtual void RTT::dev::DigitalOutInterface::setBit ( unsigned int  bit,
bool  value 
)
pure virtual

Sets the n'th output to value

Implemented in RTT::FakeDigitalDevice.

virtual void RTT::dev::DigitalOutInterface::setSequence ( unsigned int  start_bit,
unsigned int  stop_bit,
unsigned int  value 
)
pure virtual

Sets a sequence of bits to pattern value between start_bit and stop_bit inclusive. For example, setSequence(3, 3, 1) is equivalent to setBit(3, 1).

Implemented in RTT::FakeDigitalDevice.

virtual void RTT::dev::DigitalOutInterface::switchOff ( unsigned int  n)
pure virtual

Sets the n'th output off

Parameters
nThe number of the output to be switched off. The first output is number 0.

Implemented in RTT::FakeDigitalDevice.

virtual void RTT::dev::DigitalOutInterface::switchOn ( unsigned int  n)
pure virtual

Sets the n'th output on

Parameters
nThe number of the output to be switched on. The first output is number 0.

Implemented in RTT::FakeDigitalDevice.

Member Data Documentation

NameServer< DigitalOutInterface * > DigitalOutInterface::nameserver
static

The NameServer of this interface.

See also
NameServer

Definition at line 85 of file DigitalOutInterface.hpp.


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


rtt
Author(s): RTT Developers
autogenerated on Fri Oct 25 2019 03:59:46