You’re reading an older version of the Slamcore SDK documenation. The latest one is 23.04.

File properties_interface.hpp

Types used across the API - properties interface.

namespace slamcore

Main namespace for the Slamcore public API

Helper conversion methods

slamcore::ImageFormat \(\leftrightarrow\) BytesPerChannel

Get information about the client library

template<typename PT>
class PropertiesInterface
#include <properties_interface.hpp>

Helper for handling the properties.

Property-getters

Query property value.

param pt

Property to query.

param val

Return value.

param idx

Optional index for array-like properties.

return

Error code.

template<typename T>
inline std::enable_if<std::is_integral<T>::value, T>::type getProperty(PropertyT pt, std::size_t idx = 0) const
template<typename T>
inline std::enable_if<std::is_enum<T>::value, T>::type getProperty(PropertyT pt, std::size_t idx = 0) const
template<typename T>
inline std::enable_if<std::is_floating_point<T>::value, T>::type getProperty(PropertyT pt, std::size_t idx = 0) const
template<typename T>
inline std::enable_if<std::is_same<T, std::string>::value, T>::type getProperty(PropertyT pt, std::size_t idx = 0) const
template<typename T>
inline std::enable_if<std::is_same<T, SensorIDT>::value, T>::type getProperty(PropertyT pt, std::size_t idx = 0) const
template<typename T>
inline std::enable_if<std::is_same<T, DynamicVector>::value, T>::type getProperty(PropertyT pt, std::size_t idx = 0) const
template<typename T>
inline std::enable_if<std::is_same<T, DynamicMatrix>::value, T>::type getProperty(PropertyT pt, std::size_t idx = 0) const

Property-setter methods

Set a property.

param pt

Property to set.

param val

Value to set.

param idx

Optional index for array-like properties.

return

Error code.

template<typename T>
inline void setProperty(PropertyT pt, const T &val, std::size_t idx = 0, typename std::enable_if<std::is_integral<T>::value, T>::type* = 0)
template<typename T>
inline void setProperty(PropertyT pt, const T &val, std::size_t idx = 0, typename std::enable_if<std::is_enum<T>::value, T>::type* = 0)
template<typename T>
inline void setProperty(PropertyT pt, const T &val, std::size_t idx = 0, typename std::enable_if<std::is_floating_point<T>::value, T>::type* = 0)
inline void setProperty(PropertyT pt, const std::string &val, std::size_t idx = 0)
inline void setProperty(PropertyT pt, const SensorIDT &val, std::size_t idx = 0)
inline void setProperty(PropertyT pt, const DynamicVector &val, std::size_t idx = 0)
inline void setProperty(PropertyT pt, const DynamicMatrix &val, std::size_t idx = 0)

Public Types

using PropertyT = PT

Public Functions

virtual ~PropertiesInterface() = default
virtual bool isPropertySupported(PropertyT pt) const = 0

Check if we support a particular property.

virtual bool isPropertyReadOnly(PropertyT pt, std::size_t idx = 0) const = 0

Check if a particular property is read-only.

Parameters
  • pt – Property to query.

  • idx – Optional index for array-like properties.

Returns

Return value.

Protected Functions

virtual void getPropertyImpl(PropertyT pt, int64_t &val, std::size_t idx) const = 0
virtual void setPropertyImpl(PropertyT pt, const int64_t &val, std::size_t idx) = 0
virtual void getPropertyImpl(PropertyT pt, ScalarT &val, std::size_t idx) const = 0
virtual void setPropertyImpl(PropertyT pt, const ScalarT &val, std::size_t idx) = 0
virtual void getPropertyImpl(PropertyT pt, std::string &val, std::size_t idx) const = 0
virtual void setPropertyImpl(PropertyT pt, const std::string &val, std::size_t idx) = 0
virtual void getPropertyImpl(PropertyT pt, SensorIDT &val, std::size_t idx) const = 0
virtual void setPropertyImpl(PropertyT pt, const SensorIDT &val, std::size_t idx) = 0
virtual void getPropertyImpl(PropertyT pt, DynamicVector &val, std::size_t idx) const = 0
virtual void setPropertyImpl(PropertyT pt, const DynamicVector &val, std::size_t idx) = 0
virtual void getPropertyImpl(PropertyT pt, DynamicMatrix &val, std::size_t idx) const = 0
virtual void setPropertyImpl(PropertyT pt, const DynamicMatrix &val, std::size_t idx) = 0