DigitalOutInterface Class Reference
[Device Interfaces]

#include <rtt/dev/DigitalOutInterface.hpp>

Inheritance diagram for DigitalOutInterface:

NameServerRegistrator

List of all members.


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


Public Member Functions

 DigitalOutInterface (const std::string &name)
 Create a DigitalOutInterface with an optional name.
 DigitalOutInterface ()
 Create a not nameserverd DigitalOutInterface instance.
virtual void switchOn (unsigned int n)=0
 Sets the n'th output on.
virtual void switchOff (unsigned int n)=0
 Sets the n'th output off.
virtual void setBit (unsigned int bit, bool value)=0
 Sets the n'th output to value.
virtual void setSequence (unsigned int start_bit, unsigned int stop_bit, unsigned int value)=0
 Sets a sequence of bits to pattern value between start_bit and stop_bit inclusive.
virtual bool checkBit (unsigned int n) const =0
 Returns the status of bit n, starting from zero.
virtual unsigned int checkSequence (unsigned int start_bit, unsigned int stop_bit) const =0
 Returns the sequence of bits between start_bit and stop_bit inclusive, where start_bit occurs at position zero in the returned result.
virtual unsigned int nbOfOutputs () const =0
 Query the number of outputs of this card.

Static Public Attributes

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

Constructor & Destructor Documentation

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 66 of file DigitalOutInterface.hpp.


Member Function Documentation

virtual void switchOn ( unsigned int  n  )  [pure virtual]

Sets the n'th output on.

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

Referenced by __os_init().

virtual void switchOff ( unsigned int  n  )  [pure virtual]

Sets the n'th output off.

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

virtual void 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).

virtual bool 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.

Referenced by DigitalOutput::isOn().

virtual unsigned int nbOfOutputs (  )  const [pure virtual]

Query the number of outputs of this card.

Returns:
the number of digital output channels addressable


Member Data Documentation

The NameServer of this interface.

See also:
NameServer

Definition at line 83 of file DigitalOutInterface.hpp.


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

Generated on Mon Jan 19 16:53:57 2009 for OrocosReal-TimeToolkit by  doxygen 1.5.6