TemplateDigitalOut Class Reference

A thread-safe class to create a DigitalOutInterface from 0 to 32 bits. More...

#include <TemplateDigitalOut.hpp>

List of all members.

Public Member Functions

 TemplateDigitalOut ()
 The default constructor initialises the bit_status to zero.
unsigned int getBitStatus () const
 The bit status is read-only.
void switchOn (unsigned int bit)
void switchOff (unsigned int bit)
void setBit (unsigned int bit, bool value)
void setSequence (unsigned int start_bit, unsigned int stop_bit, unsigned int value)
bool checkBit (unsigned int n) const
unsigned int checkSequence (unsigned int start_bit, unsigned int stop_bit) const

Detailed Description

A thread-safe class to create a DigitalOutInterface from 0 to 32 bits.

The result of the methods is stored in a protected method getBitStatus, which can be read by a derived class. The derived class should also do bounds checking, if necessary and must modify the bit status through the accessor methods such that thread-safeness is guaranteed.

Definition at line 48 of file TemplateDigitalOut.hpp.


Member Function Documentation

unsigned int getBitStatus (  )  const [inline]

The bit status is read-only.

Returns:
The status of all bits, with bit n being the bit selected by (bit_status >> n) & 0x1.

Definition at line 70 of file TemplateDigitalOut.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Dec 23 15:05:29 2010 for OrocosComponentLibrary by  doxygen 1.6.3