libiio  1.0
Library for interfacing with IIO devices
iiopp.h File Reference

Public C++ interface. More...

#include <iio/iio.h>
#include <string>
#include <boost/optional.hpp>
#include <stdexcept>
#include <system_error>
#include <cassert>
#include <type_traits>
Include dependency graph for iiopp.h:

Go to the source code of this file.

Data Structures

class  iiopp::cstr
 Non-owning immutable null terminated string. More...
 
class  iiopp::error
 Thrown to report errors. More...
 
class  iiopp::impl::IndexedSequence< container_T, element_T >
 Serves as base class to implement a vector-like interface. More...
 
class  iiopp::impl::IndexedSequence< container_T, element_T >::Iterator
 A random access iterator for an IndexedSequence. More...
 
class  iiopp::Attr
 C++ wrapper for the Attributes C-API. More...
 
class  iiopp::impl::AttrSeqT< obj_T >
 Vector-like accessor for all attributes of an object. More...
 
class  iiopp::Ptr< obj_T, ptr_T, deleter_T >
 Special unique pointer for instances that must be destroyed. More...
 
class  iiopp::ChannelsMask
 C++ wrapper for iio_channels_mask. More...
 
class  iiopp::Block
 C++ wrapper for the Block C-API. More...
 
class  iiopp::Channel
 C++ wrapper for the Channel C-API. More...
 
class  iiopp::Stream
 C++ wrapper for the Stream C-API. More...
 
struct  iiopp::Event
 Event object. More...
 
class  iiopp::EventStream
 C++ wrapper for iio_event_stream. More...
 
class  iiopp::Buffer
 C++ wrapper for the Buffer C-API. More...
 
class  iiopp::Device
 C++ wrapper for the Device C-API. More...
 
class  iiopp::Context
 C++ wrapper for the Context C-API. More...
 
class  iiopp::Scan
 C++ wrapper for the Scan C-API. More...
 

Namespaces

 iiopp
 Public C++ API.
 
 iiopp::impl
 Namespace of implementation details.
 

Macros

#define IIOPP_HAVE_STD_OPIONAL   (__cplusplus >= 201703L || _MSC_VER >= 1910)
 

Typedefs

typedef optional< cstr > iiopp::optstr
 Optional string, used for C-functions that return nullptr for "no value".
 
typedef Ptr< ChannelsMask, iio_channels_mask, iio_channels_mask_destroy > iiopp::ChannelsMaskPtr
 
typedef Ptr< Block, iio_block, iio_block_destroy > iiopp::BlockPtr
 
typedef Ptr< Stream, iio_stream, iio_stream_destroy > iiopp::StreamPtr
 
typedef Ptr< EventStream, iio_event_stream, iio_event_stream_destroy > iiopp::EventStreamPtr
 
typedef Ptr< Buffer, iio_buffer, iio_buffer_destroy > iiopp::BufferPtr
 
typedef Ptr< cstr, void, free > iiopp::CstrPtr
 
typedef Ptr< Context, iio_context, iio_context_destroy > iiopp::ContextPtr
 
typedef Ptr< Scan, struct iio_scan, iio_scan_destroy > iiopp::ScanPtr
 

Functions

optstr iiopp::impl::opt (char const *s)
 
template<class T , class C >
optional< T > iiopp::impl::maybe (C *obj)
 
std::string iiopp::impl::err_str (int err)
 
void iiopp::impl::err (int err, char const *ctx)
 
void iiopp::impl::check (int ret, char const *ctx)
 
template<class T >
T * iiopp::impl::check (T *ret, char const *ctx)
 
template<class T >
iiopp::impl::check_n (T n, char const *s)
 
template<class obj_T , iio_attr const * find_attr_T>
optional< Attr > iiopp::impl::attr (obj_T const *obj, cstr name)
 
template<class obj_T , iio_attr const * get_attr_T>
optional< Attr > iiopp::impl::attr (obj_T const *obj, unsigned int index)
 
ChannelsMaskPtr iiopp::create_channels_mask (unsigned int nb_channels)
 
ContextPtr iiopp::create_context (iio_context_params *params, const char *uri)
 C++ wrapper for iio_create_context.
 
ScanPtr iiopp::scan (struct iio_context_params const *params, char const *backends)
 
double iiopp::value (Channel ch)
 Reads the value of a channel by using "input" or "raw" attribute and applying "scale" and "offset" if available. More...
 

Detailed Description

Public C++ interface.

See also
iiopp