ComediSubDeviceDIn Class Reference

This logical device represents one 'Digital Input' subdevice of a Comedi device. More...

#include <ComediSubDeviceDIn.hpp>

List of all members.

Public Member Functions

 ComediSubDeviceDIn (ComediDevice *cd, const std::string &name, unsigned int subdevice, bool configure_all_bits=true)
 Create a new ComediSubDeviceDIn with a given ComediDevice, subdevice number and a name for this sub device.
 ComediSubDeviceDIn (ComediDevice *cd, unsigned int subdevice, bool configure_all_bits=true)
bool useBit (unsigned int bit)
 If configure_all_bits was false, use this method (for each bit) to specify which bits must be configured as input.
virtual bool isOn (unsigned int bit=0) const
virtual bool isOff (unsigned int bit=0) const
virtual bool readBit (unsigned int bit=0) const
virtual unsigned int nbOfInputs () const
virtual unsigned int readSequence (unsigned int start_bit, unsigned int stop_bit) const

Protected Member Functions

void init (bool all_bits)

Protected Attributes

ComediDevicemyCard
 The output device to write to.
unsigned int _subDevice
 The subdevice number of this instance in myCard.
bool error

Detailed Description

This logical device represents one 'Digital Input' subdevice of a Comedi device.

The standard constructors assumes the whole subdevice is already configured for input. For DIO (reconfigurable IO devices) use the extra constructor argument to specify that this should not be assumed and use the useBit() method to indicate which bits should be used as input bits.

Definition at line 46 of file ComediSubDeviceDIn.hpp.


Constructor & Destructor Documentation

ComediSubDeviceDIn ( ComediDevice cd,
const std::string &  name,
unsigned int  subdevice,
bool  configure_all_bits = true 
)

Create a new ComediSubDeviceDIn with a given ComediDevice, subdevice number and a name for this sub device.

Parameters:
cd The ComediDevice to use for output
subdevice The subdevice number for this comedi device
name The name of this instance
configure_all_bits Set to false to not configure all bits of this subdevice as inputs.
See also:
useBit() for configuring bit-per-bit.

Definition at line 36 of file ComediSubDeviceDIn.cpp.


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