22 #ifndef M2KDIGITAL_HPP 23 #define M2KDIGITAL_HPP 25 #include <libm2k/m2kglobal.hpp> 28 #include <libm2k/m2khardwaretrigger.hpp> 53 virtual void reset() = 0;
61 virtual void setDirection(
unsigned short mask) = 0;
69 virtual void setDirection(
unsigned int index,
DIO_DIRECTION dir) = 0;
78 virtual void setDirection(
unsigned int index,
bool dir) = 0;
87 virtual void setDirection(
DIO_CHANNEL index,
bool dir) = 0;
124 virtual void push(std::vector<unsigned short>
const &data) = 0;
135 virtual void push(
unsigned short *data,
unsigned int nb_samples) = 0;
145 virtual void setValueRaw(
unsigned int index,
DIO_LEVEL level) = 0;
155 virtual void setValueRaw(
DIO_CHANNEL index,
bool level) = 0;
173 virtual DIO_LEVEL getValueRaw(
unsigned int index) = 0;
179 virtual void stopBufferOut() = 0;
185 virtual void startAcquisition(
unsigned int nb_samples) = 0;
191 virtual void stopAcquisition() = 0;
198 virtual void cancelAcquisition() = 0;
204 virtual void cancelBufferOut() = 0;
215 virtual std::vector<unsigned short> getSamples(
unsigned int nb_samples) = 0;
224 virtual const unsigned short *getSamplesP(
unsigned int nb_samples) = 0;
237 virtual void enableChannel(
unsigned int index,
bool enable) = 0;
248 virtual void enableChannel(
DIO_CHANNEL index,
bool enable) = 0;
258 virtual void enableAllOut(
bool enable) = 0;
286 virtual void setOutputMode(
unsigned int chn,
DIO_MODE mode) = 0;
304 virtual DIO_MODE getOutputMode(
unsigned int chn) = 0;
313 virtual double setSampleRateIn(
double samplerate) = 0;
322 virtual double setSampleRateOut(
double samplerate) = 0;
329 virtual double getSampleRateIn() = 0;
337 virtual double getSampleRateOut() = 0;
345 virtual bool getCyclic() = 0;
353 virtual void setCyclic(
bool cyclic) = 0;
367 virtual void setKernelBuffersCountIn(
unsigned int count) = 0;
374 virtual void setKernelBuffersCountOut(
unsigned int count) = 0;
382 virtual struct IIO_OBJECTS getIioObjects() = 0;
390 virtual unsigned int getNbChannelsIn() = 0;
398 virtual unsigned int getNbChannelsOut() = 0;
408 virtual void getSamples(std::vector<unsigned short> &data,
unsigned int nb_samples) = 0;
416 virtual void setRateMux() = 0;
424 virtual void resetRateMux() = 0;
433 virtual void setExternalClocksource(
bool external) = 0;
442 virtual bool isClocksourceExternal() = 0;
446 #endif //M2KDIGITAL_HPP DIO_LEVEL
Logic voltage levels.
Definition: digital/enums.hpp:56
DIO_CHANNEL
Indexes of the channels.
Definition: digital/enums.hpp:69
Controls the hardware trigger for ADALM2000.
Definition: m2khardwaretrigger.hpp:41
DIO_MODE
Output mode for a digital channel.
Definition: digital/enums.hpp:94
Controls the digital input and output segment.
Definition: m2kdigital.hpp:44
DIO_DIRECTION
Direction of a digital channel.
Definition: digital/enums.hpp:43