libiio
Classes | Namespaces | Typedefs | Functions
iiopp.h File Reference

Public C++ interface. More...

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

Go to the source code of this file.

Classes

class  iiopp::cstr
 Non-owning immutable null terminated string. More...
 
class  iiopp::error
 Thrown to report errors. More...
 
class  iiopp::IAttr
 Common interface for attribute access. 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::impl::AttrT< obj_T, read_T, read_bool_T, read_double_T, read_longlong_T, write_T, write_bool_T, write_double_T, write_longlong_T >
 
class  iiopp::impl::AttrSeqT< obj_T, attr_T, get_attrs_count_T, get_attr_T, find_attr_T >
 Vector-like accessor for all attributes of an object. More...
 
class  iiopp::Channel
 C++ wrapper for the Channel C-API. 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...
 
struct  iiopp::Context::Version
 
class  iiopp::ContextInfo
 
class  iiopp::ScanContext
 
class  iiopp::ScanContext::InfoList
 
class  iiopp::ScanBlock
 

Namespaces

 iiopp
 Public C++ API.
 

Typedefs

typedef optional< cstr > iiopp::optstr
 Optional string, used for C-functions that return nullptr for "no value".
 

Functions

std::shared_ptr< Context > iiopp::impl::new_ctx (iio_context *ctx)
 
optstr iiopp::impl::opt (char const *s)
 
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 >
iiopp::impl::check_n (T n, char const *s)
 
template<class obj_T , class attr_T , char const * find_attr_T>
optional< attr_T > iiopp::impl::attr (obj_T const *obj, cstr name)
 
template<class obj_T , class attr_T , char const * get_attr_T>
optional< attr_T > iiopp::impl::attr (obj_T const *obj, unsigned int idx)
 
std::shared_ptr< Context > iiopp::create_from_uri (cstr uri)
 C++ wrapper for iio_create_context_from_uri.
 
std::shared_ptr< Context > iiopp::create_default_context ()
 C++ wrapper for iio_create_default_context.
 
std::shared_ptr< Context > iiopp::create_local_context ()
 C++ wrapper for iio_create_local_context.
 
std::shared_ptr< Context > iiopp::create_network_context (cstr host)
 C++ wrapper for iio_create_network_context.
 
std::shared_ptr< Context > iiopp::create_xml_context (cstr xml_file)
 C++ wrapper for iio_create_xml_context.
 
std::shared_ptr< Context > iiopp::create_xml_context_mem (char const *xml, size_t len)
 C++ wrapper for iio_create_xml_context_mem.
 
std::shared_ptr< ScanContext > iiopp::create_scan_context (optstr backend, int flags)
 
std::shared_ptr< ScanBlock > iiopp::create_scan_block (optstr backend, int flags)
 
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