diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/analog_2enums_8hpp.html b/analog_2enums_8hpp.html new file mode 100644 index 00000000..c6853e03 --- /dev/null +++ b/analog_2enums_8hpp.html @@ -0,0 +1,159 @@ + + +
+ + + + +
+ libm2k
+
+ |
+
Analogical enumerations. +More...
+#include <vector>
#include <string>
#include <memory>
Go to the source code of this file.
++Classes | |
struct | libm2k::analog::DMM_READING |
The structure of a DMM. More... | |
+Enumerations | |
enum | libm2k::analog::ANALOG_IN_CHANNEL { + ANALOG_IN_CHANNEL_1 = 0, + + ANALOG_IN_CHANNEL_2 = 1 + + } |
Indexes of the channels. More... | |
enum | libm2k::analog::M2K_RANGE { + PLUS_MINUS_25V = 0, + + PLUS_MINUS_2_5V = 1 + + } |
Range of the signal's amplitude. | |
Analogical enumerations.
+enum libm2k::analog::ANALOG_IN_CHANNEL | +
Indexes of the channels.
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
▼Nlibm2k | |
▼Nanalog | |
CDMM | Controls the digital multimeter |
CDMM_READING | The structure of a DMM |
CM2kAnalogIn | Controls the analogical input compound |
CM2kAnalogOut | Controls the analogical output compound |
CM2kPowerSupply | Controls the power supply |
▼Ncontext | |
CContext | Controls the IIO context |
CM2k | Controls the ADALM2000 |
▼Ndigital | |
CM2kDigital | Controls the digital input and output segment |
CCALIBRATION_PARAMETERS | Calibration parameters of m2k |
CCONTEXT_INFO | Additional information about the context |
CIIO_CONTEXT_VERSION | The version of the backend |
CM2kHardwareTrigger | Controls the hardware trigger for ADALM2000 |
CSETTINGS | Triggering system |
+ libm2k
+
+ |
+
|
|
| M2kDigital (libm2k::digital) | ||||
M2kHardwareTrigger (libm2k) | |||||||
CALIBRATION_PARAMETERS (libm2k) | DMM (libm2k::analog) | M2k (libm2k::context) | M2kPowerSupply (libm2k::analog) | ||||
Context (libm2k::context) | DMM_READING (libm2k::analog) | M2kAnalogIn (libm2k::analog) |
| ||||
CONTEXT_INFO (libm2k) |
| M2kAnalogOut (libm2k::analog) | |||||
SETTINGS (libm2k) | |||||||
IIO_CONTEXT_VERSION (libm2k) | |||||||
+ libm2k
+
+ |
+
This is the complete list of members for libm2k::M2kHardwareTrigger, including all inherited members.
+
+ libm2k
+
+ |
+
Controls the hardware trigger for ADALM2000. + More...
+ +#include <libm2k/m2khardwaretrigger.hpp>
+Public Member Functions | |
virtual int | getAnalogLevelRaw (unsigned int chnIdx)=0 |
Get the raw analog trigger level for one channel. More... | |
virtual void | setAnalogLevelRaw (unsigned int chnIdx, int level)=0 |
Set the raw analog trigger level for one channel. More... | |
virtual void | setAnalogLevel (unsigned int chnIdx, double v_level)=0 |
Set the analog trigger level for one channel. More... | |
virtual double | getAnalogLevel (unsigned int chnIdx)=0 |
Get the analog trigger level for one channel. More... | |
virtual double | getAnalogHysteresis (unsigned int chnIdx)=0 |
Get the analog hysteresis value for one channel. More... | |
virtual void | setAnalogHysteresis (unsigned int chnIdx, double hysteresis)=0 |
Set the analog hysteresis value for one channel. More... | |
virtual M2K_TRIGGER_CONDITION_ANALOG | getAnalogCondition (unsigned int chnIdx)=0 |
Get the trigger condition for the analog trigger on a specific channel. More... | |
virtual void | setAnalogCondition (unsigned int chnIdx, M2K_TRIGGER_CONDITION_ANALOG cond)=0 |
Set the trigger condition for the analog trigger on a specific channel. More... | |
virtual M2K_TRIGGER_CONDITION_DIGITAL | getDigitalCondition (unsigned int chnIdx)=0 |
Get the trigger condition for the digital trigger on a specific channel. More... | |
virtual M2K_TRIGGER_CONDITION_DIGITAL | getDigitalCondition (libm2k::digital::DIO_CHANNEL chnIdx)=0 |
Get the trigger condition for the digital trigger on a specific channel. More... | |
virtual void | setDigitalCondition (unsigned int chnIdx, M2K_TRIGGER_CONDITION_DIGITAL cond)=0 |
Set the trigger condition for the digital trigger on a specific channel. More... | |
virtual void | setDigitalCondition (libm2k::digital::DIO_CHANNEL chnIdx, M2K_TRIGGER_CONDITION_DIGITAL cond)=0 |
Set the trigger condition for the digital trigger on a specific channel. More... | |
virtual M2K_TRIGGER_MODE | getAnalogMode (unsigned int chnIdx)=0 |
Get the mode for the analog trigger on a specific channel. More... | |
virtual void | setAnalogMode (unsigned int chnIdx, M2K_TRIGGER_MODE mode)=0 |
Set the mode for the analog trigger on a specific channel. More... | |
virtual libm2k::digital::DIO_TRIGGER_MODE | getDigitalMode ()=0 |
Get the mode for the digital trigger. More... | |
virtual void | setDigitalMode (libm2k::digital::DIO_TRIGGER_MODE mode)=0 |
Set the mode for the digital trigger. More... | |
virtual M2K_TRIGGER_SOURCE_ANALOG | getAnalogSource ()=0 |
Get the source of the analog trigger. More... | |
virtual void | setAnalogSource (M2K_TRIGGER_SOURCE_ANALOG src)=0 |
Set the source of the analog trigger. More... | |
virtual int | getAnalogSourceChannel ()=0 |
Get the channel source of the analog trigger. More... | |
virtual void | setAnalogSourceChannel (unsigned int chnIdx)=0 |
Set the channel source of the analog trigger. More... | |
virtual int | getAnalogDelay () const =0 |
Get the analog trigger delay. More... | |
virtual void | setAnalogDelay (int delay)=0 |
Set the analog trigger delay. More... | |
virtual int | getDigitalDelay () const =0 |
Get the digital trigger delay. More... | |
virtual void | setDigitalDelay (int delay)=0 |
Set the digital trigger delay. More... | |
virtual void | setAnalogStreamingFlag (bool enable)=0 |
Set the streaming flag for the analog part. More... | |
virtual bool | getAnalogStreamingFlag ()=0 |
Get the streaming flag for the analog part. More... | |
virtual void | setDigitalStreamingFlag (bool enable)=0 |
Set the streaming flag for the digital part. More... | |
virtual bool | getDigitalStreamingFlag ()=0 |
Get the streaming flag for the digital part. More... | |
virtual M2K_TRIGGER_CONDITION_DIGITAL | getAnalogExternalCondition (unsigned int chnIdx)=0 |
getAnalogExternalCondition More... | |
virtual void | setAnalogExternalCondition (unsigned int chnIdx, M2K_TRIGGER_CONDITION_DIGITAL cond)=0 |
setAnalogExternalCondition More... | |
virtual M2K_TRIGGER_CONDITION_DIGITAL | getDigitalExternalCondition () const =0 |
getDigitalExternalCondition More... | |
virtual void | setDigitalExternalCondition (M2K_TRIGGER_CONDITION_DIGITAL cond)=0 |
setDigitalExternalCondition More... | |
virtual void | setAnalogExternalOutSelect (M2K_TRIGGER_OUT_SELECT output_select) |
Select what should be redirected on the TO (trigger out) pin. + The options are (none, trigger in, digital in, analog in). +. More... | |
virtual M2K_TRIGGER_OUT_SELECT | getAnalogExternalOutSelect () |
Check which trigger events are forwarded on the TO (trigger out) pin. More... | |
virtual void | setDigitalSource (M2K_TRIGGER_SOURCE_DIGITAL external_src) |
Select which interface triggers the DigitalIn. More... | |
virtual M2K_TRIGGER_SOURCE_DIGITAL | getDigitalSource () const |
Check which is the source of the DigitalIn interface trigger event. More... | |
virtual void | setAnalogOutTriggerSource (M2K_TRIGGER_SOURCE_OUT src)=0 |
Select which interface triggers the AnalogOut. More... | |
virtual M2K_TRIGGER_SOURCE_OUT | getAnalogOutTriggerSource () const =0 |
Returns the source of the AnalogOut trigger event. More... | |
virtual void | setAnalogOutTriggerCondition (M2K_TRIGGER_CONDITION_OUT condition)=0 |
Configures the triggering condition when the source of the AnalogOut trigger event is set to TRIGGER_TI_0. More... | |
virtual M2K_TRIGGER_CONDITION_OUT | getAnalogOutTriggerCondition () const =0 |
Returns the condition of the AnalogOut trigger event when the source is TI. More... | |
virtual void | setAnalogOutTriggerStatus (M2K_TRIGGER_STATUS_ANALOG_OUT status)=0 |
Defines the action to be performed when a trigger event occurs. More... | |
virtual M2K_TRIGGER_STATUS_ANALOG_OUT | getAnalogOutTriggerStatus () const =0 |
Returns the action that is performed when a trigger event occurs. More... | |
Controls the hardware trigger for ADALM2000.
+
+ libm2k
+
+ |
+
This is the complete list of members for libm2k::analog::DMM, including all inherited members.
+getAllChannels()=0 | libm2k::analog::DMM | pure virtual |
getName()=0 | libm2k::analog::DMM | pure virtual |
readAll()=0 | libm2k::analog::DMM | pure virtual |
readChannel(unsigned int index)=0 | libm2k::analog::DMM | pure virtual |
readChannel(std::string chn_name)=0 | libm2k::analog::DMM | pure virtual |
+ libm2k
+
+ |
+
Controls the digital multimeter. + More...
+ +#include <libm2k/analog/dmm.hpp>
+Public Member Functions | |
virtual std::vector< std::string > | getAllChannels ()=0 |
Retrieve all channels. More... | |
virtual libm2k::analog::DMM_READING | readChannel (unsigned int index)=0 |
Retrieve additional information about the given channel. More... | |
virtual libm2k::analog::DMM_READING | readChannel (std::string chn_name)=0 |
Retrieve additional information about the given channel. More... | |
virtual std::vector< libm2k::analog::DMM_READING > | readAll ()=0 |
Retrieve additional information about all channels. More... | |
virtual std::string | getName ()=0 |
Retrieve the device's name. More... | |
Controls the digital multimeter.
+
+ libm2k
+
+ |
+
This is the complete list of members for libm2k::analog::M2kAnalogIn, including all inherited members.
+
+ libm2k
+
+ |
+
Controls the analogical input compound. + More...
+ +#include <libm2k/analog/m2kanalogin.hpp>
+Public Member Functions | |
virtual void | startAcquisition (unsigned int nb_samples)=0 |
Create the buffer for both channels and start the acquisition. More... | |
+virtual void | stopAcquisition ()=0 |
Destroy the buffer and stop the acquisition. | |
virtual std::vector< std::vector< double > > | getSamples (unsigned int nb_samples)=0 |
Retrieve a specific number of samples from each channel. More... | |
virtual std::vector< std::vector< double > > | getSamplesRaw (unsigned int nb_samples)=0 |
Retrieve a specific number of raw samples from each channel. More... | |
virtual const double * | getSamplesInterleaved (unsigned int nb_samples_per_channel)=0 |
Retrieve a specific number of samples from each channel. More... | |
virtual const short * | getSamplesRawInterleaved (unsigned int nb_samples_per_channel)=0 |
Retrieve a specific number of raw samples from each channel. More... | |
virtual const double * | getSamplesInterleaved_matlab (unsigned int nb_samples)=0 |
Retrieve a specific number of samples from both channels. More... | |
virtual const short * | getSamplesRawInterleaved_matlab (unsigned int nb_samples)=0 |
Retrieve a specific number of raw samples from both channels. More... | |
virtual short | getVoltageRaw (unsigned int ch)=0 |
Retrieve the average raw value of the given channel. More... | |
virtual double | getVoltage (unsigned int ch)=0 |
Retrieve the average voltage of the given channel. More... | |
virtual short | getVoltageRaw (libm2k::analog::ANALOG_IN_CHANNEL ch)=0 |
Retrieve the average raw value of the given channel. More... | |
virtual double | getVoltage (libm2k::analog::ANALOG_IN_CHANNEL ch)=0 |
Retrieve the average voltage of the given channel. More... | |
virtual std::vector< short > | getVoltageRaw ()=0 |
Retrieve the average raw value for each channel. More... | |
virtual std::vector< double > | getVoltage ()=0 |
Retrieve the average voltage for each channel. More... | |
virtual const short * | getVoltageRawP ()=0 |
Retrieve the average raw value for both channels. More... | |
virtual const double * | getVoltageP ()=0 |
Retrieve the average voltage for both channels. More... | |
virtual void | setVerticalOffset (ANALOG_IN_CHANNEL channel, double vertOffset)=0 |
Set the vertical offset, in Volts, of a specific channel. More... | |
virtual double | getVerticalOffset (ANALOG_IN_CHANNEL channel)=0 |
getVerticalOffset More... | |
virtual double | getScalingFactor (libm2k::analog::ANALOG_IN_CHANNEL ch)=0 |
Retrieve the scaling factor. More... | |
virtual void | setRange (ANALOG_IN_CHANNEL channel, M2K_RANGE range)=0 |
Set the range for the given channel. More... | |
virtual void | setRange (ANALOG_IN_CHANNEL channel, double min, double max)=0 |
Set the range for the given channel. More... | |
virtual libm2k::analog::M2K_RANGE | getRange (libm2k::analog::ANALOG_IN_CHANNEL channel)=0 |
Retrieve the range for the given channel. More... | |
virtual std::pair< double, double > | getRangeLimits (libm2k::analog::M2K_RANGE range)=0 |
Retrieve the bounds for the given range. More... | |
virtual std::vector< std::pair< std::string, std::pair< double, double > > > | getAvailableRanges ()=0 |
Retrieve all ranges that are available. More... | |
virtual int | getOversamplingRatio ()=0 |
Retrieve the global oversampling ratio. More... | |
virtual int | getOversamplingRatio (unsigned int chn_idx)=0 |
Retrieve the oversampling ratio for the given channel. More... | |
virtual int | setOversamplingRatio (int oversampling)=0 |
Set the global oversampling ratio. More... | |
virtual int | setOversamplingRatio (unsigned int chn_idx, int oversampling)=0 |
Set the oversampling ratio for the given channel. More... | |
virtual double | getSampleRate ()=0 |
Retrieve the global sample rate. More... | |
virtual std::vector< double > | getAvailableSampleRates ()=0 |
getAvailableSampleRates More... | |
virtual double | setSampleRate (double samplerate)=0 |
Set the global sample rate. More... | |
virtual std::pair< double, double > | getHysteresisRange (ANALOG_IN_CHANNEL chn)=0 |
Retrieve the bounds of the analogical trigger's hysteresis for the given channel. More... | |
virtual double | getFilterCompensation (double samplerate)=0 |
Retrieve the filter compensation for the given sample rate. More... | |
virtual double | getValueForRange (M2K_RANGE range)=0 |
Retrieve the numeric value corresponding to the given range. More... | |
virtual double | convertRawToVolts (unsigned int channel, short raw)=0 |
Convert the raw value of a sample into volts. More... | |
virtual short | convertVoltsToRaw (unsigned int channel, double voltage)=0 |
Convert the voltage value of a sample into raw. More... | |
virtual unsigned int | getNbChannels ()=0 |
Retrieve the number of analogical channels. More... | |
virtual std::string | getName ()=0 |
Retrieve the name of the device. More... | |
virtual void | enableChannel (unsigned int chnIdx, bool enable)=0 |
Enable or disable the given channel. More... | |
virtual bool | isChannelEnabled (unsigned int chnIdx)=0 |
Retrieve the state of the given channel. More... | |
virtual void | cancelAcquisition ()=0 |
Cancel all buffer operations. More... | |
virtual void | setKernelBuffersCount (unsigned int count)=0 |
Set the kernel buffers to a specific value. More... | |
virtual unsigned int | getKernelBuffersCount () const =0 |
Get the number of kernel buffers. More... | |
virtual libm2k::M2kHardwareTrigger * | getTrigger ()=0 |
Get the hardware trigger handler. More... | |
virtual struct IIO_OBJECTS | getIioObjects ()=0 |
Get access to IIO channels, buffers, devices and context. Can be used when debugging directly with libiio. More... | |
virtual void | getSamples (std::vector< std::vector< double >> &data, unsigned int nb_samples)=0 |
Retrieve a specific number of samples from each channel. More... | |
virtual std::string | getChannelName (unsigned int channel)=0 |
Get the channel name for each ADC channel. More... | |
virtual double | getMaximumSamplerate ()=0 |
Get the maximum samplerate for the ADC. More... | |
Controls the analogical input compound.
+
+ libm2k
+
+ |
+
This is the complete list of members for libm2k::analog::M2kAnalogOut, including all inherited members.
+cancelBuffer()=0 | libm2k::analog::M2kAnalogOut | pure virtual |
cancelBuffer(unsigned int chn)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
convertRawToVolts(unsigned int channel, short raw)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
convertVoltsToRaw(unsigned int channel, double voltage)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
enableChannel(unsigned int chnIdx, bool enable)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
getAvailableSampleRates(unsigned int chn)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
getBufferRearmOnTrigger() const =0 | libm2k::analog::M2kAnalogOut | pure virtual |
getChannelName(unsigned int channel)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
getCyclic(unsigned int chn)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
getFilterCompensation(double samplerate)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
getIioObjects()=0 | libm2k::analog::M2kAnalogOut | pure virtual |
getKernelBuffersCount(unsigned int chnIdx) const =0 | libm2k::analog::M2kAnalogOut | pure virtual |
getMaximumSamplerate(unsigned int chn_idx)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
getNbChannels()=0 | libm2k::analog::M2kAnalogOut | pure virtual |
getOversamplingRatio()=0 | libm2k::analog::M2kAnalogOut | pure virtual |
getOversamplingRatio(unsigned int chn)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
getSampleRate()=0 | libm2k::analog::M2kAnalogOut | pure virtual |
getSampleRate(unsigned int chn)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
getScalingFactor(unsigned int chn)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
getTrigger()=0 | libm2k::analog::M2kAnalogOut | pure virtual |
isChannelEnabled(unsigned int chnIdx)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
isPushDone(unsigned int chnIdx) const =0 | libm2k::analog::M2kAnalogOut | pure virtual |
push(unsigned int chnIdx, std::vector< double > const &data)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
push(std::vector< std::vector< double >> const &data)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
pushBytes(unsigned int chnIdx, double *data, unsigned int nb_samples)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
pushInterleaved(double *data, unsigned int nb_channels, unsigned int nb_samples)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
pushRaw(unsigned int chnIdx, std::vector< short > const &data)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
pushRaw(std::vector< std::vector< short >> const &data)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
pushRawBytes(unsigned int chnIdx, short *data, unsigned int nb_samples)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
pushRawInterleaved(short *data, unsigned int nb_channels, unsigned int nb_samples)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
setBufferRearmOnTrigger(bool enable)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
setCyclic(bool en)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
setCyclic(unsigned int chn, bool en)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
setKernelBuffersCount(unsigned int chnIdx, unsigned int count)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
setOversamplingRatio(std::vector< int > oversampling_ratio)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
setOversamplingRatio(unsigned int chn, int oversampling_ratio)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
setSampleRate(std::vector< double > samplerates)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
setSampleRate(unsigned int chn, double samplerate)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
setVoltage(unsigned int chn_idx, double volts)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
setVoltageRaw(unsigned int chn_idx, unsigned short raw)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
stop()=0 | libm2k::analog::M2kAnalogOut | pure virtual |
stop(unsigned int chn)=0 | libm2k::analog::M2kAnalogOut | pure virtual |
+ libm2k
+
+ |
+
Controls the analogical output compound. + More...
+ +#include <libm2k/analog/m2kanalogout.hpp>
+Public Member Functions | |
virtual std::vector< int > | getOversamplingRatio ()=0 |
Retrieve the global oversampling ratio. More... | |
virtual int | getOversamplingRatio (unsigned int chn)=0 |
Retrieve the oversampling ratio for the given channel. More... | |
virtual std::vector< int > | setOversamplingRatio (std::vector< int > oversampling_ratio)=0 |
Set the value of the oversampling ratio for each channel. More... | |
virtual int | setOversamplingRatio (unsigned int chn, int oversampling_ratio)=0 |
Set the oversampling ratio for the given channel. More... | |
virtual std::vector< double > | getSampleRate ()=0 |
Retrieve the sample rate of both DACs. More... | |
virtual double | getSampleRate (unsigned int chn)=0 |
Retrieve the sample rate for the given channel. More... | |
virtual std::vector< double > | getAvailableSampleRates (unsigned int chn)=0 |
getAvailableSampleRates More... | |
virtual std::vector< double > | setSampleRate (std::vector< double > samplerates)=0 |
Set the sample rate for both channels. More... | |
virtual double | setSampleRate (unsigned int chn, double samplerate)=0 |
Set the sample rate for the given channel. More... | |
virtual void | setCyclic (bool en)=0 |
Enable or disable the cyclic mode for all digital channels. More... | |
virtual void | setCyclic (unsigned int chn, bool en)=0 |
Enable or disable the cyclic mode for all digital channels. More... | |
virtual bool | getCyclic (unsigned int chn)=0 |
Retrieve the value of the cyclic mode. More... | |
virtual double | getScalingFactor (unsigned int chn)=0 |
Retrieve the scaling factor for the given channel. More... | |
virtual double | getFilterCompensation (double samplerate)=0 |
Retrieve the filter compensation for the given sample rate. More... | |
virtual void | pushBytes (unsigned int chnIdx, double *data, unsigned int nb_samples)=0 |
Send the samples to the given channel. More... | |
virtual void | pushRawBytes (unsigned int chnIdx, short *data, unsigned int nb_samples)=0 |
Send the samples to the given channel. More... | |
virtual void | pushInterleaved (double *data, unsigned int nb_channels, unsigned int nb_samples)=0 |
Send samples to all the channels. More... | |
virtual void | pushRawInterleaved (short *data, unsigned int nb_channels, unsigned int nb_samples)=0 |
Send samples to all the channels. More... | |
virtual void | push (unsigned int chnIdx, std::vector< double > const &data)=0 |
Send the samples to the given channel. More... | |
virtual void | pushRaw (unsigned int chnIdx, std::vector< short > const &data)=0 |
Send the samples to the given channel. More... | |
virtual void | push (std::vector< std::vector< double >> const &data)=0 |
Send samples to channels. More... | |
virtual void | pushRaw (std::vector< std::vector< short >> const &data)=0 |
Send samples to channels. More... | |
virtual void | stop ()=0 |
Stop all channels from sending the signals. More... | |
virtual void | stop (unsigned int chn)=0 |
Stop the given channels from sending the signals. More... | |
virtual void | cancelBuffer ()=0 |
Cancel all buffer operations of enabled channels. More... | |
virtual void | cancelBuffer (unsigned int chn)=0 |
Cancel all buffer operations of the given channel. More... | |
virtual void | enableChannel (unsigned int chnIdx, bool enable)=0 |
Enable or disable the given digital channel. More... | |
virtual bool | isChannelEnabled (unsigned int chnIdx)=0 |
Check if the given channel is enabled. More... | |
virtual bool | isPushDone (unsigned int chnIdx) const =0 |
Check if the generation of the signal (only for non-cyclic buffer) is done. More... | |
virtual void | setKernelBuffersCount (unsigned int chnIdx, unsigned int count)=0 |
Set the kernel buffers to a specific value. More... | |
virtual unsigned int | getKernelBuffersCount (unsigned int chnIdx) const =0 |
Get the number of kernel buffers. More... | |
virtual short | convertVoltsToRaw (unsigned int channel, double voltage)=0 |
Convert the volts value of a sample into raw. More... | |
virtual double | convertRawToVolts (unsigned int channel, short raw)=0 |
Convert the raw value of a sample into volts. More... | |
virtual struct IIO_OBJECTS | getIioObjects ()=0 |
Get access to IIO channels, buffers, devices and context. More... | |
virtual unsigned int | getNbChannels ()=0 |
Retrieve the number of analogical channels. More... | |
virtual std::string | getChannelName (unsigned int channel)=0 |
Get the channel name for each DAC channel. More... | |
virtual double | getMaximumSamplerate (unsigned int chn_idx)=0 |
Get the maximum samplerate for the DAC. More... | |
virtual unsigned short | setVoltage (unsigned int chn_idx, double volts)=0 |
Sets the voltage output of the DAC channel. More... | |
virtual unsigned short | setVoltageRaw (unsigned int chn_idx, unsigned short raw)=0 |
Sets the raw output of the DAC channel. More... | |
virtual libm2k::M2kHardwareTrigger * | getTrigger ()=0 |
Get the hardware trigger handler. More... | |
virtual void | setBufferRearmOnTrigger (bool enable)=0 |
Allows sequential output of multiple buffers with each trigger event. More... | |
virtual bool | getBufferRearmOnTrigger () const =0 |
Retrieve the value of the attribute that controls buffer rearm on trigger. More... | |
Controls the analogical output compound.
+
+ libm2k
+
+ |
+
This is the complete list of members for libm2k::analog::M2kPowerSupply, including all inherited members.
+anyChannelEnabled()=0 | libm2k::analog::M2kPowerSupply | pure virtual |
enableAll(bool en)=0 | libm2k::analog::M2kPowerSupply | pure virtual |
enableChannel(unsigned int chn, bool en)=0 | libm2k::analog::M2kPowerSupply | pure virtual |
pushChannel(unsigned int chn, double value, bool calibrated=true)=0 | libm2k::analog::M2kPowerSupply | pure virtual |
readChannel(unsigned int chn, bool calibrated=true)=0 | libm2k::analog::M2kPowerSupply | pure virtual |
+ libm2k
+
+ |
+
Controls the power supply. + More...
+ +#include <libm2k/analog/m2kpowersupply.hpp>
+Public Member Functions | |
virtual void | enableChannel (unsigned int chn, bool en)=0 |
Enable or disable the given channel. More... | |
virtual void | enableAll (bool en)=0 |
Enable or disable all channels. More... | |
virtual double | readChannel (unsigned int chn, bool calibrated=true)=0 |
Retrieve the value of a given channel. More... | |
virtual void | pushChannel (unsigned int chn, double value, bool calibrated=true)=0 |
Set the voltage for the given channel. More... | |
virtual bool | anyChannelEnabled ()=0 |
Check if there is at least one enabled channel. More... | |
Controls the power supply.
+
+ libm2k
+
+ |
+
This is the complete list of members for libm2k::context::Context, including all inherited members.
+
+ libm2k
+
+ |
+
Controls the IIO context. + More...
+ +#include <libm2k/context.hpp>
+Public Member Functions | |
virtual std::string | getUri ()=0 |
Get the URI of the current context. More... | |
virtual libm2k::analog::DMM * | getDMM (unsigned int index)=0 |
Retrieve the DMM object at a certain index. More... | |
virtual libm2k::analog::DMM * | getDMM (std::string name)=0 |
Retrieve the DMM object which has the provided name. More... | |
virtual std::vector< libm2k::analog::DMM * > | getAllDmm ()=0 |
Retrieve all the DMM objects. More... | |
virtual std::vector< std::string > | getAvailableContextAttributes ()=0 |
Retrieve all the available context attributes. More... | |
virtual std::string | getContextAttributeValue (std::string attr)=0 |
Retrieve the value of one context attribute. More... | |
virtual std::string | getContextDescription ()=0 |
Retrieve a detailed context description. More... | |
virtual std::string | getSerialNumber ()=0 |
Retrieve the current context serial number. More... | |
virtual std::unordered_set< std::string > | getAllDevices () const =0 |
Retrieve all the available devices. More... | |
virtual void | logAllAttributes () const =0 |
Log all the attributes. More... | |
virtual M2k * | toM2k ()=0 |
Convert the current context to M2k context, if possible. More... | |
virtual Generic * | toGeneric ()=0 |
Convert the current context to Generic context, if possible. More... | |
virtual unsigned int | getDmmCount ()=0 |
Retrieve the number of DMM objects. More... | |
virtual std::string | getFirmwareVersion ()=0 |
Retrieve the firmware version of the current context. More... | |
virtual const struct libm2k::IIO_CONTEXT_VERSION | getIioContextVersion ()=0 |
virtual struct iio_context * | getIioContext ()=0 |
virtual void | setTimeout (unsigned int timeout)=0 |
Set a timeout for I/O operations. More... | |
Controls the IIO context.
+
+ libm2k
+
+ |
+
This is the complete list of members for libm2k::context::M2k, including all inherited members.
+
+ libm2k
+
+ |
+
Controls the ADALM2000. + More...
+ +#include <libm2k/m2k.hpp>
+Public Member Functions | |
virtual void | reset ()=0 |
Reset the M2K device to default settings: More... | |
virtual bool | calibrateADC ()=0 |
Calibrate the ADC. More... | |
virtual bool | calibrateDAC ()=0 |
Calibrate the DAC. More... | |
virtual double | calibrateFromContext ()=0 |
Calibrate both ADC and DACs using predefined calibration values located in context. More... | |
virtual libm2k::digital::M2kDigital * | getDigital ()=0 |
Retrieve the Digital object. More... | |
virtual libm2k::analog::M2kPowerSupply * | getPowerSupply ()=0 |
Retrieve the PowerSupply object. More... | |
virtual libm2k::analog::M2kAnalogIn * | getAnalogIn ()=0 |
Retrieve the AnalogIn object. More... | |
virtual libm2k::analog::M2kAnalogIn * | getAnalogIn (std::string dev_name)=0 |
Retrieve the AnalogIn object of a device. More... | |
virtual libm2k::analog::M2kAnalogOut * | getAnalogOut ()=0 |
Retrieve the AnalogOut object. More... | |
virtual bool | hasMixedSignal ()=0 |
Check if the mixed signal acquisition is available on the current firmware version. More... | |
virtual void | startMixedSignalAcquisition (unsigned int nb_samples)=0 |
Initiate the mixed acquisition. More... | |
virtual void | stopMixedSignalAcquisition ()=0 |
Stop the mixed acquisition. More... | |
virtual int | getDacCalibrationOffset (unsigned int chn)=0 |
Get the calibration offset of the DAC. More... | |
virtual double | getDacCalibrationGain (unsigned int chn)=0 |
Get the calibration gain of the DAC. More... | |
virtual int | getAdcCalibrationOffset (unsigned int chn)=0 |
Get the calibration offset of the ADC. More... | |
virtual double | getAdcCalibrationGain (unsigned int chn)=0 |
Get the calibration gain of the ADC. More... | |
virtual void | setDacCalibrationOffset (unsigned int chn, int offset)=0 |
Set the calibration offset of the DAC. More... | |
virtual void | setDacCalibrationGain (unsigned int chn, double gain)=0 |
Set the calibration gain of the DAC. More... | |
virtual void | setAdcCalibrationOffset (unsigned int chn, int offset)=0 |
Set the calibration offset of the ADC. More... | |
virtual void | setAdcCalibrationGain (unsigned int chn, double gain)=0 |
Set the calibration gain of the ADC. More... | |
virtual bool | hasContextCalibration ()=0 |
Check if the calibration based on temperature can be performed. More... | |
virtual std::map< double, std::shared_ptr< struct CALIBRATION_PARAMETERS > > & | getLUT ()=0 |
Retrieve the predefined calibration parameter. More... | |
virtual bool | isCalibrated ()=0 |
Check if the board was calibrated. More... | |
virtual void | setLed (bool on)=0 |
Turn on or off the board's led. More... | |
virtual bool | getLed ()=0 |
Retrieve the state of the led. More... | |
Public Member Functions inherited from libm2k::context::Context | |
virtual std::string | getUri ()=0 |
Get the URI of the current context. More... | |
virtual libm2k::analog::DMM * | getDMM (unsigned int index)=0 |
Retrieve the DMM object at a certain index. More... | |
virtual libm2k::analog::DMM * | getDMM (std::string name)=0 |
Retrieve the DMM object which has the provided name. More... | |
virtual std::vector< libm2k::analog::DMM * > | getAllDmm ()=0 |
Retrieve all the DMM objects. More... | |
virtual std::vector< std::string > | getAvailableContextAttributes ()=0 |
Retrieve all the available context attributes. More... | |
virtual std::string | getContextAttributeValue (std::string attr)=0 |
Retrieve the value of one context attribute. More... | |
virtual std::string | getContextDescription ()=0 |
Retrieve a detailed context description. More... | |
virtual std::string | getSerialNumber ()=0 |
Retrieve the current context serial number. More... | |
virtual std::unordered_set< std::string > | getAllDevices () const =0 |
Retrieve all the available devices. More... | |
virtual void | logAllAttributes () const =0 |
Log all the attributes. More... | |
virtual M2k * | toM2k ()=0 |
Convert the current context to M2k context, if possible. More... | |
virtual Generic * | toGeneric ()=0 |
Convert the current context to Generic context, if possible. More... | |
virtual unsigned int | getDmmCount ()=0 |
Retrieve the number of DMM objects. More... | |
virtual std::string | getFirmwareVersion ()=0 |
Retrieve the firmware version of the current context. More... | |
virtual const struct libm2k::IIO_CONTEXT_VERSION | getIioContextVersion ()=0 |
virtual struct iio_context * | getIioContext ()=0 |
virtual void | setTimeout (unsigned int timeout)=0 |
Set a timeout for I/O operations. More... | |
Controls the ADALM2000.
+
+ libm2k
+
+ |
+
This is the complete list of members for libm2k::digital::M2kDigital, including all inherited members.
+
+ libm2k
+
+ |
+
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. More... | |
virtual void | setDirection (unsigned int index, DIO_DIRECTION dir)=0 |
Set the direction of the given digital channel. More... | |
virtual void | setDirection (unsigned int index, bool dir)=0 |
Set the direction of the given digital channel. More... | |
virtual void | setDirection (DIO_CHANNEL index, bool dir)=0 |
Set the direction of the given digital channel. More... | |
virtual void | setDirection (DIO_CHANNEL index, DIO_DIRECTION dir)=0 |
Set the direction of the given digital channel. More... | |
virtual DIO_DIRECTION | getDirection (DIO_CHANNEL index)=0 |
Retrieve the direction of the given digital channel. More... | |
virtual void | setValueRaw (DIO_CHANNEL index, DIO_LEVEL level)=0 |
Set the raw value of a given digital channel. More... | |
virtual void | push (std::vector< unsigned short > const &data)=0 |
Send the samples to all digital channels. More... | |
virtual void | push (unsigned short *data, unsigned int nb_samples)=0 |
Send the samples to all digital channels. More... | |
virtual void | setValueRaw (unsigned int index, DIO_LEVEL level)=0 |
Set the raw value of a given digital channel. More... | |
virtual void | setValueRaw (DIO_CHANNEL index, bool level)=0 |
Set the raw value of a given digital channel. More... | |
virtual DIO_LEVEL | getValueRaw (DIO_CHANNEL index)=0 |
Retrieve the raw value of the given digital channel. More... | |
virtual DIO_LEVEL | getValueRaw (unsigned int index)=0 |
Retrieve the raw value of the given digital channel. More... | |
+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. More... | |
+virtual void | stopAcquisition ()=0 |
Destroy the buffer and stop the acquisition. | |
virtual void | cancelAcquisition ()=0 |
Cancel all rx-buffer operations. More... | |
virtual void | cancelBufferOut ()=0 |
Cancel all tx-buffer operations. More... | |
virtual std::vector< unsigned short > | getSamples (unsigned int nb_samples)=0 |
Retrieve a specific number of samples. More... | |
virtual const unsigned short * | getSamplesP (unsigned int nb_samples)=0 |
Retrieve a specific number of samples. More... | |
virtual void | enableChannel (unsigned int index, bool enable)=0 |
Enable or disable the given digital channel. More... | |
virtual void | enableChannel (DIO_CHANNEL index, bool enable)=0 |
Enable or disable the given digital channel. More... | |
virtual void | enableAllOut (bool enable)=0 |
Enable or disable all output channels. More... | |
virtual bool | anyChannelEnabled (DIO_DIRECTION dir)=0 |
Check if there is at least one channel enabled. More... | |
virtual void | setOutputMode (DIO_CHANNEL chn, DIO_MODE mode)=0 |
Set the output mode for the given digital channel. More... | |
virtual void | setOutputMode (unsigned int chn, DIO_MODE mode)=0 |
Set the output mode for the given digital channel. More... | |
virtual DIO_MODE | getOutputMode (DIO_CHANNEL chn)=0 |
Retrieve the output mode for the given digital channel. More... | |
virtual DIO_MODE | getOutputMode (unsigned int chn)=0 |
Retrieve the output mode for the given digital channel. More... | |
virtual double | setSampleRateIn (double samplerate)=0 |
Set the sample rate for all digital input channels. More... | |
virtual double | setSampleRateOut (double samplerate)=0 |
Set the sample rate for all digital output channels. More... | |
virtual double | getSampleRateIn ()=0 |
Retrieve the sample rate of all digital input channels. More... | |
virtual double | getSampleRateOut ()=0 |
Retrieve the sample rate of all digital output channels. More... | |
virtual bool | getCyclic ()=0 |
Retrieve the value of the cyclic mode. More... | |
virtual void | setCyclic (bool cyclic)=0 |
Enable or disable the cyclic mode for all digital channels. More... | |
virtual libm2k::M2kHardwareTrigger * | getTrigger ()=0 |
Get the hardware trigger handler. More... | |
virtual void | setKernelBuffersCountIn (unsigned int count)=0 |
Set the kernel buffers for input to a specific value. More... | |
virtual void | setKernelBuffersCountOut (unsigned int count)=0 |
Set the kernel buffers for output to a specific value. More... | |
virtual struct IIO_OBJECTS | getIioObjects ()=0 |
Get access to IIO channels, buffers, devices and context. Can be used when debugging directly with libiio. More... | |
virtual unsigned int | getNbChannelsIn ()=0 |
Retrieve the number of digital input channels. More... | |
virtual unsigned int | getNbChannelsOut ()=0 |
Retrieve the number of digital output channels. More... | |
virtual void | getSamples (std::vector< unsigned short > &data, unsigned int nb_samples)=0 |
Retrieve a specific number of samples. More... | |
virtual void | setRateMux ()=0 |
Force the digital interface to use the analogical rate. More... | |
virtual void | resetRateMux ()=0 |
Reset the digital rate to default. More... | |
virtual void | setExternalClocksource (bool external)=0 |
Set the clocksource. More... | |
virtual bool | isClocksourceExternal ()=0 |
Get the current clocksource. More... | |
Controls the digital input and output segment.
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
Digital enumerations. +More...
+#include <iio.h>
Go to the source code of this file.
++Enumerations | |
enum | libm2k::digital::DIO_DIRECTION { + DIO_INPUT = 0, + + DIO_OUTPUT = 1 + + } |
Direction of a digital channel. More... | |
enum | libm2k::digital::DIO_LEVEL { + LOW = 0, + + HIGH = 1 + + } |
Logic voltage levels. More... | |
enum | libm2k::digital::DIO_CHANNEL { + DIO_CHANNEL_0 = 0, + + DIO_CHANNEL_1 = 1, + + DIO_CHANNEL_2 = 2, + + DIO_CHANNEL_3 = 3, + + DIO_CHANNEL_4 = 4, + + DIO_CHANNEL_5 = 5, + + DIO_CHANNEL_6 = 6, + + DIO_CHANNEL_7 = 7, + + DIO_CHANNEL_8 = 8, + + DIO_CHANNEL_9 = 9, + + DIO_CHANNEL_10 = 10, + + DIO_CHANNEL_11 = 11, + + DIO_CHANNEL_12 = 12, + + DIO_CHANNEL_13 = 13, + + DIO_CHANNEL_14 = 14, + + DIO_CHANNEL_15 = 15 + + } |
Indexes of the channels. More... | |
enum | libm2k::digital::DIO_MODE { + DIO_OPENDRAIN = 0, + + DIO_PUSHPULL = 1 + + } |
Output mode for a digital channel. | |
enum | libm2k::digital::DIO_TRIGGER_MODE { + DIO_OR = 0, + + DIO_AND = 1 + + } |
Triggering mode for digital channels. | |
Digital enumerations.
+enum libm2k::digital::DIO_CHANNEL | +
Indexes of the channels.
+enum libm2k::digital::DIO_DIRECTION | +
Direction of a digital channel.
+enum libm2k::digital::DIO_LEVEL | +
Logic voltage levels.
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
File in include/libm2k | Includes file in include/libm2k/digital |
---|---|
m2khardwaretrigger.hpp | digital/enums.hpp |
+ libm2k
+
+ |
+
File in include/libm2k | Includes file in include/libm2k/digital |
---|---|
m2khardwaretrigger.hpp | enums.hpp |
+ libm2k
+
+ |
+
File in include/libm2k/digital | Includes file in include/libm2k/analog |
---|---|
m2kdigital.hpp | analog/enums.hpp |
+ libm2k
+
+ |
+
File in include/libm2k/digital | Includes file in include/libm2k/analog |
---|---|
m2kdigital.hpp | enums.hpp |
+ libm2k
+
+ |
+
+Files | |
file | digital/enums.hpp [code] |
Digital enumerations. | |
+ libm2k
+
+ |
+
+Files | |
file | analog/enums.hpp [code] |
Analogical enumerations. | |
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+Directories |
+Files | |
file | enums.hpp [code] |
Generic M2K enumerations. | |
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
Generic M2K enumerations. +More...
+#include <string>
#include <vector>
Go to the source code of this file.
++Classes | |
struct | libm2k::CALIBRATION_PARAMETERS |
Calibration parameters of m2k. More... | |
struct | libm2k::SETTINGS |
Triggering system. More... | |
struct | libm2k::CONTEXT_INFO |
Additional information about the context. More... | |
struct | libm2k::IIO_CONTEXT_VERSION |
The version of the backend. More... | |
+Enumerations | |
enum | libm2k::M2K_EXCEPTION_TYPE { + EXC_OUT_OF_RANGE = 0, + + EXC_RUNTIME_ERROR = 1, + + EXC_INVALID_PARAMETER = 2, + + EXC_TIMEOUT = 3, + + EXC_INVALID_FIRMWARE_VERSION = 4 + + } |
M2k exception types. | |
enum | libm2k::M2K_TRIGGER_CONDITION_ANALOG { + RISING_EDGE_ANALOG = 0, + + FALLING_EDGE_ANALOG = 1, + + LOW_LEVEL_ANALOG = 2, + + HIGH_LEVEL_ANALOG = 3 + + } |
Condition of triggering. More... | |
enum | libm2k::M2K_TRIGGER_CONDITION_DIGITAL { + RISING_EDGE_DIGITAL = 0, + + FALLING_EDGE_DIGITAL = 1, + + LOW_LEVEL_DIGITAL = 2, + + HIGH_LEVEL_DIGITAL = 3, + + ANY_EDGE_DIGITAL = 4, + + NO_TRIGGER_DIGITAL = 5 + + } |
Condition of triggering. More... | |
enum | libm2k::M2K_TRIGGER_MODE { + libm2k::ALWAYS = 0, + + libm2k::ANALOG = 1, + + libm2k::EXTERNAL = 2, + + DIGITAL_OR_ANALOG = 3, + + DIGITAL_AND_ANALOG = 4, + + DIGITAL_XOR_ANALOG = 5, + + N_DIGITAL_OR_ANALOG = 6, + + N_DIGITAL_AND_ANALOG = 7, + + N_DIGITAL_XOR_ANALOG = 8 + + } |
Select the mode for the analog trigger. More... | |
enum | libm2k::M2K_TRIGGER_SOURCE_ANALOG { + libm2k::CHANNEL_1 = 0, + + libm2k::CHANNEL_2 = 1, + + CHANNEL_1_OR_CHANNEL_2 = 2, + + CHANNEL_1_AND_CHANNEL_2 = 3, + + CHANNEL_1_XOR_CHANNEL_2 = 4, + + libm2k::SRC_DIGITAL_IN = 5, + + CHANNEL_1_OR_SRC_LOGIC_ANALYZER = 6, + + CHANNEL_2_OR_SRC_LOGIC_ANALYZER = 7, + + CHANNEL_1_OR_CHANNEL_2_OR_SRC_LOGIC_ANALYZER = 8, + + libm2k::NO_SOURCE = 9 + + } |
Select the source for the analog trigger. More... | |
enum | libm2k::M2K_TRIGGER_SOURCE_OUT { + TRIGGER_NONE = 0, + + TRIGGER_TI = 1, + + TRIGGER_ADC = 2, + + TRIGGER_LA = 3 + + } |
Selects the source trigger for the output interfaces. | |
enum | libm2k::M2K_TRIGGER_CONDITION_OUT { + NONE_OUT = 0, + + LOW_LEVEL_OUT = 1, + + HIGH_LEVEL_OUT = 2, + + ANY_EDGE_OUT = 3, + + RISING_EDGE_OUT = 4, + + FALLING_EDGE_OUT = 5 + + } |
Trigger condition when the source for M2K_TRIGGER_SOURCE_OUT is TRIGGER_TI. | |
enum | libm2k::M2K_TRIGGER_STATUS_ANALOG_OUT { + DISABLED = 0, + + START = 1, + + STOP = 2 + + } |
The status value determines the action that the output interface will take when the trigger condition is met. | |
enum | libm2k::M2K_TRIGGER_SOURCE_DIGITAL { + libm2k::SRC_TRIGGER_IN = 0, + + libm2k::SRC_ANALOG_IN = 1, + + libm2k::SRC_NONE = 2, + + libm2k::SRC_DISABLED = 3 + + } |
Select the source for the digital trigger. More... | |
enum | libm2k::M2K_TRIGGER_OUT_SELECT { + libm2k::SELECT_NONE = 0, + + SELECT_TRIGGER_I_SAME_CHAN = 1, + + libm2k::SELECT_TRIGGER_IN = 2, + + libm2k::SELECT_ANALOG_IN = 3, + + libm2k::SELECT_DIGITAL_IN = 4 + + } |
Select which trigger event will be forwarded on TO pin (trigger out) More... | |
Generic M2K enumerations.
+enum libm2k::M2K_TRIGGER_CONDITION_ANALOG | +
Condition of triggering.
+for the analog side
+ +enum libm2k::M2K_TRIGGER_CONDITION_DIGITAL | +
Condition of triggering.
+for the digital side
+ +enum libm2k::M2K_TRIGGER_MODE | +
enum libm2k::M2K_TRIGGER_OUT_SELECT | +
Select which trigger event will be forwarded on TO pin (trigger out)
+enum libm2k::M2K_TRIGGER_SOURCE_ANALOG | +
Select the source for the analog trigger.
+enum libm2k::M2K_TRIGGER_SOURCE_DIGITAL | +
Select the source for the digital trigger.
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
context.hpp | |
contextbuilder.hpp | |
dmm.hpp | |
digital/enums.hpp | Digital enumerations |
analog/enums.hpp | Analogical enumerations |
enums.hpp | Generic M2K enumerations |
m2k.hpp | |
m2kanalogin.hpp | |
m2kanalogout.hpp | |
m2kdigital.hpp | |
m2khardwaretrigger.hpp | |
m2kpowersupply.hpp |
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
+ libm2k
+
+ |
+
This page explains how to interpret the graphs that are generated by doxygen.
+Consider the following example:
This will result in the following graph:
+The boxes in the above graph have the following meaning:
+The arrows have the following meaning:
+
+ libm2k
+
+ |
+
Contains all analogical components. +More...
++ + |
+Modules | |
AnalogIn | |
Contains the representation of the analogical input segment. | |
AnalogOut | |
Contains the representation of the analogical output segment. | |
PowerSupply | |
Contains the representation of the power supply. | |
DMM | |
Contains the representation of the digital multimeter. | |
Contains all analogical components.
+
+ libm2k
+
+ |
+
Contains the representation of the analogical input segment. +More...
++ + |
+Classes | |
class | libm2k::analog::M2kAnalogIn |
Controls the analogical input compound. More... | |
+Functions | |
virtual void | libm2k::analog::M2kAnalogIn::startAcquisition (unsigned int nb_samples)=0 |
Create the buffer for both channels and start the acquisition. More... | |
+virtual void | libm2k::analog::M2kAnalogIn::stopAcquisition ()=0 |
Destroy the buffer and stop the acquisition. | |
virtual std::vector< std::vector< double > > | libm2k::analog::M2kAnalogIn::getSamples (unsigned int nb_samples)=0 |
Retrieve a specific number of samples from each channel. More... | |
virtual std::vector< std::vector< double > > | libm2k::analog::M2kAnalogIn::getSamplesRaw (unsigned int nb_samples)=0 |
Retrieve a specific number of raw samples from each channel. More... | |
virtual const double * | libm2k::analog::M2kAnalogIn::getSamplesInterleaved (unsigned int nb_samples_per_channel)=0 |
Retrieve a specific number of samples from each channel. More... | |
virtual const short * | libm2k::analog::M2kAnalogIn::getSamplesRawInterleaved (unsigned int nb_samples_per_channel)=0 |
Retrieve a specific number of raw samples from each channel. More... | |
virtual const double * | libm2k::analog::M2kAnalogIn::getSamplesInterleaved_matlab (unsigned int nb_samples)=0 |
Retrieve a specific number of samples from both channels. More... | |
virtual const short * | libm2k::analog::M2kAnalogIn::getSamplesRawInterleaved_matlab (unsigned int nb_samples)=0 |
Retrieve a specific number of raw samples from both channels. More... | |
virtual short | libm2k::analog::M2kAnalogIn::getVoltageRaw (unsigned int ch)=0 |
Retrieve the average raw value of the given channel. More... | |
virtual double | libm2k::analog::M2kAnalogIn::getVoltage (unsigned int ch)=0 |
Retrieve the average voltage of the given channel. More... | |
virtual short | libm2k::analog::M2kAnalogIn::getVoltageRaw (libm2k::analog::ANALOG_IN_CHANNEL ch)=0 |
Retrieve the average raw value of the given channel. More... | |
virtual double | libm2k::analog::M2kAnalogIn::getVoltage (libm2k::analog::ANALOG_IN_CHANNEL ch)=0 |
Retrieve the average voltage of the given channel. More... | |
virtual std::vector< short > | libm2k::analog::M2kAnalogIn::getVoltageRaw ()=0 |
Retrieve the average raw value for each channel. More... | |
virtual std::vector< double > | libm2k::analog::M2kAnalogIn::getVoltage ()=0 |
Retrieve the average voltage for each channel. More... | |
virtual const short * | libm2k::analog::M2kAnalogIn::getVoltageRawP ()=0 |
Retrieve the average raw value for both channels. More... | |
virtual const double * | libm2k::analog::M2kAnalogIn::getVoltageP ()=0 |
Retrieve the average voltage for both channels. More... | |
virtual void | libm2k::analog::M2kAnalogIn::setVerticalOffset (ANALOG_IN_CHANNEL channel, double vertOffset)=0 |
Set the vertical offset, in Volts, of a specific channel. More... | |
virtual double | libm2k::analog::M2kAnalogIn::getVerticalOffset (ANALOG_IN_CHANNEL channel)=0 |
getVerticalOffset More... | |
virtual double | libm2k::analog::M2kAnalogIn::getScalingFactor (libm2k::analog::ANALOG_IN_CHANNEL ch)=0 |
Retrieve the scaling factor. More... | |
virtual void | libm2k::analog::M2kAnalogIn::setRange (ANALOG_IN_CHANNEL channel, M2K_RANGE range)=0 |
Set the range for the given channel. More... | |
virtual void | libm2k::analog::M2kAnalogIn::setRange (ANALOG_IN_CHANNEL channel, double min, double max)=0 |
Set the range for the given channel. More... | |
virtual libm2k::analog::M2K_RANGE | libm2k::analog::M2kAnalogIn::getRange (libm2k::analog::ANALOG_IN_CHANNEL channel)=0 |
Retrieve the range for the given channel. More... | |
virtual std::pair< double, double > | libm2k::analog::M2kAnalogIn::getRangeLimits (libm2k::analog::M2K_RANGE range)=0 |
Retrieve the bounds for the given range. More... | |
virtual std::vector< std::pair< std::string, std::pair< double, double > > > | libm2k::analog::M2kAnalogIn::getAvailableRanges ()=0 |
Retrieve all ranges that are available. More... | |
virtual int | libm2k::analog::M2kAnalogIn::getOversamplingRatio ()=0 |
Retrieve the global oversampling ratio. More... | |
virtual int | libm2k::analog::M2kAnalogIn::getOversamplingRatio (unsigned int chn_idx)=0 |
Retrieve the oversampling ratio for the given channel. More... | |
virtual int | libm2k::analog::M2kAnalogIn::setOversamplingRatio (int oversampling)=0 |
Set the global oversampling ratio. More... | |
virtual int | libm2k::analog::M2kAnalogIn::setOversamplingRatio (unsigned int chn_idx, int oversampling)=0 |
Set the oversampling ratio for the given channel. More... | |
virtual double | libm2k::analog::M2kAnalogIn::getSampleRate ()=0 |
Retrieve the global sample rate. More... | |
virtual std::vector< double > | libm2k::analog::M2kAnalogIn::getAvailableSampleRates ()=0 |
getAvailableSampleRates More... | |
virtual double | libm2k::analog::M2kAnalogIn::setSampleRate (double samplerate)=0 |
Set the global sample rate. More... | |
virtual std::pair< double, double > | libm2k::analog::M2kAnalogIn::getHysteresisRange (ANALOG_IN_CHANNEL chn)=0 |
Retrieve the bounds of the analogical trigger's hysteresis for the given channel. More... | |
virtual double | libm2k::analog::M2kAnalogIn::getFilterCompensation (double samplerate)=0 |
Retrieve the filter compensation for the given sample rate. More... | |
virtual double | libm2k::analog::M2kAnalogIn::getValueForRange (M2K_RANGE range)=0 |
Retrieve the numeric value corresponding to the given range. More... | |
virtual double | libm2k::analog::M2kAnalogIn::convertRawToVolts (unsigned int channel, short raw)=0 |
Convert the raw value of a sample into volts. More... | |
virtual short | libm2k::analog::M2kAnalogIn::convertVoltsToRaw (unsigned int channel, double voltage)=0 |
Convert the voltage value of a sample into raw. More... | |
virtual unsigned int | libm2k::analog::M2kAnalogIn::getNbChannels ()=0 |
Retrieve the number of analogical channels. More... | |
virtual std::string | libm2k::analog::M2kAnalogIn::getName ()=0 |
Retrieve the name of the device. More... | |
virtual void | libm2k::analog::M2kAnalogIn::enableChannel (unsigned int chnIdx, bool enable)=0 |
Enable or disable the given channel. More... | |
virtual bool | libm2k::analog::M2kAnalogIn::isChannelEnabled (unsigned int chnIdx)=0 |
Retrieve the state of the given channel. More... | |
virtual void | libm2k::analog::M2kAnalogIn::cancelAcquisition ()=0 |
Cancel all buffer operations. More... | |
virtual void | libm2k::analog::M2kAnalogIn::setKernelBuffersCount (unsigned int count)=0 |
Set the kernel buffers to a specific value. More... | |
virtual unsigned int | libm2k::analog::M2kAnalogIn::getKernelBuffersCount () const =0 |
Get the number of kernel buffers. More... | |
virtual libm2k::M2kHardwareTrigger * | libm2k::analog::M2kAnalogIn::getTrigger ()=0 |
Get the hardware trigger handler. More... | |
virtual struct IIO_OBJECTS | libm2k::analog::M2kAnalogIn::getIioObjects ()=0 |
Get access to IIO channels, buffers, devices and context. Can be used when debugging directly with libiio. More... | |
virtual void | libm2k::analog::M2kAnalogIn::getSamples (std::vector< std::vector< double >> &data, unsigned int nb_samples)=0 |
Retrieve a specific number of samples from each channel. More... | |
virtual std::string | libm2k::analog::M2kAnalogIn::getChannelName (unsigned int channel)=0 |
Get the channel name for each ADC channel. More... | |
virtual double | libm2k::analog::M2kAnalogIn::getMaximumSamplerate ()=0 |
Get the maximum samplerate for the ADC. More... | |
Contains the representation of the analogical input segment.
+
+
|
+ +pure virtual | +
Cancel all buffer operations.
+
+
|
+ +pure virtual | +
Convert the raw value of a sample into volts.
+raw | the raw value of a sample; |
channel | The index corresponding to the channel; |
+
|
+ +pure virtual | +
Convert the voltage value of a sample into raw.
+voltage | The voltage value of a sample; |
channel | The index corresponding to the channel; |
+
|
+ +pure virtual | +
Enable or disable the given channel.
+chnIdx | The index corresponding to the channel |
enable | A boolean value corresponding to the channel's state |
+
|
+ +pure virtual | +
Retrieve all ranges that are available.
+
+
|
+ +pure virtual | +
getAvailableSampleRates
+
+
|
+ +pure virtual | +
Get the channel name for each ADC channel.
+channel | - unsigned int representing the index of the channel |
+
|
+ +pure virtual | +
Retrieve the filter compensation for the given sample rate.
+samplerate | A double value representing the sample rate |
+
|
+ +pure virtual | +
Retrieve the bounds of the analogical trigger's hysteresis for the given channel.
+chn | An enumerator corresponding to the channel's index |
+
|
+ +pure virtual | +
Get access to IIO channels, buffers, devices and context. Can be used when debugging directly with libiio.
+
+
|
+ +pure virtual | +
Get the number of kernel buffers.
+
+
|
+ +pure virtual | +
Get the maximum samplerate for the ADC.
+
+
|
+ +pure virtual | +
Retrieve the name of the device.
+
+
|
+ +pure virtual | +
Retrieve the number of analogical channels.
+
+
|
+ +pure virtual | +
Retrieve the global oversampling ratio.
+
+
|
+ +pure virtual | +
Retrieve the oversampling ratio for the given channel.
+chn_idx | The index corresponding to the channel |
+
|
+ +pure virtual | +
Retrieve the range for the given channel.
+channel | An enumerator corresponding to the channel's index |
+
|
+ +pure virtual | +
Retrieve the bounds for the given range.
+range | An enumerator corresponding to the range |
+
|
+ +pure virtual | +
Retrieve the global sample rate.
+
+
|
+ +pure virtual | +
Retrieve a specific number of samples from each channel.
+nb_samples | The number of samples that will be retrieved |
+
|
+ +pure virtual | +
Retrieve a specific number of samples from each channel.
+data | - a reference to a vector owned/created by the client |
nb_samples | The number of samples that will be retrieved |
+
|
+ +pure virtual | +
Retrieve a specific number of samples from each channel.
+nb_samples_per_channel | The number of samples that will be retrieved |
+
|
+ +pure virtual | +
Retrieve a specific number of samples from both channels.
+nb_samples | The number of samples that will be retrieved |
+
|
+ +pure virtual | +
Retrieve a specific number of raw samples from each channel.
+nb_samples | The number of samples that will be retrieved |
+
|
+ +pure virtual | +
Retrieve a specific number of raw samples from each channel.
+nb_samples_per_channel | The number of samples that will be retrieved |
+
|
+ +pure virtual | +
Retrieve a specific number of raw samples from both channels.
+nb_samples | The number of samples that will be retrieved |
+
|
+ +pure virtual | +
Retrieve the scaling factor.
+ch | An enumerator corresponding to the channel's index |
+
|
+ +pure virtual | +
Get the hardware trigger handler.
+
+
|
+ +pure virtual | +
Retrieve the numeric value corresponding to the given range.
+range |
+
|
+ +pure virtual | +
getVerticalOffset
+channel | the index of the channel |
+
|
+ +pure virtual | +
Retrieve the average voltage of the given channel.
+ch | The index corresponding to the channel |
+
|
+ +pure virtual | +
Retrieve the average voltage of the given channel.
+ch | An enumerator corresponding to the channel's index |
+
|
+ +pure virtual | +
Retrieve the average voltage for each channel.
+
+
|
+ +pure virtual | +
Retrieve the average voltage for both channels.
+
+
|
+ +pure virtual | +
Retrieve the average raw value of the given channel.
+ch | The index corresponding to the channel |
+
|
+ +pure virtual | +
Retrieve the average raw value of the given channel.
+ch | An enumerator corresponding to the channel's index |
+
|
+ +pure virtual | +
Retrieve the average raw value for each channel.
+
+
|
+ +pure virtual | +
Retrieve the average raw value for both channels.
+
+
|
+ +pure virtual | +
Retrieve the state of the given channel.
+chnIdx | The index corresponding to the channel |
+
|
+ +pure virtual | +
Set the kernel buffers to a specific value.
+count | the number of kernel buffers |
+
|
+ +pure virtual | +
Set the global oversampling ratio.
+oversampling | Integer value to set the oversampling ratio to |
+
|
+ +pure virtual | +
Set the oversampling ratio for the given channel.
+chn_idx | The index corresponding to the channel |
oversampling | Integer value to set the oversampling ratio to |
+
|
+ +pure virtual | +
Set the range for the given channel.
+channel | An enumerator corresponding to the channel's index |
range | An enumerator corresponding to a range |
+
|
+ +pure virtual | +
Set the range for the given channel.
+channel | An enumerator corresponding to the channel's index |
min | Upper bound |
max | Lower bound |
+
|
+ +pure virtual | +
Set the global sample rate.
+samplerate | A double value to set the sample rate to |
+
|
+ +pure virtual | +
Set the vertical offset, in Volts, of a specific channel.
+channel | the index of the channel |
vertOffset | the value of the offset in Volts |
+
|
+ +pure virtual | +
Create the buffer for both channels and start the acquisition.
+nb_samples | size of the buffer in samples for each channel |
+ libm2k
+
+ |
+
Contains the representation of the analogical output segment. +More...
++ + |
+Classes | |
class | libm2k::analog::M2kAnalogOut |
Controls the analogical output compound. More... | |
+Functions | |
virtual std::vector< int > | libm2k::analog::M2kAnalogOut::getOversamplingRatio ()=0 |
Retrieve the global oversampling ratio. More... | |
virtual int | libm2k::analog::M2kAnalogOut::getOversamplingRatio (unsigned int chn)=0 |
Retrieve the oversampling ratio for the given channel. More... | |
virtual std::vector< int > | libm2k::analog::M2kAnalogOut::setOversamplingRatio (std::vector< int > oversampling_ratio)=0 |
Set the value of the oversampling ratio for each channel. More... | |
virtual int | libm2k::analog::M2kAnalogOut::setOversamplingRatio (unsigned int chn, int oversampling_ratio)=0 |
Set the oversampling ratio for the given channel. More... | |
virtual std::vector< double > | libm2k::analog::M2kAnalogOut::getSampleRate ()=0 |
Retrieve the sample rate of both DACs. More... | |
virtual double | libm2k::analog::M2kAnalogOut::getSampleRate (unsigned int chn)=0 |
Retrieve the sample rate for the given channel. More... | |
virtual std::vector< double > | libm2k::analog::M2kAnalogOut::getAvailableSampleRates (unsigned int chn)=0 |
getAvailableSampleRates More... | |
virtual std::vector< double > | libm2k::analog::M2kAnalogOut::setSampleRate (std::vector< double > samplerates)=0 |
Set the sample rate for both channels. More... | |
virtual double | libm2k::analog::M2kAnalogOut::setSampleRate (unsigned int chn, double samplerate)=0 |
Set the sample rate for the given channel. More... | |
virtual void | libm2k::analog::M2kAnalogOut::setCyclic (bool en)=0 |
Enable or disable the cyclic mode for all digital channels. More... | |
virtual void | libm2k::analog::M2kAnalogOut::setCyclic (unsigned int chn, bool en)=0 |
Enable or disable the cyclic mode for all digital channels. More... | |
virtual bool | libm2k::analog::M2kAnalogOut::getCyclic (unsigned int chn)=0 |
Retrieve the value of the cyclic mode. More... | |
virtual double | libm2k::analog::M2kAnalogOut::getScalingFactor (unsigned int chn)=0 |
Retrieve the scaling factor for the given channel. More... | |
virtual double | libm2k::analog::M2kAnalogOut::getFilterCompensation (double samplerate)=0 |
Retrieve the filter compensation for the given sample rate. More... | |
virtual void | libm2k::analog::M2kAnalogOut::pushBytes (unsigned int chnIdx, double *data, unsigned int nb_samples)=0 |
Send the samples to the given channel. More... | |
virtual void | libm2k::analog::M2kAnalogOut::pushRawBytes (unsigned int chnIdx, short *data, unsigned int nb_samples)=0 |
Send the samples to the given channel. More... | |
virtual void | libm2k::analog::M2kAnalogOut::pushInterleaved (double *data, unsigned int nb_channels, unsigned int nb_samples)=0 |
Send samples to all the channels. More... | |
virtual void | libm2k::analog::M2kAnalogOut::pushRawInterleaved (short *data, unsigned int nb_channels, unsigned int nb_samples)=0 |
Send samples to all the channels. More... | |
virtual void | libm2k::analog::M2kAnalogOut::push (unsigned int chnIdx, std::vector< double > const &data)=0 |
Send the samples to the given channel. More... | |
virtual void | libm2k::analog::M2kAnalogOut::pushRaw (unsigned int chnIdx, std::vector< short > const &data)=0 |
Send the samples to the given channel. More... | |
virtual void | libm2k::analog::M2kAnalogOut::push (std::vector< std::vector< double >> const &data)=0 |
Send samples to channels. More... | |
virtual void | libm2k::analog::M2kAnalogOut::pushRaw (std::vector< std::vector< short >> const &data)=0 |
Send samples to channels. More... | |
virtual void | libm2k::analog::M2kAnalogOut::stop ()=0 |
Stop all channels from sending the signals. More... | |
virtual void | libm2k::analog::M2kAnalogOut::stop (unsigned int chn)=0 |
Stop the given channels from sending the signals. More... | |
virtual void | libm2k::analog::M2kAnalogOut::cancelBuffer ()=0 |
Cancel all buffer operations of enabled channels. More... | |
virtual void | libm2k::analog::M2kAnalogOut::cancelBuffer (unsigned int chn)=0 |
Cancel all buffer operations of the given channel. More... | |
virtual void | libm2k::analog::M2kAnalogOut::enableChannel (unsigned int chnIdx, bool enable)=0 |
Enable or disable the given digital channel. More... | |
virtual bool | libm2k::analog::M2kAnalogOut::isChannelEnabled (unsigned int chnIdx)=0 |
Check if the given channel is enabled. More... | |
virtual bool | libm2k::analog::M2kAnalogOut::isPushDone (unsigned int chnIdx) const =0 |
Check if the generation of the signal (only for non-cyclic buffer) is done. More... | |
virtual void | libm2k::analog::M2kAnalogOut::setKernelBuffersCount (unsigned int chnIdx, unsigned int count)=0 |
Set the kernel buffers to a specific value. More... | |
virtual unsigned int | libm2k::analog::M2kAnalogOut::getKernelBuffersCount (unsigned int chnIdx) const =0 |
Get the number of kernel buffers. More... | |
virtual short | libm2k::analog::M2kAnalogOut::convertVoltsToRaw (unsigned int channel, double voltage)=0 |
Convert the volts value of a sample into raw. More... | |
virtual double | libm2k::analog::M2kAnalogOut::convertRawToVolts (unsigned int channel, short raw)=0 |
Convert the raw value of a sample into volts. More... | |
virtual struct IIO_OBJECTS | libm2k::analog::M2kAnalogOut::getIioObjects ()=0 |
Get access to IIO channels, buffers, devices and context. More... | |
virtual unsigned int | libm2k::analog::M2kAnalogOut::getNbChannels ()=0 |
Retrieve the number of analogical channels. More... | |
virtual std::string | libm2k::analog::M2kAnalogOut::getChannelName (unsigned int channel)=0 |
Get the channel name for each DAC channel. More... | |
virtual double | libm2k::analog::M2kAnalogOut::getMaximumSamplerate (unsigned int chn_idx)=0 |
Get the maximum samplerate for the DAC. More... | |
virtual unsigned short | libm2k::analog::M2kAnalogOut::setVoltage (unsigned int chn_idx, double volts)=0 |
Sets the voltage output of the DAC channel. More... | |
virtual unsigned short | libm2k::analog::M2kAnalogOut::setVoltageRaw (unsigned int chn_idx, unsigned short raw)=0 |
Sets the raw output of the DAC channel. More... | |
virtual libm2k::M2kHardwareTrigger * | libm2k::analog::M2kAnalogOut::getTrigger ()=0 |
Get the hardware trigger handler. More... | |
virtual void | libm2k::analog::M2kAnalogOut::setBufferRearmOnTrigger (bool enable)=0 |
Allows sequential output of multiple buffers with each trigger event. More... | |
virtual bool | libm2k::analog::M2kAnalogOut::getBufferRearmOnTrigger () const =0 |
Retrieve the value of the attribute that controls buffer rearm on trigger. More... | |
Contains the representation of the analogical output segment.
+
+
|
+ +pure virtual | +
Cancel all buffer operations of enabled channels.
+
+
|
+ +pure virtual | +
Cancel all buffer operations of the given channel.
+chn | The index corresponding to the channel |
+
|
+ +pure virtual | +
Convert the raw value of a sample into volts.
+channel | The index corresponding to the channel |
raw | The raw value of a sample |
+
|
+ +pure virtual | +
Convert the volts value of a sample into raw.
+channel | The index corresponding to the channel |
voltage | The volts value of a sample |
+
|
+ +pure virtual | +
Enable or disable the given digital channel.
+chnIdx | The index corresponding to the channel |
enable | A boolean value corresponding to the channel's state |
EXC_OUT_OF_RANGE | No such channel |
+
|
+ +pure virtual | +
getAvailableSampleRates
+chn | The index corresponding to the required channel |
+
|
+ +pure virtual | +
Retrieve the value of the attribute that controls buffer rearm on trigger.
+
+
|
+ +pure virtual | +
Get the channel name for each DAC channel.
+channel | - unsigned int representing the index of the channel |
+
|
+ +pure virtual | +
Retrieve the value of the cyclic mode.
+chn | The index corresponding to the channel |
+
|
+ +pure virtual | +
Retrieve the filter compensation for the given sample rate.
+samplerate | A double value representing the sample rate |
+
|
+ +pure virtual | +
Get access to IIO channels, buffers, devices and context.
+
+
|
+ +pure virtual | +
Get the number of kernel buffers.
+chnIdx | The index corresponding to the channel |
+
|
+ +pure virtual | +
Get the maximum samplerate for the DAC.
+chn_idx | - unsigned int representing the index of the channel |
+
|
+ +pure virtual | +
Retrieve the number of analogical channels.
+
+
|
+ +pure virtual | +
Retrieve the global oversampling ratio.
+
+
|
+ +pure virtual | +
Retrieve the oversampling ratio for the given channel.
+chn | The index corresponding to the channel |
+
|
+ +pure virtual | +
Retrieve the sample rate of both DACs.
+
+
|
+ +pure virtual | +
Retrieve the sample rate for the given channel.
+chn | The index corresponding to the channel |
+
|
+ +pure virtual | +
Retrieve the scaling factor for the given channel.
+chn | The index corresponding to the channel |
EXC_OUT_OF_RANGE | No such channel |
+
|
+ +pure virtual | +
Get the hardware trigger handler.
+
+
|
+ +pure virtual | +
Check if the given channel is enabled.
+chnIdx | The index corresponding to the channel |
EXC_OUT_OF_RANGE | No such channel |
+
|
+ +pure virtual | +
Check if the generation of the signal (only for non-cyclic buffer) is done.
+chnIdx | The index corresponding to the channel |
+
|
+ +pure virtual | +
Send the samples to the given channel.
+chnIdx | The index corresponding to the channel |
data | A list of doubles containing all samples |
EXC_OUT_OF_RANGE | No such channel |
+
|
+ +pure virtual | +
Send samples to channels.
+data | A list containing lists of samples |
+
|
+ +pure virtual | +
Send the samples to the given channel.
+chnIdx | The index corresponding to the channel |
data | A pointer to the samples |
nb_samples | the number of samples |
EXC_OUT_OF_RANGE | No such channel |
+
|
+ +pure virtual | +
Send samples to all the channels.
+data | A pointer to the interleaved data |
nb_channels | the number of channels on which we want to push |
nb_samples | the number of samples total (samples_per_channel * channels) |
+
|
+ +pure virtual | +
Send the samples to the given channel.
+chnIdx | The index corresponding to the channel |
data | A list of shorts containing all samples |
EXC_OUT_OF_RANGE | No such channel |
+
|
+ +pure virtual | +
Send samples to channels.
+data | A list containing lists of samples |
+
|
+ +pure virtual | +
Send the samples to the given channel.
+chnIdx | The index corresponding to the channel |
data | A pointer to the raw samples |
nb_samples | the number of samples |
EXC_OUT_OF_RANGE | No such channel |
+
|
+ +pure virtual | +
Send samples to all the channels.
+data | A pointer to the interleaved raw data |
nb_channels | the number of channels on which we want to push |
nb_samples | the number of samples total (samples_per_channel * channels) |
+
|
+ +pure virtual | +
Allows sequential output of multiple buffers with each trigger event.
+enable | A boolean value that enables or disables the buffer rearm functionality. |
+
|
+ +pure virtual | +
Enable or disable the cyclic mode for all digital channels.
+en | If true, enable cyclic mode |
EXC_OUT_OF_RANGE | No such channel |
+
|
+ +pure virtual | +
Enable or disable the cyclic mode for all digital channels.
+chn | The index corresponding to the channel |
en | If true, enable cyclic mode |
EXC_OUT_OF_RANGE | No such channel |
+
|
+ +pure virtual | +
Set the kernel buffers to a specific value.
+chnIdx | The index corresponding to the channel |
count | the number of kernel buffers |
+
|
+ +pure virtual | +
Set the value of the oversampling ratio for each channel.
+oversampling_ratio | A list containing the ratios for each channel (as integers) |
+
|
+ +pure virtual | +
Set the oversampling ratio for the given channel.
+chn | The index corresponding to the channel |
oversampling_ratio | Integer value to set the oversampling ratio to |
+
|
+ +pure virtual | +
Set the sample rate for both channels.
+samplerates | A list containing the sample rates of each channel |
+
|
+ +pure virtual | +
Set the sample rate for the given channel.
+chn | The index corresponding to the channel |
samplerate | A double value to set the sample rate to |
+
|
+ +pure virtual | +
Sets the voltage output of the DAC channel.
+chn_idx | - unsigned int representing the index of the channel |
volts | - actual value to be set |
+
|
+ +pure virtual | +
Sets the raw output of the DAC channel.
+chn_idx | - unsigned int representing the index of the channel |
raw | - actual value to be set |
+
|
+ +pure virtual | +
Stop all channels from sending the signals.
+
+
|
+ +pure virtual | +
Stop the given channels from sending the signals.
+chn | The index corresponding to the channel |
EXC_OUT_OF_RANGE | No such channel |
+ libm2k
+
+ |
+
Contains the representation of a generic IIO context. +More...
++ + |
+Modules | |
ContextBuilder | |
Creates/destroys the context. | |
+Classes | |
class | libm2k::context::Context |
Controls the IIO context. More... | |
+Functions | |
virtual std::string | libm2k::context::Context::getUri ()=0 |
Get the URI of the current context. More... | |
virtual libm2k::analog::DMM * | libm2k::context::Context::getDMM (unsigned int index)=0 |
Retrieve the DMM object at a certain index. More... | |
virtual libm2k::analog::DMM * | libm2k::context::Context::getDMM (std::string name)=0 |
Retrieve the DMM object which has the provided name. More... | |
virtual std::vector< libm2k::analog::DMM * > | libm2k::context::Context::getAllDmm ()=0 |
Retrieve all the DMM objects. More... | |
virtual std::vector< std::string > | libm2k::context::Context::getAvailableContextAttributes ()=0 |
Retrieve all the available context attributes. More... | |
virtual std::string | libm2k::context::Context::getContextAttributeValue (std::string attr)=0 |
Retrieve the value of one context attribute. More... | |
virtual std::string | libm2k::context::Context::getContextDescription ()=0 |
Retrieve a detailed context description. More... | |
virtual std::string | libm2k::context::Context::getSerialNumber ()=0 |
Retrieve the current context serial number. More... | |
virtual std::unordered_set< std::string > | libm2k::context::Context::getAllDevices () const =0 |
Retrieve all the available devices. More... | |
virtual void | libm2k::context::Context::logAllAttributes () const =0 |
Log all the attributes. More... | |
virtual M2k * | libm2k::context::Context::toM2k ()=0 |
Convert the current context to M2k context, if possible. More... | |
virtual Generic * | libm2k::context::Context::toGeneric ()=0 |
Convert the current context to Generic context, if possible. More... | |
virtual unsigned int | libm2k::context::Context::getDmmCount ()=0 |
Retrieve the number of DMM objects. More... | |
virtual std::string | libm2k::context::Context::getFirmwareVersion ()=0 |
Retrieve the firmware version of the current context. More... | |
virtual const struct libm2k::IIO_CONTEXT_VERSION | libm2k::context::Context::getIioContextVersion ()=0 |
virtual struct iio_context * | libm2k::context::Context::getIioContext ()=0 |
virtual void | libm2k::context::Context::setTimeout (unsigned int timeout)=0 |
Set a timeout for I/O operations. More... | |
Contains the representation of a generic IIO context.
+
+
|
+ +pure virtual | +
Retrieve all the available devices.
+
+
|
+ +pure virtual | +
Retrieve all the DMM objects.
+
+
|
+ +pure virtual | +
Retrieve all the available context attributes.
+
+
|
+ +pure virtual | +
Retrieve the value of one context attribute.
+attr | The name of the required attribute |
On | error, throw an exception if the attribute is not found |
+
|
+ +pure virtual | +
Retrieve a detailed context description.
+
+
|
+ +pure virtual | +
Retrieve the DMM object at a certain index.
+index | The index corresponding to the DMM |
+
|
+ +pure virtual | +
Retrieve the DMM object which has the provided name.
+name | The name corresponding to the DMM |
+
|
+ +pure virtual | +
Retrieve the number of DMM objects.
+
+
|
+ +pure virtual | +
Retrieve the firmware version of the current context.
+
+
|
+ +pure virtual | +
Retrieve the iio context
+
|
+ +pure virtual | +
Get the version of the backend in use
+
|
+ +pure virtual | +
Retrieve the current context serial number.
+
+
|
+ +pure virtual | +
Get the URI of the current context.
+
+
|
+ +pure virtual | +
Log all the attributes.
+
+
|
+ +pure virtual | +
Set a timeout for I/O operations.
+timeout | A positive integer representing the time in milliseconds after which a timeout occurs. A value of 0 is used to specify that no timeout should occur. |
+
|
+ +pure virtual | +
Convert the current context to Generic context, if possible.
+
+ libm2k
+
+ |
+
Creates/destroys the context. +More...
++ + |
+Functions | |
LIBM2K_API M2k * | libm2k::context::m2kOpen (const char *uri) |
Open an ADALM2000 based on a given uri. More... | |
LIBM2K_API M2k * | libm2k::context::m2kOpen (struct iio_context *ctx, const char *uri) |
Open an ADALM2000 based on an existing iio_context and uri. More... | |
LIBM2K_API M2k * | libm2k::context::m2kOpen () |
Open an ADALM2000. More... | |
LIBM2K_API std::vector< struct libm2k::CONTEXT_INFO * > | libm2k::context::getContextsInfo () |
List the information about all available contexts. More... | |
LIBM2K_API std::vector< std::string > | libm2k::context::getAllContexts () |
List all available contexts. More... | |
LIBM2K_API void | libm2k::context::contextClose (Context *ctx, bool deinit=true) |
Destroy the given context. More... | |
+LIBM2K_API void | libm2k::context::contextCloseAll () |
Close all the devices. | |
LIBM2K_API std::string | libm2k::context::getVersion () |
Get library version. More... | |
LIBM2K_API void | libm2k::context::enableLogging (bool enable) |
Enable/disable the logging system. More... | |
Creates/destroys the context.
+LIBM2K_API void libm2k::context::contextClose | +( | +Context * | +ctx, | +
+ | + | bool | +deinit = true |
+
+ | ) | ++ |
Destroy the given context.
+ctx | The context to be destroyed |
deinit | If deinit is set to false, running contexts won't be affected |
LIBM2K_API void libm2k::context::enableLogging | +( | +bool | +enable | ) | ++ |
Enable/disable the logging system.
+enable | If true enable, otherwise disable |
LIBM2K_API std::vector<std::string> libm2k::context::getAllContexts | +( | +) | ++ |
List all available contexts.
+LIBM2K_API std::vector<struct libm2k::CONTEXT_INFO*> libm2k::context::getContextsInfo | +( | +) | ++ |
List the information about all available contexts.
+LIBM2K_API std::string libm2k::context::getVersion | +( | +) | ++ |
Get library version.
+LIBM2K_API M2k* libm2k::context::m2kOpen | +( | +const char * | +uri | ) | ++ |
Open an ADALM2000 based on a given uri.
+uri | Describe the location of the context |
LIBM2K_API M2k* libm2k::context::m2kOpen | +( | +struct iio_context * | +ctx, | +
+ | + | const char * | +uri | +
+ | ) | ++ |
Open an ADALM2000 based on an existing iio_context and uri.
+ctx | A pointer to an iio_context structure |
uri | Describe the location of the context |
+ libm2k
+
+ |
+
Contains the representation of the digital segment. +More...
++Classes | |
class | libm2k::digital::M2kDigital |
Controls the digital input and output segment. More... | |
+Functions | |
virtual void | libm2k::digital::M2kDigital::setDirection (unsigned short mask)=0 |
Set the direction for all digital channels. More... | |
virtual void | libm2k::digital::M2kDigital::setDirection (unsigned int index, DIO_DIRECTION dir)=0 |
Set the direction of the given digital channel. More... | |
virtual void | libm2k::digital::M2kDigital::setDirection (unsigned int index, bool dir)=0 |
Set the direction of the given digital channel. More... | |
virtual void | libm2k::digital::M2kDigital::setDirection (DIO_CHANNEL index, bool dir)=0 |
Set the direction of the given digital channel. More... | |
virtual void | libm2k::digital::M2kDigital::setDirection (DIO_CHANNEL index, DIO_DIRECTION dir)=0 |
Set the direction of the given digital channel. More... | |
virtual DIO_DIRECTION | libm2k::digital::M2kDigital::getDirection (DIO_CHANNEL index)=0 |
Retrieve the direction of the given digital channel. More... | |
virtual void | libm2k::digital::M2kDigital::setValueRaw (DIO_CHANNEL index, DIO_LEVEL level)=0 |
Set the raw value of a given digital channel. More... | |
virtual void | libm2k::digital::M2kDigital::push (std::vector< unsigned short > const &data)=0 |
Send the samples to all digital channels. More... | |
virtual void | libm2k::digital::M2kDigital::push (unsigned short *data, unsigned int nb_samples)=0 |
Send the samples to all digital channels. More... | |
virtual void | libm2k::digital::M2kDigital::setValueRaw (unsigned int index, DIO_LEVEL level)=0 |
Set the raw value of a given digital channel. More... | |
virtual void | libm2k::digital::M2kDigital::setValueRaw (DIO_CHANNEL index, bool level)=0 |
Set the raw value of a given digital channel. More... | |
virtual DIO_LEVEL | libm2k::digital::M2kDigital::getValueRaw (DIO_CHANNEL index)=0 |
Retrieve the raw value of the given digital channel. More... | |
virtual DIO_LEVEL | libm2k::digital::M2kDigital::getValueRaw (unsigned int index)=0 |
Retrieve the raw value of the given digital channel. More... | |
+virtual void | libm2k::digital::M2kDigital::stopBufferOut ()=0 |
Stop all digital channels from sending the signals. | |
virtual void | libm2k::digital::M2kDigital::startAcquisition (unsigned int nb_samples)=0 |
Create the buffer for all channels and start the acquisition. More... | |
+virtual void | libm2k::digital::M2kDigital::stopAcquisition ()=0 |
Destroy the buffer and stop the acquisition. | |
virtual void | libm2k::digital::M2kDigital::cancelAcquisition ()=0 |
Cancel all rx-buffer operations. More... | |
virtual void | libm2k::digital::M2kDigital::cancelBufferOut ()=0 |
Cancel all tx-buffer operations. More... | |
virtual std::vector< unsigned short > | libm2k::digital::M2kDigital::getSamples (unsigned int nb_samples)=0 |
Retrieve a specific number of samples. More... | |
virtual const unsigned short * | libm2k::digital::M2kDigital::getSamplesP (unsigned int nb_samples)=0 |
Retrieve a specific number of samples. More... | |
virtual void | libm2k::digital::M2kDigital::enableChannel (unsigned int index, bool enable)=0 |
Enable or disable the given digital channel. More... | |
virtual void | libm2k::digital::M2kDigital::enableChannel (DIO_CHANNEL index, bool enable)=0 |
Enable or disable the given digital channel. More... | |
virtual void | libm2k::digital::M2kDigital::enableAllOut (bool enable)=0 |
Enable or disable all output channels. More... | |
virtual bool | libm2k::digital::M2kDigital::anyChannelEnabled (DIO_DIRECTION dir)=0 |
Check if there is at least one channel enabled. More... | |
virtual void | libm2k::digital::M2kDigital::setOutputMode (DIO_CHANNEL chn, DIO_MODE mode)=0 |
Set the output mode for the given digital channel. More... | |
virtual void | libm2k::digital::M2kDigital::setOutputMode (unsigned int chn, DIO_MODE mode)=0 |
Set the output mode for the given digital channel. More... | |
virtual DIO_MODE | libm2k::digital::M2kDigital::getOutputMode (DIO_CHANNEL chn)=0 |
Retrieve the output mode for the given digital channel. More... | |
virtual DIO_MODE | libm2k::digital::M2kDigital::getOutputMode (unsigned int chn)=0 |
Retrieve the output mode for the given digital channel. More... | |
virtual double | libm2k::digital::M2kDigital::setSampleRateIn (double samplerate)=0 |
Set the sample rate for all digital input channels. More... | |
virtual double | libm2k::digital::M2kDigital::setSampleRateOut (double samplerate)=0 |
Set the sample rate for all digital output channels. More... | |
virtual double | libm2k::digital::M2kDigital::getSampleRateIn ()=0 |
Retrieve the sample rate of all digital input channels. More... | |
virtual double | libm2k::digital::M2kDigital::getSampleRateOut ()=0 |
Retrieve the sample rate of all digital output channels. More... | |
virtual bool | libm2k::digital::M2kDigital::getCyclic ()=0 |
Retrieve the value of the cyclic mode. More... | |
virtual void | libm2k::digital::M2kDigital::setCyclic (bool cyclic)=0 |
Enable or disable the cyclic mode for all digital channels. More... | |
virtual libm2k::M2kHardwareTrigger * | libm2k::digital::M2kDigital::getTrigger ()=0 |
Get the hardware trigger handler. More... | |
virtual void | libm2k::digital::M2kDigital::setKernelBuffersCountIn (unsigned int count)=0 |
Set the kernel buffers for input to a specific value. More... | |
virtual void | libm2k::digital::M2kDigital::setKernelBuffersCountOut (unsigned int count)=0 |
Set the kernel buffers for output to a specific value. More... | |
virtual struct IIO_OBJECTS | libm2k::digital::M2kDigital::getIioObjects ()=0 |
Get access to IIO channels, buffers, devices and context. Can be used when debugging directly with libiio. More... | |
virtual unsigned int | libm2k::digital::M2kDigital::getNbChannelsIn ()=0 |
Retrieve the number of digital input channels. More... | |
virtual unsigned int | libm2k::digital::M2kDigital::getNbChannelsOut ()=0 |
Retrieve the number of digital output channels. More... | |
virtual void | libm2k::digital::M2kDigital::getSamples (std::vector< unsigned short > &data, unsigned int nb_samples)=0 |
Retrieve a specific number of samples. More... | |
virtual void | libm2k::digital::M2kDigital::setRateMux ()=0 |
Force the digital interface to use the analogical rate. More... | |
virtual void | libm2k::digital::M2kDigital::resetRateMux ()=0 |
Reset the digital rate to default. More... | |
virtual void | libm2k::digital::M2kDigital::setExternalClocksource (bool external)=0 |
Set the clocksource. More... | |
virtual bool | libm2k::digital::M2kDigital::isClocksourceExternal ()=0 |
Get the current clocksource. More... | |
Contains the representation of the digital segment.
+
+
|
+ +pure virtual | +
Check if there is at least one channel enabled.
+dir | An enumerator corresponding to the direction of a channel |
+
|
+ +pure virtual | +
Cancel all rx-buffer operations.
+
+
|
+ +pure virtual | +
Cancel all tx-buffer operations.
+
+
|
+ +pure virtual | +
Enable or disable all output channels.
+enable | A boolean value corresponding to the channel's state |
+
|
+ +pure virtual | +
Enable or disable the given digital channel.
+index | The index corresponding to the channel |
enable | A boolean value corresponding to the channel's state |
+
|
+ +pure virtual | +
Enable or disable the given digital channel.
+index | An enumerator corresponding to the channel's index |
enable | A boolean value corresponding to the channel's state |
+
|
+ +pure virtual | +
Retrieve the value of the cyclic mode.
+
+
|
+ +pure virtual | +
Retrieve the direction of the given digital channel.
+index | An enumerator corresponding to the channel's index |
+
|
+ +pure virtual | +
Get access to IIO channels, buffers, devices and context. Can be used when debugging directly with libiio.
+
+
|
+ +pure virtual | +
Retrieve the number of digital input channels.
+
+
|
+ +pure virtual | +
Retrieve the number of digital output channels.
+
+
|
+ +pure virtual | +
Retrieve the output mode for the given digital channel.
+chn | An enumerator corresponding to the channel's index |
+
|
+ +pure virtual | +
Retrieve the output mode for the given digital channel.
+chn | The index corresponding to the channel |
+
|
+ +pure virtual | +
Retrieve the sample rate of all digital input channels.
+
+
|
+ +pure virtual | +
Retrieve the sample rate of all digital output channels.
+
+
|
+ +pure virtual | +
Retrieve a specific number of samples.
+nb_samples | The number of samples that will be retrieved |
+
|
+ +pure virtual | +
Retrieve a specific number of samples.
+data | - a reference to a vector owned/created by the client |
nb_samples | The number of samples that will be retrieved. The vector will be cleaned and then filled with samples. |
+
|
+ +pure virtual | +
Retrieve a specific number of samples.
+nb_samples | The number of samples that will be retrieved |
+
|
+ +pure virtual | +
Get the hardware trigger handler.
+
+
|
+ +pure virtual | +
Retrieve the raw value of the given digital channel.
+index | An enumerator corresponding to the channel's index |
+
|
+ +pure virtual | +
Retrieve the raw value of the given digital channel.
+index | The index corresponding to the channel |
+
|
+ +pure virtual | +
Get the current clocksource.
+
+
|
+ +pure virtual | +
Send the samples to all digital channels.
+data | The std vector that contains the samples |
+
|
+ +pure virtual | +
Send the samples to all digital channels.
+data | a pointer to the samples |
nb_samples | the number of samples |
+
|
+ +pure virtual | +
Reset the digital rate to default.
+
+
|
+ +pure virtual | +
Enable or disable the cyclic mode for all digital channels.
+cyclic | If true, enable cyclic mode |
+
|
+ +pure virtual | +
Set the direction for all digital channels.
+mask | A bitmask |
+
|
+ +pure virtual | +
Set the direction of the given digital channel.
+index | The index corresponding to the channel |
dir | An enumerator that indicates the direction of a channel |
+
|
+ +pure virtual | +
Set the direction of the given digital channel.
+index | The index corresponding to the channel |
dir | A boolean value that corresponds to one direction |
+
|
+ +pure virtual | +
Set the direction of the given digital channel.
+index | An enumerator corresponding to the channel's index |
dir | A boolean value that corresponds to one direction |
+
|
+ +pure virtual | +
Set the direction of the given digital channel.
+index | An enumerator corresponding to the channel's index |
dir | An enumerator that indicates the direction of a channel |
+
|
+ +pure virtual | +
Set the clocksource.
+external | - True to set source to external
|
+
|
+ +pure virtual | +
Set the kernel buffers for input to a specific value.
+count | the number of kernel buffers |
+
|
+ +pure virtual | +
Set the kernel buffers for output to a specific value.
+count | the number of kernel buffers |
+
|
+ +pure virtual | +
Set the output mode for the given digital channel.
+chn | An enumerator corresponding to the channel's index |
mode | An enumerator corresponding to the output mode |
+
|
+ +pure virtual | +
Set the output mode for the given digital channel.
+chn | The index corresponding to the channel |
mode | An enumerator corresponding to the output mode |
+
|
+ +pure virtual | +
Force the digital interface to use the analogical rate.
+
+
|
+ +pure virtual | +
Set the sample rate for all digital input channels.
+samplerate | A double value to set the sample rate to |
+
|
+ +pure virtual | +
Set the sample rate for all digital output channels.
+samplerate | A double value to set the sample rate to |
+
|
+ +pure virtual | +
Set the raw value of a given digital channel.
+index | An enumerator corresponding to the channel's index |
level | An enumerator corresponding to the raw value |
+
|
+ +pure virtual | +
Set the raw value of a given digital channel.
+index | The index corresponding to the channel |
level | An enumerator corresponding to the raw value |
+
|
+ +pure virtual | +
Set the raw value of a given digital channel.
+index | An enumerator corresponding to the channel's index |
level | A boolean value corresponding to the raw value |
+
|
+ +pure virtual | +
Create the buffer for all channels and start the acquisition.
+nb_samples | size of the buffer in samples |
+ libm2k
+
+ |
+
Contains the representation of the digital multimeter. +More...
++ + |
+Classes | |
class | libm2k::analog::DMM |
Controls the digital multimeter. More... | |
+Functions | |
virtual std::vector< std::string > | libm2k::analog::DMM::getAllChannels ()=0 |
Retrieve all channels. More... | |
virtual libm2k::analog::DMM_READING | libm2k::analog::DMM::readChannel (unsigned int index)=0 |
Retrieve additional information about the given channel. More... | |
virtual libm2k::analog::DMM_READING | libm2k::analog::DMM::readChannel (std::string chn_name)=0 |
Retrieve additional information about the given channel. More... | |
virtual std::vector< libm2k::analog::DMM_READING > | libm2k::analog::DMM::readAll ()=0 |
Retrieve additional information about all channels. More... | |
virtual std::string | libm2k::analog::DMM::getName ()=0 |
Retrieve the device's name. More... | |
Contains the representation of the digital multimeter.
+
+
|
+ +pure virtual | +
Retrieve all channels.
+
+
|
+ +pure virtual | +
Retrieve the device's name.
+
+
|
+ +pure virtual | +
Retrieve additional information about all channels.
+
+
|
+ +pure virtual | +
Retrieve additional information about the given channel.
+index | The index corresponding to the channel |
+
|
+ +pure virtual | +
Retrieve additional information about the given channel.
+chn_name | The name corresponding to the channel |
+ libm2k
+
+ |
+
Contains the representation of the M2K. +More...
++Classes | |
class | libm2k::context::M2k |
Controls the ADALM2000. More... | |
+Functions | |
virtual void | libm2k::context::M2k::reset ()=0 |
Reset the M2K device to default settings: More... | |
virtual bool | libm2k::context::M2k::calibrateADC ()=0 |
Calibrate the ADC. More... | |
virtual bool | libm2k::context::M2k::calibrateDAC ()=0 |
Calibrate the DAC. More... | |
virtual double | libm2k::context::M2k::calibrateFromContext ()=0 |
Calibrate both ADC and DACs using predefined calibration values located in context. More... | |
virtual libm2k::digital::M2kDigital * | libm2k::context::M2k::getDigital ()=0 |
Retrieve the Digital object. More... | |
virtual libm2k::analog::M2kPowerSupply * | libm2k::context::M2k::getPowerSupply ()=0 |
Retrieve the PowerSupply object. More... | |
virtual libm2k::analog::M2kAnalogIn * | libm2k::context::M2k::getAnalogIn ()=0 |
Retrieve the AnalogIn object. More... | |
virtual libm2k::analog::M2kAnalogIn * | libm2k::context::M2k::getAnalogIn (std::string dev_name)=0 |
Retrieve the AnalogIn object of a device. More... | |
virtual libm2k::analog::M2kAnalogOut * | libm2k::context::M2k::getAnalogOut ()=0 |
Retrieve the AnalogOut object. More... | |
virtual bool | libm2k::context::M2k::hasMixedSignal ()=0 |
Check if the mixed signal acquisition is available on the current firmware version. More... | |
virtual void | libm2k::context::M2k::startMixedSignalAcquisition (unsigned int nb_samples)=0 |
Initiate the mixed acquisition. More... | |
virtual void | libm2k::context::M2k::stopMixedSignalAcquisition ()=0 |
Stop the mixed acquisition. More... | |
virtual int | libm2k::context::M2k::getDacCalibrationOffset (unsigned int chn)=0 |
Get the calibration offset of the DAC. More... | |
virtual double | libm2k::context::M2k::getDacCalibrationGain (unsigned int chn)=0 |
Get the calibration gain of the DAC. More... | |
virtual int | libm2k::context::M2k::getAdcCalibrationOffset (unsigned int chn)=0 |
Get the calibration offset of the ADC. More... | |
virtual double | libm2k::context::M2k::getAdcCalibrationGain (unsigned int chn)=0 |
Get the calibration gain of the ADC. More... | |
virtual void | libm2k::context::M2k::setDacCalibrationOffset (unsigned int chn, int offset)=0 |
Set the calibration offset of the DAC. More... | |
virtual void | libm2k::context::M2k::setDacCalibrationGain (unsigned int chn, double gain)=0 |
Set the calibration gain of the DAC. More... | |
virtual void | libm2k::context::M2k::setAdcCalibrationOffset (unsigned int chn, int offset)=0 |
Set the calibration offset of the ADC. More... | |
virtual void | libm2k::context::M2k::setAdcCalibrationGain (unsigned int chn, double gain)=0 |
Set the calibration gain of the ADC. More... | |
virtual bool | libm2k::context::M2k::hasContextCalibration ()=0 |
Check if the calibration based on temperature can be performed. More... | |
virtual std::map< double, std::shared_ptr< struct CALIBRATION_PARAMETERS > > & | libm2k::context::M2k::getLUT ()=0 |
Retrieve the predefined calibration parameter. More... | |
virtual bool | libm2k::context::M2k::isCalibrated ()=0 |
Check if the board was calibrated. More... | |
virtual void | libm2k::context::M2k::setLed (bool on)=0 |
Turn on or off the board's led. More... | |
virtual bool | libm2k::context::M2k::getLed ()=0 |
Retrieve the state of the led. More... | |
Contains the representation of the M2K.
+
+
|
+ +pure virtual | +
Calibrate the ADC.
+
+
|
+ +pure virtual | +
Calibrate the DAC.
+
+
|
+ +pure virtual | +
Calibrate both ADC and DACs using predefined calibration values located in context.
+
+
|
+ +pure virtual | +
Get the calibration gain of the ADC.
+chn | The index corresponding to a channel |
+
|
+ +pure virtual | +
Get the calibration offset of the ADC.
+chn | The index corresponding to a channel |
+
|
+ +pure virtual | +
Retrieve the AnalogIn object.
+
+
|
+ +pure virtual | +
Retrieve the AnalogIn object of a device.
+dev_name | The name corresponding to a device |
+
|
+ +pure virtual | +
Retrieve the AnalogOut object.
+
+
|
+ +pure virtual | +
Get the calibration gain of the DAC.
+chn | The index corresponding to a channel |
+
|
+ +pure virtual | +
Get the calibration offset of the DAC.
+chn | The index corresponding to a channel |
+
|
+ +pure virtual | +
Retrieve the Digital object.
+EXC_INVALID_PARAMETER | No M2K digital device found |
+
|
+ +pure virtual | +
Retrieve the state of the led.
+
+
|
+ +pure virtual | +
Retrieve the predefined calibration parameter.
+
+
|
+ +pure virtual | +
Retrieve the PowerSupply object.
+EXC_INVALID_PARAMETER | No M2K power supply |
+
|
+ +pure virtual | +
Check if the calibration based on temperature can be performed.
+
+
|
+ +pure virtual | +
Check if the mixed signal acquisition is available on the current firmware version.
+
+
|
+ +pure virtual | +
Check if the board was calibrated.
+
+
|
+ +pure virtual | +
Reset the M2K device to default settings:
+Implements libm2k::context::Context.
+ +
+
|
+ +pure virtual | +
Set the calibration gain of the ADC.
+chn | The index corresponding to a channel |
gain | The calibration gain value |
+
|
+ +pure virtual | +
Set the calibration offset of the ADC.
+chn | The index corresponding to a channel |
offset | The calibration offset value |
+
|
+ +pure virtual | +
Set the calibration gain of the DAC.
+chn | The index corresponding to a channel |
gain | The calibration gain value |
+
|
+ +pure virtual | +
Set the calibration offset of the DAC.
+chn | The index corresponding to a channel |
offset | The calibration offset value |
+
|
+ +pure virtual | +
Turn on or off the board's led.
+on | A boolean value corresponding to the state of the led |
+
|
+ +pure virtual | +
Initiate the mixed acquisition.
+nb_samples | The number of samples that will be retrieved |
+
|
+ +pure virtual | +
Stop the mixed acquisition.
+
+ libm2k
+
+ |
+
Contains the representation of the ADALM2000 trigger system. +More...
++Classes | |
class | libm2k::M2kHardwareTrigger |
Controls the hardware trigger for ADALM2000. More... | |
+Functions | |
virtual int | libm2k::M2kHardwareTrigger::getAnalogLevelRaw (unsigned int chnIdx)=0 |
Get the raw analog trigger level for one channel. More... | |
virtual void | libm2k::M2kHardwareTrigger::setAnalogLevelRaw (unsigned int chnIdx, int level)=0 |
Set the raw analog trigger level for one channel. More... | |
virtual void | libm2k::M2kHardwareTrigger::setAnalogLevel (unsigned int chnIdx, double v_level)=0 |
Set the analog trigger level for one channel. More... | |
virtual double | libm2k::M2kHardwareTrigger::getAnalogLevel (unsigned int chnIdx)=0 |
Get the analog trigger level for one channel. More... | |
virtual double | libm2k::M2kHardwareTrigger::getAnalogHysteresis (unsigned int chnIdx)=0 |
Get the analog hysteresis value for one channel. More... | |
virtual void | libm2k::M2kHardwareTrigger::setAnalogHysteresis (unsigned int chnIdx, double hysteresis)=0 |
Set the analog hysteresis value for one channel. More... | |
virtual M2K_TRIGGER_CONDITION_ANALOG | libm2k::M2kHardwareTrigger::getAnalogCondition (unsigned int chnIdx)=0 |
Get the trigger condition for the analog trigger on a specific channel. More... | |
virtual void | libm2k::M2kHardwareTrigger::setAnalogCondition (unsigned int chnIdx, M2K_TRIGGER_CONDITION_ANALOG cond)=0 |
Set the trigger condition for the analog trigger on a specific channel. More... | |
virtual M2K_TRIGGER_CONDITION_DIGITAL | libm2k::M2kHardwareTrigger::getDigitalCondition (unsigned int chnIdx)=0 |
Get the trigger condition for the digital trigger on a specific channel. More... | |
virtual M2K_TRIGGER_CONDITION_DIGITAL | libm2k::M2kHardwareTrigger::getDigitalCondition (libm2k::digital::DIO_CHANNEL chnIdx)=0 |
Get the trigger condition for the digital trigger on a specific channel. More... | |
virtual void | libm2k::M2kHardwareTrigger::setDigitalCondition (unsigned int chnIdx, M2K_TRIGGER_CONDITION_DIGITAL cond)=0 |
Set the trigger condition for the digital trigger on a specific channel. More... | |
virtual void | libm2k::M2kHardwareTrigger::setDigitalCondition (libm2k::digital::DIO_CHANNEL chnIdx, M2K_TRIGGER_CONDITION_DIGITAL cond)=0 |
Set the trigger condition for the digital trigger on a specific channel. More... | |
virtual M2K_TRIGGER_MODE | libm2k::M2kHardwareTrigger::getAnalogMode (unsigned int chnIdx)=0 |
Get the mode for the analog trigger on a specific channel. More... | |
virtual void | libm2k::M2kHardwareTrigger::setAnalogMode (unsigned int chnIdx, M2K_TRIGGER_MODE mode)=0 |
Set the mode for the analog trigger on a specific channel. More... | |
virtual libm2k::digital::DIO_TRIGGER_MODE | libm2k::M2kHardwareTrigger::getDigitalMode ()=0 |
Get the mode for the digital trigger. More... | |
virtual void | libm2k::M2kHardwareTrigger::setDigitalMode (libm2k::digital::DIO_TRIGGER_MODE mode)=0 |
Set the mode for the digital trigger. More... | |
virtual M2K_TRIGGER_SOURCE_ANALOG | libm2k::M2kHardwareTrigger::getAnalogSource ()=0 |
Get the source of the analog trigger. More... | |
virtual void | libm2k::M2kHardwareTrigger::setAnalogSource (M2K_TRIGGER_SOURCE_ANALOG src)=0 |
Set the source of the analog trigger. More... | |
virtual int | libm2k::M2kHardwareTrigger::getAnalogSourceChannel ()=0 |
Get the channel source of the analog trigger. More... | |
virtual void | libm2k::M2kHardwareTrigger::setAnalogSourceChannel (unsigned int chnIdx)=0 |
Set the channel source of the analog trigger. More... | |
virtual int | libm2k::M2kHardwareTrigger::getAnalogDelay () const =0 |
Get the analog trigger delay. More... | |
virtual void | libm2k::M2kHardwareTrigger::setAnalogDelay (int delay)=0 |
Set the analog trigger delay. More... | |
virtual int | libm2k::M2kHardwareTrigger::getDigitalDelay () const =0 |
Get the digital trigger delay. More... | |
virtual void | libm2k::M2kHardwareTrigger::setDigitalDelay (int delay)=0 |
Set the digital trigger delay. More... | |
virtual void | libm2k::M2kHardwareTrigger::setAnalogStreamingFlag (bool enable)=0 |
Set the streaming flag for the analog part. More... | |
virtual bool | libm2k::M2kHardwareTrigger::getAnalogStreamingFlag ()=0 |
Get the streaming flag for the analog part. More... | |
virtual void | libm2k::M2kHardwareTrigger::setDigitalStreamingFlag (bool enable)=0 |
Set the streaming flag for the digital part. More... | |
virtual bool | libm2k::M2kHardwareTrigger::getDigitalStreamingFlag ()=0 |
Get the streaming flag for the digital part. More... | |
virtual M2K_TRIGGER_CONDITION_DIGITAL | libm2k::M2kHardwareTrigger::getAnalogExternalCondition (unsigned int chnIdx)=0 |
getAnalogExternalCondition More... | |
virtual void | libm2k::M2kHardwareTrigger::setAnalogExternalCondition (unsigned int chnIdx, M2K_TRIGGER_CONDITION_DIGITAL cond)=0 |
setAnalogExternalCondition More... | |
virtual M2K_TRIGGER_CONDITION_DIGITAL | libm2k::M2kHardwareTrigger::getDigitalExternalCondition () const =0 |
getDigitalExternalCondition More... | |
virtual void | libm2k::M2kHardwareTrigger::setDigitalExternalCondition (M2K_TRIGGER_CONDITION_DIGITAL cond)=0 |
setDigitalExternalCondition More... | |
virtual void | libm2k::M2kHardwareTrigger::setAnalogExternalOutSelect (M2K_TRIGGER_OUT_SELECT output_select) |
Select what should be redirected on the TO (trigger out) pin. + The options are (none, trigger in, digital in, analog in). +. More... | |
virtual M2K_TRIGGER_OUT_SELECT | libm2k::M2kHardwareTrigger::getAnalogExternalOutSelect () |
Check which trigger events are forwarded on the TO (trigger out) pin. More... | |
virtual void | libm2k::M2kHardwareTrigger::setDigitalSource (M2K_TRIGGER_SOURCE_DIGITAL external_src) |
Select which interface triggers the DigitalIn. More... | |
virtual M2K_TRIGGER_SOURCE_DIGITAL | libm2k::M2kHardwareTrigger::getDigitalSource () const |
Check which is the source of the DigitalIn interface trigger event. More... | |
virtual void | libm2k::M2kHardwareTrigger::setAnalogOutTriggerSource (M2K_TRIGGER_SOURCE_OUT src)=0 |
Select which interface triggers the AnalogOut. More... | |
virtual M2K_TRIGGER_SOURCE_OUT | libm2k::M2kHardwareTrigger::getAnalogOutTriggerSource () const =0 |
Returns the source of the AnalogOut trigger event. More... | |
virtual void | libm2k::M2kHardwareTrigger::setAnalogOutTriggerCondition (M2K_TRIGGER_CONDITION_OUT condition)=0 |
Configures the triggering condition when the source of the AnalogOut trigger event is set to TRIGGER_TI_0. More... | |
virtual M2K_TRIGGER_CONDITION_OUT | libm2k::M2kHardwareTrigger::getAnalogOutTriggerCondition () const =0 |
Returns the condition of the AnalogOut trigger event when the source is TI. More... | |
virtual void | libm2k::M2kHardwareTrigger::setAnalogOutTriggerStatus (M2K_TRIGGER_STATUS_ANALOG_OUT status)=0 |
Defines the action to be performed when a trigger event occurs. More... | |
virtual M2K_TRIGGER_STATUS_ANALOG_OUT | libm2k::M2kHardwareTrigger::getAnalogOutTriggerStatus () const =0 |
Returns the action that is performed when a trigger event occurs. More... | |
Contains the representation of the ADALM2000 trigger system.
+
+
|
+ +pure virtual | +
Get the trigger condition for the analog trigger on a specific channel.
+chnIdx | the required channel |
+
|
+ +pure virtual | +
Get the analog trigger delay.
+
+
|
+ +pure virtual | +
getAnalogExternalCondition
+chnIdx | : integer - the index of the required channel |
+
|
+ +virtual | +
Check which trigger events are forwarded on the TO (trigger out) pin.
+
+
|
+ +pure virtual | +
Get the analog hysteresis value for one channel.
+chnIdx | the required channel |
+
|
+ +pure virtual | +
Get the analog trigger level for one channel.
+chnIdx | the required channel |
+
|
+ +pure virtual | +
Get the raw analog trigger level for one channel.
+chnIdx | the required channel |
+
|
+ +pure virtual | +
Get the mode for the analog trigger on a specific channel.
+chnIdx | the required channel |
+
|
+ +pure virtual | +
Returns the condition of the AnalogOut trigger event when the source is TI.
+
+
|
+ +pure virtual | +
Returns the source of the AnalogOut trigger event.
+
+
|
+ +pure virtual | +
Returns the action that is performed when a trigger event occurs.
+
+
|
+ +pure virtual | +
Get the source of the analog trigger.
+
+
|
+ +pure virtual | +
Get the channel source of the analog trigger.
+
+
|
+ +pure virtual | +
Get the streaming flag for the analog part.
+
+
|
+ +pure virtual | +
Get the trigger condition for the digital trigger on a specific channel.
+chnIdx | The index of the required channel |
+
|
+ +pure virtual | +
Get the trigger condition for the digital trigger on a specific channel.
+chnIdx | An enumerator corresponding to the index of the required channel |
+
|
+ +pure virtual | +
Get the digital trigger delay.
+
+
|
+ +pure virtual | +
getDigitalExternalCondition
+
+
|
+ +pure virtual | +
Get the mode for the digital trigger.
+
+
|
+ +virtual | +
Check which is the source of the DigitalIn interface trigger event.
+
+
|
+ +pure virtual | +
Get the streaming flag for the digital part.
+
+
|
+ +pure virtual | +
Set the trigger condition for the analog trigger on a specific channel.
+chnIdx | the required channel |
cond | the specific trigger condition |
+
|
+ +pure virtual | +
Set the analog trigger delay.
+delay | the value of the analog delay |
+
|
+ +pure virtual | +
setAnalogExternalCondition
+chnIdx | : integer - the index of the required channel |
cond | : M2K_TRIGGER_CONDITION_DIGITAL |
+
|
+ +virtual | +
Select what should be redirected on the TO (trigger out) pin.
+ The options are (none, trigger in, digital in, analog in).
+.
output_select | : of type M2K_TRIGGER_OUT_SELECT: + SELECT_TRIGGER_IN - forwards trigger events from TI pin(trigger in); + SELECT_DIGITAL_IN - forwards trigger events from DigitalIn interface; + SELECT_ANALOG_IN - forwards trigger events from AnalogIn interface; + SELECT_NONE - no trigger event is forwarded; + |
+
|
+ +pure virtual | +
Set the analog hysteresis value for one channel.
+chnIdx | the required channel |
hysteresis | in Volts |
+
|
+ +pure virtual | +
Set the analog trigger level for one channel.
+chnIdx | the required channel |
v_level | the analog trigger level in volts |
+
|
+ +pure virtual | +
Set the raw analog trigger level for one channel.
+chnIdx | the required channel |
level | the raw analog trigger level |
+
|
+ +pure virtual | +
Set the mode for the analog trigger on a specific channel.
+chnIdx | the required channel |
mode | the analog trigger mode |
+
|
+ +pure virtual | +
Configures the triggering condition when the source of the AnalogOut trigger event is set to TRIGGER_TI_0.
+condition | of type M2K_TRIGGER_CONDITION_OUT: + NONE_OUT - disabled; + LOW_LEVEL_OUT; + HIGH_LEVEL_OUT; + ANY_EDGE_OUT; + RISING_EDGE_OUT; + FALLING_EDGE_OUT; + |
+
|
+ +pure virtual | +
Select which interface triggers the AnalogOut.
+src | of type M2K_TRIGGER_SOURCE_OUT: + TRIGGER_NONE - trigger events are disabled; + TRIGGER_TI - trigger events on the TI pin will trigger the AnalogOut interface; + TRIGGER_ADC - trigger events on the AnalogIn interface will trigger the AnalogOut interface; + TRIGGER_LA - trigger events on the DigitalIn interface will trigger the AnalogOut interface; + |
+
|
+ +pure virtual | +
Defines the action to be performed when a trigger event occurs.
+status | of type M2K_TRIGGER_STATUS_ANALOG_OUT: + DISABLED - no action is performed when a trigger event occurs; + START - the AnalogOut interface starts outputting samples; + STOP - the AnalogOut interface stops outputting samples; + |
+
|
+ +pure virtual | +
Set the source of the analog trigger.
+src | analog trigger source (channel1, channel2, etc) |
+
|
+ +pure virtual | +
Set the channel source of the analog trigger.
+chnIdx | the index of the channel that should be used |
+
|
+ +pure virtual | +
Set the streaming flag for the analog part.
+enable | the streaming |
+
|
+ +pure virtual | +
Set the trigger condition for the digital trigger on a specific channel.
+chnIdx | The index of the required channel |
cond | the specific trigger condition |
+
|
+ +pure virtual | +
Set the trigger condition for the digital trigger on a specific channel.
+chnIdx | An enumerator corresponding to the index of the required channel |
cond | the specific trigger condition |
+
|
+ +pure virtual | +
Set the digital trigger delay.
+delay | the value of the digital delay |
+
|
+ +pure virtual | +
setDigitalExternalCondition
+cond | : M2K_TRIGGER_CONDITION_DIGITAL |
+
|
+ +pure virtual | +
Set the mode for the digital trigger.
+mode | the digital trigger mode (DIO_OR/DIO_AND) |
+
|
+ +virtual | +
Select which interface triggers the DigitalIn.
+external_src | of type M2K_TRIGGER_SOURCE_DIGITAL: + SRC_TRIGGER_IN - trigger events on the TI(trigger in) pin trigger the DigitalIn interface; + SRC_ANALOG_IN - trigger events on the AnalogIn interface trigger the DigitalIn interface; + SRC_NONE - trigger events on the DigitalIn are conditioned by the internal digital trigger structure; + |
+
|
+ +pure virtual | +
Set the streaming flag for the digital part.
+enable | the streaming |
+ libm2k
+
+ |
+
Contains the representation of the power supply. +More...
++ + |
+Classes | |
class | libm2k::analog::M2kPowerSupply |
Controls the power supply. More... | |
+Functions | |
virtual void | libm2k::analog::M2kPowerSupply::enableChannel (unsigned int chn, bool en)=0 |
Enable or disable the given channel. More... | |
virtual void | libm2k::analog::M2kPowerSupply::enableAll (bool en)=0 |
Enable or disable all channels. More... | |
virtual double | libm2k::analog::M2kPowerSupply::readChannel (unsigned int chn, bool calibrated=true)=0 |
Retrieve the value of a given channel. More... | |
virtual void | libm2k::analog::M2kPowerSupply::pushChannel (unsigned int chn, double value, bool calibrated=true)=0 |
Set the voltage for the given channel. More... | |
virtual bool | libm2k::analog::M2kPowerSupply::anyChannelEnabled ()=0 |
Check if there is at least one enabled channel. More... | |
Contains the representation of the power supply.
+
+
|
+ +pure virtual | +
Check if there is at least one enabled channel.
+
+
|
+ +pure virtual | +
Enable or disable all channels.
+en | A boolean value corresponding to the state of the channels |
+
|
+ +pure virtual | +
Enable or disable the given channel.
+chn | The index corresponding to the channel |
en | A boolean value corresponding to the state of the channel |
+
|
+ +pure virtual | +
Set the voltage for the given channel.
+chn | The index corresponding to the channel |
value | The voltage (up to 5V) |
calibrated | Written values are converted using the calibration coefficients from the IIO context by default; This boolean flag specifies whether the coefficients should be used. |
+
|
+ +pure virtual | +
Retrieve the value of a given channel.
+chn | The index corresponding to the channel |
calibrated | Read values are converted using the calibration coefficients from the IIO context by default; This boolean flag specifies whether the coefficients should be used. |
+ libm2k
+
+ |
+
Clibm2k::CALIBRATION_PARAMETERS | Calibration parameters of m2k |
▼Clibm2k::context::Context | Controls the IIO context |
Clibm2k::context::M2k | Controls the ADALM2000 |
Clibm2k::CONTEXT_INFO | Additional information about the context |
Clibm2k::analog::DMM | Controls the digital multimeter |
Clibm2k::analog::DMM_READING | The structure of a DMM |
Clibm2k::IIO_CONTEXT_VERSION | The version of the backend |
Clibm2k::analog::M2kAnalogIn | Controls the analogical input compound |
Clibm2k::analog::M2kAnalogOut | Controls the analogical output compound |
Clibm2k::digital::M2kDigital | Controls the digital input and output segment |
Clibm2k::M2kHardwareTrigger | Controls the hardware trigger for ADALM2000 |
Clibm2k::analog::M2kPowerSupply | Controls the power supply |
Clibm2k::SETTINGS | Triggering system |
+ libm2k
+
+ |
+
libm2k is licensed under the GNU Lesser General Public License v2.1
+libm2k is a C++ library for interfacing with the ADALM2000, splitted into more correlated components, interconnected by a context. These M2K components represent the functionalities of ADALM2000:
+The class diagram containing details for all public classes of libm2k.
+ +The top level diagram provides an overview for the library structure. The components are organized in their corresponding namespaces.
+ +In this diagram the necessary steps to create an M2K context and get a specific device are presented. +
The sequence diagram shows an example to the asynchronous acquisition flow for Analog In or Digital In. Running "startAcquisition(number_of_samples)" will create, initialize and populate the available kernel buffers with data. Everytime we call "getSamples", we retrieve data from those kernel buffers, which will automatically be refilled. +
The sequence diagram shows an example to the synchronous acquisition flow for Analog In or Digital In. Running "getSamples(number_of_samples)" will create and initialize, but it will also populate all the available kernel buffers with data and it will return one buffer to the user. +
In order to use libm2k in Python applications please check the libm2k Python Bindings API
+The following code shows a simple example on how to use libm2k together with the digital side of ADALM2000.
+There are multiple examples provided for libm2k and can be found on the Github libm2k examples page. The examples are created to ease the work for a libm2k user. To get familiar with libm2k API, the examples can be modified and built out of the libm2k source code tree by keeping the CMake configuration file provided for each example.
+Useful questions and answers for the libm2k API usage and ADALM2000 manipulation
+The Python bindings API are not a 100% mirror of the C++ code. Therefore, some methods might have a slightly different return type for Python (it is necessary to check the Python Bindings API Documentation listed above). For example, the getSamplesRawInterleaved() method will return 4*nb_samples elements in the Python list. In order to make the acquisition faster, all the samples are returned in a bytes list. One sample for one channel (for AnalogIn) is represented using 2 bytes. The returned list of bytes will be interleaved, this meaning that it should be interpreted as one sample from CHANNEL_1, one sample from CHANNEL_2 and so on. One thing to keep in mind is that a sample corresponds to 2 elements in the list.
+Let's take an example:
+In order to convert all the samples you can use the following chunk of Python code:
+Next thing is to convert it into Volts. In Python, for AnalogIn() you have 2 exposed methods: libm2k::analog::M2kAnalogIn::convertVoltsToRaw(unsigned int channel, double voltage) and libm2k::analog::M2kAnalogIn::convertRawToVolts(unsigned int channel, short raw). Running convertRawToVolts(0, value_list[0]) should provide the needed Volts value for CHANNEL_1.
+
+ libm2k
+
+ |
+
+ + |
+ + |
+ + |
+ + |
+ + |
+ + |
+ + |
+ + |
+ + |
+ + |
+ + |
+ + |
t |
+ libm2k
+
+ |
+