Loading...
Searching...
No Matches
libm2k::digital::M2kDigital Class Referenceabstract
Digital

Controls the digital input and output segment. More...

`#include <libm2k/digital/m2kdigital.hpp>`

## Public Member Functions

virtual void | setDirection (unsigned short mask)=0
| Set the direction for all digital channels.
virtual void | setDirection (unsigned int index, DIO_DIRECTION dir)=0
| Set the direction of the given digital channel.
virtual void | setDirection (unsigned int index, bool dir)=0
| Set the direction of the given digital channel.
virtual void | setDirection (DIO_CHANNEL index, bool dir)=0
| Set the direction of the given digital channel.
virtual void | setDirection (DIO_CHANNEL index, DIO_DIRECTION dir)=0
| Set the direction of the given digital channel.
virtual DIO_DIRECTION | getDirection (DIO_CHANNEL index)=0
| Retrieve the direction of the given digital channel.
virtual void | setValueRaw (DIO_CHANNEL index, DIO_LEVEL level)=0
| Set the raw value of a given digital channel.
virtual void | push (std::vector< unsigned short > const &data)=0
| Send the samples to all digital channels.
virtual void | push (unsigned short *data, unsigned int nb_samples)=0
| Send the samples to all digital channels.
virtual void | setValueRaw (unsigned int index, DIO_LEVEL level)=0
| Set the raw value of a given digital channel.
virtual void | setValueRaw (DIO_CHANNEL index, bool level)=0
| Set the raw value of a given digital channel.
virtual DIO_LEVEL | getValueRaw (DIO_CHANNEL index)=0
| Retrieve the raw value of the given digital channel.
virtual DIO_LEVEL | getValueRaw (unsigned int index)=0
| Retrieve the raw value of the given digital channel.
virtual void | stopBufferOut ()=0
| Stop all digital channels from sending the signals.
virtual void | startAcquisition (unsigned int nb_samples)=0
| Create the buffer for all channels and start the acquisition.
virtual void | stopAcquisition ()=0
| Destroy the buffer and stop the acquisition.
virtual void | cancelAcquisition ()=0
| Cancel all rx-buffer operations.
virtual void | cancelBufferOut ()=0
| Cancel all tx-buffer operations.
virtual std::vector< unsigned short > | getSamples (unsigned int nb_samples)=0
| Retrieve a specific number of samples.
virtual const unsigned short * | getSamplesP (unsigned int nb_samples)=0
| Retrieve a specific number of samples.
virtual void | enableChannel (unsigned int index, bool enable)=0
| Enable or disable the given digital channel.
virtual void | enableChannel (DIO_CHANNEL index, bool enable)=0
| Enable or disable the given digital channel.
virtual void | enableAllOut (bool enable)=0
| Enable or disable all output channels.
virtual bool | anyChannelEnabled (DIO_DIRECTION dir)=0
| Check if there is at least one channel enabled.
virtual void | setOutputMode (DIO_CHANNEL chn, DIO_MODE mode)=0
| Set the output mode for the given digital channel.
virtual void | setOutputMode (unsigned int chn, DIO_MODE mode)=0
| Set the output mode for the given digital channel.
virtual DIO_MODE | getOutputMode (DIO_CHANNEL chn)=0
| Retrieve the output mode for the given digital channel.
virtual DIO_MODE | getOutputMode (unsigned int chn)=0
| Retrieve the output mode for the given digital channel.
virtual double | setSampleRateIn (double samplerate)=0
| Set the sample rate for all digital input channels.
virtual double | setSampleRateOut (double samplerate)=0
| Set the sample rate for all digital output channels.
virtual double | getSampleRateIn ()=0
| Retrieve the sample rate of all digital input channels.
virtual double | getSampleRateOut ()=0
| Retrieve the sample rate of all digital output channels.
virtual bool | getCyclic ()=0
| Retrieve the value of the cyclic mode.
virtual void | setCyclic (bool cyclic)=0
| Enable or disable the cyclic mode for all digital channels.
virtual libm2k::M2kHardwareTrigger * | getTrigger ()=0
| Get the hardware trigger handler.
virtual void | setKernelBuffersCountIn (unsigned int count)=0
| Set the kernel buffers for input to a specific value.
virtual void | setKernelBuffersCountOut (unsigned int count)=0
| Set the kernel buffers for output to a specific value.
virtual struct IIO_OBJECTS | getIioObjects ()=0
| Get access to IIO channels, buffers, devices and context. Can be used when debugging directly with libiio.
virtual unsigned int | getNbChannelsIn ()=0
| Retrieve the number of digital input channels.
virtual unsigned int | getNbChannelsOut ()=0
| Retrieve the number of digital output channels.
virtual void | getSamples (std::vector< unsigned short > &data, unsigned int nb_samples)=0
| Retrieve a specific number of samples.
virtual void | setRateMux ()=0
| Force the digital interface to use the analogical rate.
virtual void | resetRateMux ()=0
| Reset the digital rate to default.
virtual void | setExternalClocksource (bool external)=0
| Set the clocksource.
virtual bool | isClocksourceExternal ()=0
| Get the current clocksource.

## Detailed Description

Controls the digital input and output segment.

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

- m2kdigital.hpp