ComediSubDeviceDOut Class Reference

This logical device represents one subdevice of a Comedi device. More...

#include <ComediSubDeviceDOut.hpp>

Inheritance diagram for ComediSubDeviceDOut:
ComediThreadScope

List of all members.

Public Member Functions

 ComediSubDeviceDOut (ComediDevice *cd, const std::string &name, unsigned int subdevice, bool configure_all_bits=true)
 Create a new ComediSubDeviceDOut with a given ComediDevice, subdevice number and a name for this sub device The standard constructors assumes the whole subdevice is already configured for output.
 ComediSubDeviceDOut (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 void switchOn (unsigned int bit)
virtual void switchOff (unsigned int bit)
virtual void setBit (unsigned int bit, bool value)
virtual void setSequence (unsigned int start_bit, unsigned int stop_bit, unsigned int value)
virtual bool checkBit (unsigned int bit) const
virtual unsigned int checkSequence (unsigned int start_bit, unsigned int stop_bit) const
virtual unsigned int nbOfOutputs () 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.
unsigned int channels

Detailed Description

This logical device represents one subdevice of a Comedi device.

Definition at line 43 of file ComediSubDeviceDOut.hpp.


Constructor & Destructor Documentation

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

Create a new ComediSubDeviceDOut with a given ComediDevice, subdevice number and a name for this sub device The standard constructors assumes the whole subdevice is already configured for output.

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 output bits.

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 outputs.
See also:
useBit() for configuring bit-per-bit.

Definition at line 23 of file ComediSubDeviceDOut.cpp.

References ComediDevice::getDevice(), ComediDevice::getSubDeviceType(), ComediSubDeviceDOut::myCard, and ComediSubDeviceDOut::subDevice.


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