This logical device represents one subdevice of a Comedi device. More...
#include <ComediSubDeviceDOut.hpp>
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 | |
ComediDevice * | myCard |
The output device to write to. | |
unsigned int | subDevice |
The subdevice number of this instance in myCard. | |
unsigned int | channels |
This logical device represents one subdevice of a Comedi device.
Definition at line 43 of file ComediSubDeviceDOut.hpp.
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.
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. |
Definition at line 23 of file ComediSubDeviceDOut.cpp.
References ComediDevice::getDevice(), ComediDevice::getSubDeviceType(), ComediSubDeviceDOut::myCard, and ComediSubDeviceDOut::subDevice.