API

Full API documentation, automatically generated from doxygen comments.

template<dv::Config::AttributeType>
struct _ConfigAttributes
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/config.hpp>

Maps the selected config type to a struct with additional config params that have to be set for the selected config type. Defaults to an empty struct.

template<>
struct _ConfigAttributes<dv::Config::AttributeType::BOOL>

Public Functions

inline _ConfigAttributes(dv::_BooleanAttributeType attributeType_, const std::string &buttonLabel_ = std::string())

Public Members

dv::_BooleanAttributeType attributeType
const std::string buttonLabel
template<>
struct _ConfigAttributes<dv::Config::AttributeType::DOUBLE>

Public Functions

inline _ConfigAttributes(double minValue, double maxValue)

Public Members

dv::Config::AttributeRanges<dv::Config::AttributeType::DOUBLE> range
std::string unit
template<>
struct _ConfigAttributes<dv::Config::AttributeType::FLOAT>

Public Functions

inline _ConfigAttributes(float minValue, float maxValue)

Public Members

dv::Config::AttributeRanges<dv::Config::AttributeType::FLOAT> range
std::string unit
template<>
struct _ConfigAttributes<dv::Config::AttributeType::INT>

Public Functions

inline _ConfigAttributes(int32_t minValue, int32_t maxValue)

Public Members

dv::Config::AttributeRanges<dv::Config::AttributeType::INT> range
std::string unit
template<>
struct _ConfigAttributes<dv::Config::AttributeType::LONG>

Public Functions

inline _ConfigAttributes(int64_t minValue, int64_t maxValue)

Public Members

dv::Config::AttributeRanges<dv::Config::AttributeType::LONG> range
std::string unit
template<>
struct _ConfigAttributes<dv::Config::AttributeType::STRING>

Public Functions

inline _ConfigAttributes(int32_t minLength, int32_t maxLength, _StringAttributeType t)

Public Members

dv::Config::AttributeRanges<dv::Config::AttributeType::STRING> length
_StringAttributeType type
std::vector<std::string> listOptions
bool listAllowMultipleSelections
FileDialogMode fileMode
std::string fileAllowedExtensions
template<dv::Config::AttributeType T>
class _ConfigOption
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/config.hpp>

Templated implementation class of a ConfigOption. Stores extra attributes according to the selected config type.

Public Functions

inline _ConfigOption(const std::string &description_, _AttrType initValue_, const _ConfigAttributes<T> &attributes_, dv::Config::AttributeFlags flags_, bool updateReadOnly_ = false)

Public Members

const std::string description
const _AttrType initValue
const _ConfigAttributes<T> attributes
const dv::Config::AttributeFlags flags
const bool updateReadOnly
_AttrType currentValue

Private Types

using _AttrType = typename dv::Config::AttributeTypeGenerator<T>::type
template<typename T>
class _InputDataWrapperCommon
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/data/wrappers.hpp>

Common parts of the implementation of an input wrapper. All specific input data wrappers for data types as well as the generic input data wrapper inherit from this.

Template Parameters:

T – The type of the input data

Subclassed by dv::_InputVectorDataWrapperCommon< dv::BoundingBoxPacket, dv::BoundingBox >, dv::_InputVectorDataWrapperCommon< dv::EventPacket, dv::Event >, dv::_InputVectorDataWrapperCommon< dv::IMUPacket, dv::IMU >, dv::_InputVectorDataWrapperCommon< dv::TriggerPacket, dv::Trigger >, dv::InputDataWrapper< T >, dv::_InputVectorDataWrapperCommon< T, U >

Public Functions

inline explicit operator bool() const noexcept
inline std::shared_ptr<const T> getBasePointer() const noexcept
inline operator std::shared_ptr<const T>() const noexcept

Protected Functions

inline _InputDataWrapperCommon(std::shared_ptr<const T> p)

Protected Attributes

std::shared_ptr<const T> ptr
template<typename T, typename U>
class _InputVectorDataWrapperCommon : public dv::_InputDataWrapperCommon<T>, public dv::cvectorConstProxy<U>

Subclassed by dv::InputVectorDataWrapper< T, U >

Protected Functions

inline _InputVectorDataWrapperCommon(std::shared_ptr<const T> p)
template<typename T>
class _OutputDataWrapperCommon
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/data/wrappers.hpp>

Common parts of the implementation of an output wrapper. All specific output data wrappers for data types as well as the generic output data wrapper inherit from this.

Template Parameters:

T – The type of the output data

Subclassed by dv::_OutputVectorDataWrapperCommon< dv::BoundingBoxPacket, dv::BoundingBox >, dv::_OutputVectorDataWrapperCommon< dv::EventPacket, dv::Event >, dv::_OutputVectorDataWrapperCommon< dv::IMUPacket, dv::IMU >, dv::_OutputVectorDataWrapperCommon< dv::TriggerPacket, dv::Trigger >, dv::OutputDataWrapper< T >, dv::_OutputVectorDataWrapperCommon< T, U >

Public Functions

inline _OutputDataWrapperCommon &operator=(const _InputDataWrapperCommon<T> &rhs)
inline explicit operator bool() const noexcept
inline T *getBasePointer() noexcept
inline const T *getBasePointer() const noexcept
inline void commit()
inline _OutputDataWrapperCommon &operator<<(commitType)

Protected Functions

inline _OutputDataWrapperCommon(T *p, dvModuleData m, const std::string &n)

Protected Attributes

T *ptr
dvModuleData moduleData
std::string name
template<typename T, typename U>
class _OutputVectorDataWrapperCommon : public dv::_OutputDataWrapperCommon<T>, public dv::cvectorProxy<U>

Subclassed by dv::OutputVectorDataWrapper< T, U >

Public Functions

inline void commit()
inline _OutputVectorDataWrapperCommon &operator<<(commitType)
inline _OutputVectorDataWrapperCommon &operator<<(const U &rhs)
template<typename K>
inline _OutputVectorDataWrapperCommon &operator<<(const K &container)

Appends all events the iterable container to the output buffer

Parameters:

container – The store with the events to be copied into the output buffer

Returns:

A reference to the output buffer

Protected Functions

inline _OutputVectorDataWrapperCommon(T *p, dvModuleData m, const std::string &n)
class _RateLimiter

Public Functions

inline _RateLimiter(int32_t messageRate, int32_t perMilliseconds)
inline bool pass()

Private Members

float rate
float allowanceLimit
float allowance
std::chrono::time_point<std::chrono::steady_clock> last_check
template<typename T>
class _RuntimeInputCommon
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/data/wrappers.hpp>

Base class for a runtime input definition. There are template-specialized subclasses of this, providing convenience function interfaces for the most common, known types. There is also a generic, templated subclass RuntimeInput which does not add any more convenience functions over this common subclass, and can be used for the generic case

Subclassed by dv::_RuntimeVectorInputCommon< dv::BoundingBoxPacket, dv::BoundingBox >, dv::_RuntimeVectorInputCommon< dv::EventPacket, dv::Event >, dv::RuntimeInput< T >, dv::_RuntimeVectorInputCommon< T, U >

Public Functions

inline const InputDataWrapper<T> data() const

Get data from an input

Returns:

An input wrapper of the desired type, allowing data access

inline bool isConnected() const

Returns true, if this optional input is actually connected to an output of another module

Returns:

true, if this input is connected

inline const dv::Config::Node infoNode() const

Returns an info node about the specified input. Can be used to determine dimensions of an input/output

Returns:

A node that contains the specified inputs information, such as “sizeX” or “sizeY”

inline const std::string getOriginDescription() const

Returns the description of the origin of the data

Returns:

the description of the origin of the data

Protected Functions

inline std::shared_ptr<const T> getUnwrapped() const

Fetches available data at the input and returns a shared_ptr to it. Also casts the shared_ptr to this particular input type.

Returns:

A shared_ptr of the input data type to the latest received data

inline _RuntimeInputCommon(const std::string &name, dvModuleData moduleData)

This constructor is called by the child classes in their initialization

Parameters:
  • name – The name of this input

  • moduleData – Pointer to the dv moduleData struct

Private Members

std::string name_
dvModuleData moduleData_
template<typename T>
class _RuntimeOutputCommon
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/data/wrappers.hpp>

Base class for a runtime output. This class acts as the base for various template-specialized sub classes which provide convenience functions for outputting data in their respective data types. There is a templated generic subclass RuntimeOutput<T> that can be used for the generic case

Template Parameters:

T – The flatbuffers type of the output data

Subclassed by dv::_RuntimeVectorOutputCommon< dv::BoundingBoxPacket, dv::BoundingBox >, dv::_RuntimeVectorOutputCommon< dv::EventPacket, dv::Event >, dv::RuntimeOutput< T >, dv::_RuntimeVectorOutputCommon< T, U >

Public Functions

inline void setup(const std::string &originDescription)

Sets up the output. Has to be called in the constructor of the module.

Parameters:

originDescription – A description of the original creator of the data

template<typename U>
inline void setup(const RuntimeInput<U> &input)

Sets this output up with the same parameters as the supplied input.

Parameters:

input – An input to copy the information from

template<typename U, typename TT>
inline void setup(const RuntimeVectorInput<U, TT> &input)

Sets this event output up with the same parameters as the supplied vector input.

Parameters:

input – A vector input to copy the information from

inline OutputDataWrapper<T> data()

Returns a writeable output wrapper for the given type of this output. Allocates new output memory if necessary. The output can be committed by calling commit on the returned object.

Returns:

A wrapper to allocated output memory to write to

inline void operator<<(commitType)

Convenience shortcut to commit the data on this output directly

inline dv::Config::Node infoNode()

Returns an info node about the specified output, can be used to set output information.

Returns:

A node that can contain output information, such as “sizeX” or “sizeY”

inline const dv::Config::Node infoNode() const

Returns an info node about the specified output, can be used to set output information.

Returns:

A node that can contain output information, such as “sizeX” or “sizeY”

inline const std::string getOriginDescription() const

Returns the description of the origin of the data

Returns:

the description of the origin of the data

Protected Functions

inline T *allocateUnwrapped()

Allocates a new instance of the datatype of this output and returns a raw pointer to the allocated memory. If there was memory allocated before (This function has been called before) but the output never has been commited, a raw pointer to the previously allocated memory gets returned.

Returns:

A raw pointer to the allocated memory

inline void createSourceAttribute(const std::string &originDescription)

Creates the output information attribute in the config tree. The source attribute is a string containing information about the original generator of the data

Parameters:

originDescription – a string containing information about the original generator of the data

inline void createSizeAttributes(int sizeX, int sizeY)

Adds size information attributes to the output info node

Parameters:
  • sizeX – The width dimension of the output

  • sizeY – The height dimension of the output

inline _RuntimeOutputCommon(const std::string &name, dvModuleData moduleData)

This constructor is called by the subclasses constructors

Parameters:
  • name – The configuration name of the module this output belongs to

  • moduleData – A pointer to the dv moduleData struct

Protected Attributes

std::string name_
dvModuleData moduleData_
template<typename T, typename U>
class _RuntimeVectorInputCommon : public dv::_RuntimeInputCommon<T>

Subclassed by dv::RuntimeVectorInput< T, U >

Public Functions

inline const InputVectorDataWrapper<T, U> data() const

Get data from a vector input

Returns:

An input wrapper of the desired type, allowing data access

Protected Functions

inline _RuntimeVectorInputCommon(const std::string &name, dvModuleData moduleData)
template<typename T, typename U>
class _RuntimeVectorOutputCommon : public dv::_RuntimeOutputCommon<T>

Subclassed by dv::RuntimeVectorOutput< T, U >

Public Functions

inline OutputVectorDataWrapper<T, U> data()

Returns a writeable output wrapper for the given type of this output. Allocates new output memory if necessary. The output can be committed by calling commit on the returned object.

Returns:

A wrapper to allocated output memory to write to

template<typename K>
inline _RuntimeVectorOutputCommon &operator<<(const K &rhs)

Convenience shortcut to commit the data on this output directly This gets resolved to one of the various << functions of the data wrapper.

inline void operator<<(commitType)

Convenience shortcut to commit the data on this output directly

Protected Functions

inline _RuntimeVectorOutputCommon(const std::string &name, dvModuleData moduleData)
template<AttributeType T>
struct AttributeRangeGenerator

Public Types

using rangeType = typename AttributeTypeGenerator<T>::type
template<>
struct AttributeRangeGenerator<AttributeType::BOOL>

Public Types

using rangeType = int32_t
template<>
struct AttributeRangeGenerator<AttributeType::STRING>

Public Types

using rangeType = int32_t
template<AttributeType T>
struct AttributeRanges

Public Types

using rangeType = typename AttributeRangeGenerator<T>::rangeType

Public Functions

inline AttributeRanges(rangeType minVal, rangeType maxVal)
inline AttributeRanges(const dvConfigAttributeRanges ranges)
inline dvConfigAttributeRanges getCStruct() const

Public Members

rangeType min
rangeType max
template<>
struct AttributeRanges<AttributeType::BOOL>

Public Types

using rangeType = typename AttributeRangeGenerator<AttributeType::BOOL>::rangeType

Public Functions

inline AttributeRanges()
inline AttributeRanges(const dvConfigAttributeRanges ranges)
inline dvConfigAttributeRanges getCStruct() const

Public Members

rangeType min
rangeType max
template<typename T>
struct AttributeTypeConverter
template<>
struct AttributeTypeConverter<bool>

Public Static Attributes

static constexpr AttributeType type = AttributeType::BOOL
template<>
struct AttributeTypeConverter<double>

Public Static Attributes

static constexpr AttributeType type = AttributeType::DOUBLE
template<>
struct AttributeTypeConverter<float>

Public Static Attributes

static constexpr AttributeType type = AttributeType::FLOAT
template<>
struct AttributeTypeConverter<int32_t>

Public Static Attributes

static constexpr AttributeType type = AttributeType::INT
template<>
struct AttributeTypeConverter<int64_t>

Public Static Attributes

static constexpr AttributeType type = AttributeType::LONG
template<>
struct AttributeTypeConverter<std::string>

Public Static Attributes

static constexpr AttributeType type = AttributeType::STRING
template<AttributeType T>
struct AttributeTypeGenerator
template<>
struct AttributeTypeGenerator<AttributeType::BOOL>

Public Types

using type = bool

Public Static Attributes

static enum dvConfigAttributeType underlyingType = DVCFG_TYPE_BOOL
template<>
struct AttributeTypeGenerator<AttributeType::DOUBLE>

Public Types

using type = double

Public Static Attributes

static enum dvConfigAttributeType underlyingType = DVCFG_TYPE_DOUBLE
template<>
struct AttributeTypeGenerator<AttributeType::FLOAT>

Public Types

using type = float

Public Static Attributes

static enum dvConfigAttributeType underlyingType = DVCFG_TYPE_FLOAT
template<>
struct AttributeTypeGenerator<AttributeType::INT>

Public Types

using type = int32_t

Public Static Attributes

static enum dvConfigAttributeType underlyingType = DVCFG_TYPE_INT
template<>
struct AttributeTypeGenerator<AttributeType::LONG>

Public Types

using type = int64_t

Public Static Attributes

static enum dvConfigAttributeType underlyingType = DVCFG_TYPE_LONG
template<>
struct AttributeTypeGenerator<AttributeType::STRING>

Public Types

using type = std::string

Public Static Attributes

static enum dvConfigAttributeType underlyingType = DVCFG_TYPE_STRING
template<AttributeType T>
struct AttributeValue

Public Types

using valueType = typename AttributeTypeGenerator<T>::type

Public Functions

inline AttributeValue(valueType v)
inline AttributeValue(const dvConfigAttributeValue v)
inline dvConfigAttributeValue getCUnion() const

Public Members

valueType value
template<>
struct AttributeValue<AttributeType::STRING>

Public Functions

inline AttributeValue(const std::string_view v)
inline AttributeValue(const dvConfigAttributeValue v)
inline dvConfigAttributeValue getCUnion() const
struct commitType
class ConfigOption
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/config.hpp>

Non template class for a config option. Has a type independent unique pointer that points to the actual (templated) config object. Private constructor. Should only be used with static factory function.

Public Functions

inline void setRateLimit(int32_t messageRate, int32_t perMilliseconds)
inline dv::Config::AttributeType getType() const

Returns the type of this ConfigOption.

Returns:

the configuration’s type.

template<dv::Config::AttributeType T>
inline _ConfigOption<T> &getConfigObject()

Returns the underlying config object, casted to the specified configVariant. The config variant can be read out with the getVariant method.

Template Parameters:

T – The config variant to be casted to.

Returns:

The underlying _ConfigObject with the configuration data

template<dv::Config::AttributeType T>
inline const _ConfigOption<T> &getConfigObject() const

Returns the underlying config object, casted to the specified configVariant. The config variant can be read out with the getVariant method.

Template Parameters:

T – The config variant to be casted to.

Returns:

The underlying _ConfigObject with the configuration data

template<dv::Config::AttributeType T>
inline const dv::Config::AttributeTypeGenerator<T>::type &get() const

Returns the current value of this config option. Needs a template paramenter of the type dv::ConfigVariant::* to determine what type of config parameter to return.

Template Parameters:

T – The config variant type

Returns:

A simple value (long, string etc) that is the current value of the config option

template<dv::Config::AttributeType T>
inline void set(const typename dv::Config::AttributeTypeGenerator<T>::type &value, bool force)

Updates the current value of this config option. Needs a template paramenter of the type dv::ConfigVariant::* to determine what type of config parameter to return. The change is propagated to the configuration tree.

Template Parameters:

T – The config variant type

Parameters:
  • value – A simple value (long, string etc) to update the config option with

  • force – Force an update of the variable (useful for statistics variables)

inline void createAttribute(dv::Config::Node moduleNode, const std::string &fullKey)

Creates a dvConfig Attribute in the dv config tree for the object.

Parameters:
  • moduleNode – the module’s configuration node.

  • fullKey – the key under which the attribute is to be stored. Forward slashes (/) can be used to get sub-nodes.

inline void updateValue()

Updates the current value of the ConfigOption based on the value that is present in the dv config tree.

Public Static Functions

static inline ConfigOption boolOption(const std::string &description, bool defaultValue = false, bool readOnly = false)

Factory function. Creates boolean option (checkbox).

Parameters:
  • description – A description that describes the purpose of this option

  • defaultValue – The default value of the option, defaults to false

  • readOnly – If the option is read-only, defaults to false

Returns:

A ConfigOption Object

static inline ConfigOption buttonOption(const std::string &description, const std::string &buttonLabel)

Factory function. Creates a button option. A button is a boolean that gets set when clicked. The button gets disabled as long as the boolean value is not reset

Parameters:
  • description – A description that describes the purpose of this option

  • defaultValue – The default value of the option

Returns:

A ConfigOption Object

static inline ConfigOption intOption(const std::string &description, int32_t defaultValue, int32_t minValue, int32_t maxValue)

Factory function. Creates a integer config option (32 bit).

Parameters:
  • description – A description that describes the purpose of this option

  • defaultValue – The default value that this option shall have

  • minValue – The min value a user can choose for this option

  • maxValue – The max value a user can choose for this option

Returns:

A ConfigOption Object

static inline ConfigOption intOption(const std::string &description, int32_t defaultValue)

Factory function. Creates a integer config option (32 bit).

Parameters:
  • description – A description that describes the purpose of this option

  • defaultValue – The default value that this option shall have

Returns:

A ConfigOption Object

static inline ConfigOption longOption(const std::string &description, int64_t defaultValue, int64_t minValue, int64_t maxValue)

Factory function. Creates a long integer config option (64 bit).

Parameters:
  • description – A description that describes the purpose of this option

  • defaultValue – The default value that this option shall have

  • minValue – The min value a user can choose for this option

  • maxValue – The max value a user can choose for this option

Returns:

A ConfigOption Object

static inline ConfigOption longOption(const std::string &description, int64_t defaultValue)

Factory function. Creates a long integer config option (64 bit).

Parameters:
  • description – A description that describes the purpose of this option

  • defaultValue – The default value that this option shall have

Returns:

A ConfigOption Object

static inline ConfigOption floatOption(const std::string &description, float defaultValue, float minValue, float maxValue)

Factory function. Creates a single-precision floating point config option.

Parameters:
  • description – A description that describes the purpose of this option

  • defaultValue – The default value that this option shall have

  • minValue – The min value a user can choose for this option

  • maxValue – The max value a user can choose for this option

Returns:

A ConfigOption Object

static inline ConfigOption floatOption(const std::string &description, float defaultValue)

Factory function. Creates a single-precision floating point config option.

Parameters:
  • description – A description that describes the purpose of this option

  • defaultValue – The default value that this option shall have

Returns:

A ConfigOption Object

static inline ConfigOption doubleOption(const std::string &description, double defaultValue, double minValue, double maxValue)

Factory function. Creates a double-precision floating point config option.

Parameters:
  • description – A description that describes the purpose of this option

  • defaultValue – The default value that this option shall have

  • minValue – The min value a user can choose for this option

  • maxValue – The max value a user can choose for this option

Returns:

A ConfigOption Object

static inline ConfigOption doubleOption(const std::string &description, double defaultValue)

Factory function. Creates a double-precision floating point config option.

Parameters:
  • description – A description that describes the purpose of this option

  • defaultValue – The default value that this option shall have

Returns:

A ConfigOption Object

static inline ConfigOption stringOption(const std::string &description, const std::string &defaultValue)

Factory function. Creates a string config option.

Parameters:
  • description – A description that describes the purpose of this option

  • defaultValue – The default value that this option shall have

Returns:

A ConfigOption Object

static inline ConfigOption stringOption(const std::string &description, const std::string &defaultValue, int32_t minLength, int32_t maxLength)

Factory function. Creates a string config option.

Parameters:
  • description – A description that describes the purpose of this option

  • defaultValue – The default value that this option shall have

  • minValue – The min string length a user can input

  • maxValue – The max string length a user can input

Returns:

A ConfigOption Object

static inline ConfigOption listOption(const std::string &description, size_t defaultChoice, const std::vector<std::string> &choices, bool allowMultipleSelection = false)

Factory function. Creates a list config option (list of strings).

Parameters:
  • description – A description that describes the purpose of this option

  • defaultChoice – The index of the default choice, taken from the subsequent vector

  • choices – Vector of possible choices

  • allowMultipleSelection – wether to allow selecting multiple options at the same time

Returns:

A ConfigOption Object

static inline ConfigOption listOption(const std::string &description, const std::string &defaultChoice, const std::vector<std::string> &choices, bool allowMultipleSelection = false)

Factory function. Creates a list config option (list of strings).

Parameters:
  • description – A description that describes the purpose of this option

  • defaultChoice – The the string of the default choice

  • choices – Vector of possible choices

  • allowMultipleSelection – wether to allow selecting multiple options at the same time

Returns:

A ConfigOption Object

static inline ConfigOption fileOpenOption(const std::string &description)

Factory function. Creates a file open config option.

Parameters:

description – A description that describes the purpose of this option

Returns:

A ConfigOption Object

static inline ConfigOption fileOpenOption(const std::string &description, const std::string &allowedExtensions)

Factory function. Creates a file open config option.

Parameters:
  • description – A description that describes the purpose of this option

  • allowedExtensions – The allowed extensions of the file to be opened

Returns:

A ConfigOption Object

static inline ConfigOption fileOpenOption(const std::string &description, const std::string &defaultValue, const std::string &allowedExtensions)

Factory function. Creates a file open config option.

Parameters:
  • description – A description that describes the purpose of this option

  • defaultValue – The default path of the file

  • allowedExtensions – The allowed extensions of the file to be opened

Returns:

A ConfigOption Object

static inline ConfigOption fileSaveOption(const std::string &description)

Factory function. Creates a file save config option.

Parameters:

description – A description that describes the purpose of this option

Returns:

A ConfigOption Object

static inline ConfigOption fileSaveOption(const std::string &description, const std::string &allowedExtensions)

Factory function. Creates a file save config option.

Parameters:
  • description – A description that describes the purpose of this option

  • allowedExtensions – The allowed extensions of the file to be saved

Returns:

A ConfigOption Object

static inline ConfigOption fileSaveOption(const std::string &description, const std::string &defaultValue, const std::string &allowedExtensions)

Factory function. Creates a file save config option.

Parameters:
  • description – A description that describes the purpose of this option

  • defaultValue – The default path of the file

  • allowedExtensions – The allowed extensions of the file to be saved

Returns:

A ConfigOption Object

static inline ConfigOption directoryOption(const std::string &description)

Factory function. Creates directory choose option

Parameters:

description – A description that describes the purpose of this option

Returns:

A ConfigOption Object

static inline ConfigOption directoryOption(const std::string &description, const std::string &defaultValue)

Factory function. Creates directory choose option

Parameters:
  • description – A description that describes the purpose of this option

  • defaultValue – The default path of the directory

Returns:

A ConfigOption Object

static inline ConfigOption statisticOption(const std::string &description)

Factory function. Creates read-only statistics option.

Parameters:

description – A description that describes the purpose of this option

Returns:

A ConfigOption Object

Private Functions

inline ConfigOption(dv::unique_ptr_void configOption_, dv::Config::AttributeType type_)

Private constructor Takes shared_ptr to templated _ConfigOption as well as the variant.

Parameters:
  • configOption_ – A unique_ptr to an instantiated _ConfigOption

  • type_ – The config variant of the passed option

inline void setNodeAttrLink(dv::Config::Node moduleNode, const std::string &fullKey)

Set link to actual node and attribute for configuration tree operations. Must be set for tree operations (create, update etc.) to work.

Parameters:
  • moduleNode – the module’s configuration node.

  • fullKey – the key under which the attribute is to be stored.

template<dv::Config::AttributeType T>
inline void _updateValue()

Updates the current value of the ConfigOption based on the value that is present in the dv config tree.

Private Members

dv::unique_ptr_void configOption
dv::Config::AttributeType type
dv::Config::Node node
std::string key
std::unique_ptr<_RateLimiter> rateLimit

Private Static Functions

template<dv::Config::AttributeType T>
static inline ConfigOption getOption(const std::string &description, typename dv::Config::AttributeTypeGenerator<T>::type defaultValue, const _ConfigAttributes<T> &attributes, dv::Config::AttributeFlags flags, bool updateReadOnly = false)

Private base factory method. Used as a base for all the config factories defined Creates a new ConfigOption of the requested type. Works by first instantiating a _ConfigOption with the right templated variant, then creating a unique_ptr and creating a ConfigOption to return.

Returns:

template<class T>
class cvectorConstProxy

Subclassed by dv::_InputVectorDataWrapperCommon< dv::BoundingBoxPacket, dv::BoundingBox >, dv::_InputVectorDataWrapperCommon< dv::EventPacket, dv::Event >, dv::_InputVectorDataWrapperCommon< dv::IMUPacket, dv::IMU >, dv::_InputVectorDataWrapperCommon< dv::TriggerPacket, dv::Trigger >, dv::cvectorProxy< dv::BoundingBox >, dv::cvectorProxy< dv::Event >, dv::cvectorProxy< dv::IMU >, dv::cvectorProxy< dv::Trigger >, dv::cvectorProxy< U >, dv::cvectorProxy< T >

Public Types

using value_type = typename cvector<T>::value_type
using const_value_type = typename cvector<T>::const_value_type
using pointer = typename cvector<T>::pointer
using const_pointer = typename cvector<T>::const_pointer
using reference = typename cvector<T>::reference
using const_reference = typename cvector<T>::const_reference
using size_type = typename cvector<T>::size_type
using difference_type = typename cvector<T>::difference_type
using iterator = typename cvector<T>::iterator
using const_iterator = typename cvector<T>::const_iterator
using reverse_iterator = typename cvector<T>::reverse_iterator
using const_reverse_iterator = typename cvector<T>::const_reverse_iterator

Public Functions

inline cvectorConstProxy(const cvector<T> *vec)
~cvectorConstProxy() = default
inline cvectorConstProxy(const cvectorConstProxy &vec)
cvectorConstProxy(cvectorConstProxy &&vec) = delete
cvectorConstProxy &operator=(const cvectorConstProxy &rhs) = delete
cvectorConstProxy &operator=(cvectorConstProxy &&rhs) = delete
inline bool operator==(const cvectorConstProxy &rhs) const noexcept
inline bool operator!=(const cvectorConstProxy &rhs) const noexcept
inline bool operator<(const cvectorConstProxy &rhs) const noexcept
inline bool operator>(const cvectorConstProxy &rhs) const noexcept
inline bool operator<=(const cvectorConstProxy &rhs) const noexcept
inline bool operator>=(const cvectorConstProxy &rhs) const noexcept
inline bool operator==(const cvector<value_type> &rhs) const noexcept
inline bool operator!=(const cvector<value_type> &rhs) const noexcept
inline bool operator<(const cvector<value_type> &rhs) const noexcept
inline bool operator>(const cvector<value_type> &rhs) const noexcept
inline bool operator<=(const cvector<value_type> &rhs) const noexcept
inline bool operator>=(const cvector<value_type> &rhs) const noexcept
inline bool operator==(const std::vector<value_type> &rhs) const noexcept
inline bool operator!=(const std::vector<value_type> &rhs) const noexcept
inline bool operator<(const std::vector<value_type> &rhs) const noexcept
inline bool operator>(const std::vector<value_type> &rhs) const noexcept
inline bool operator<=(const std::vector<value_type> &rhs) const noexcept
inline bool operator>=(const std::vector<value_type> &rhs) const noexcept
inline const_pointer data() const noexcept
inline size_type size() const noexcept
inline size_type capacity() const noexcept
inline size_type max_size() const noexcept
inline bool empty() const noexcept
template<typename INT>
inline const_reference operator[](const INT index) const
template<typename INT>
inline const_reference at(const INT index) const
inline explicit operator std::vector() const
inline const_reference front() const
inline const_reference back() const
template<typename U>
inline bool contains(const U &item) const
template<typename Pred>
inline bool containsIf(Pred predicate) const
inline const_iterator begin() const noexcept
inline const_iterator end() const noexcept
inline const_iterator cbegin() const noexcept
inline const_iterator cend() const noexcept
inline const_reverse_iterator rbegin() const noexcept
inline const_reverse_iterator rend() const noexcept
inline const_reverse_iterator crbegin() const noexcept
inline const_reverse_iterator crend() const noexcept
inline cvector<value_type> operator+(const cvectorConstProxy &rhs) const
inline cvector<value_type> operator+(const cvector<value_type> &rhs) const
inline cvector<value_type> operator+(const std::vector<value_type> &rhs) const
inline cvector<value_type> operator+(const_reference value) const
inline cvector<value_type> operator+(std::initializer_list<value_type> rhs_list) const

Public Static Attributes

static constexpr size_type npos = {cvector<T>::npos}

Protected Attributes

cvector<T> *mVectorPtr

Private Static Attributes

static cvector<T> EMPTY_VECTOR = {}

Friends

inline friend bool operator==(const cvector<value_type> &lhs, const cvectorConstProxy &rhs) noexcept
inline friend bool operator!=(const cvector<value_type> &lhs, const cvectorConstProxy &rhs) noexcept
inline friend bool operator<(const cvector<value_type> &lhs, const cvectorConstProxy &rhs) noexcept
inline friend bool operator>(const cvector<value_type> &lhs, const cvectorConstProxy &rhs) noexcept
inline friend bool operator<=(const cvector<value_type> &lhs, const cvectorConstProxy &rhs) noexcept
inline friend bool operator>=(const cvector<value_type> &lhs, const cvectorConstProxy &rhs) noexcept
inline friend bool operator==(const std::vector<value_type> &lhs, const cvectorConstProxy &rhs) noexcept
inline friend bool operator!=(const std::vector<value_type> &lhs, const cvectorConstProxy &rhs) noexcept
inline friend bool operator<(const std::vector<value_type> &lhs, const cvectorConstProxy &rhs) noexcept
inline friend bool operator>(const std::vector<value_type> &lhs, const cvectorConstProxy &rhs) noexcept
inline friend bool operator<=(const std::vector<value_type> &lhs, const cvectorConstProxy &rhs) noexcept
inline friend bool operator>=(const std::vector<value_type> &lhs, const cvectorConstProxy &rhs) noexcept
inline friend cvector<value_type> operator+(const cvector<value_type> &lhs, const cvectorConstProxy &rhs)
inline friend cvector<value_type> operator+(const std::vector<value_type> &lhs, const cvectorConstProxy &rhs)
inline friend cvector<value_type> operator+(const_reference value, const cvectorConstProxy &rhs)
inline friend cvector<value_type> operator+(std::initializer_list<value_type> lhs_list, const cvectorConstProxy &rhs)
template<class T>
class cvectorProxy : public dv::cvectorConstProxy<T>

Subclassed by dv::_OutputVectorDataWrapperCommon< dv::BoundingBoxPacket, dv::BoundingBox >, dv::_OutputVectorDataWrapperCommon< dv::EventPacket, dv::Event >, dv::_OutputVectorDataWrapperCommon< dv::IMUPacket, dv::IMU >, dv::_OutputVectorDataWrapperCommon< dv::TriggerPacket, dv::Trigger >

Public Types

using value_type = typename cvector<T>::value_type
using const_value_type = typename cvector<T>::const_value_type
using pointer = typename cvector<T>::pointer
using const_pointer = typename cvector<T>::const_pointer
using reference = typename cvector<T>::reference
using const_reference = typename cvector<T>::const_reference
using size_type = typename cvector<T>::size_type
using difference_type = typename cvector<T>::difference_type
using iterator = typename cvector<T>::iterator
using const_iterator = typename cvector<T>::const_iterator
using reverse_iterator = typename cvector<T>::reverse_iterator
using const_reverse_iterator = typename cvector<T>::const_reverse_iterator

Public Functions

inline cvectorProxy(cvector<T> *vec)
~cvectorProxy() = default
inline void reassign(cvector<T> *vec)
inline cvectorProxy(const cvectorProxy &vec)
cvectorProxy(cvectorProxy &&vec) = delete
cvectorProxy &operator=(cvectorProxy &&rhs) = delete
inline cvectorProxy &operator=(const cvectorProxy &rhs)
inline cvectorProxy &operator=(const cvector<value_type> &rhs)
inline cvectorProxy &operator=(const std::vector<value_type> &rhs)
inline cvectorProxy &operator=(const_reference value)
inline cvectorProxy &operator=(std::initializer_list<value_type> rhs_list)
inline cvectorProxy &assign(const cvectorProxy &vec, const size_type pos = 0, const size_type count = npos)
inline cvectorProxy &assign(const cvector<value_type> &vec, const size_type pos = 0, const size_type count = npos)
inline cvectorProxy &assign(const std::vector<value_type> &vec, const size_type pos = 0, const size_type count = npos)
inline cvectorProxy &assign(const_pointer vec, const size_type vecLength, const size_type pos = 0, const size_type count = npos)
inline cvectorProxy &assign(const_reference value)
inline cvectorProxy &assign(const size_type count, const_reference value)
template<typename InputIt, std::enable_if_t<std::is_base_of_v<std::input_iterator_tag, typename std::iterator_traits<InputIt>::iterator_category>, bool> = true>
inline cvectorProxy &assign(InputIt first, InputIt last)
inline cvectorProxy &assign(std::initializer_list<value_type> init_list)
inline pointer data() noexcept
inline void resize(const size_type newSize)
inline void resize(const size_type newSize, const_reference value)
inline void reserve(const size_type minCapacity)
inline void shrink_to_fit()
template<typename INT>
inline reference operator[](const INT index)
template<typename INT>
inline reference at(const INT index)
inline reference front()
inline reference back()
inline void push_back(const_reference value)
inline void push_back(value_type &&value)
template<class ...Args>
inline reference emplace_back(Args&&... args)
inline void pop_back()
inline void clear() noexcept
inline void swap(cvectorProxy &rhs) noexcept
inline void swap(cvector<value_type> &rhs) noexcept
inline void sortUnique()
template<typename Compare>
inline void sortUnique(Compare comp)
template<typename U>
inline size_type remove(const U &item)
template<typename Pred>
inline size_type removeIf(Pred predicate)
inline iterator begin() noexcept
inline iterator end() noexcept
inline reverse_iterator rbegin() noexcept
inline reverse_iterator rend() noexcept
inline iterator insert(const_iterator pos, const_reference value)
inline iterator insert(const_iterator pos, value_type &&value)
inline iterator insert(const_iterator pos, const size_type count, const_reference value)
template<typename InputIt, std::enable_if_t<std::is_base_of_v<std::input_iterator_tag, typename std::iterator_traits<InputIt>::iterator_category>, bool> = true>
inline iterator insert(const_iterator pos, InputIt first, InputIt last)
inline iterator insert(const_iterator pos, std::initializer_list<value_type> init_list)
template<class ...Args>
inline iterator emplace(const_iterator pos, Args&&... args)
inline iterator erase(const_iterator pos)
inline iterator erase(const_iterator first, const_iterator last)
inline cvectorProxy &append(const cvectorProxy &vec, const size_type pos = 0, const size_type count = npos)
inline cvectorProxy &append(const cvector<value_type> &vec, const size_type pos = 0, const size_type count = npos)
inline cvectorProxy &append(const std::vector<value_type> &vec, const size_type pos = 0, const size_type count = npos)
inline cvectorProxy &append(const_pointer vec, const size_type vecLength, const size_type pos = 0, const size_type count = npos)
inline cvectorProxy &append(const_reference value)
inline cvectorProxy &append(const size_type count, const_reference value)
template<typename InputIt, std::enable_if_t<std::is_base_of_v<std::input_iterator_tag, typename std::iterator_traits<InputIt>::iterator_category>, bool> = true>
inline cvectorProxy &append(InputIt first, InputIt last)
inline cvectorProxy &append(std::initializer_list<value_type> init_list)
inline cvectorProxy &operator+=(const cvectorProxy &rhs)
inline cvectorProxy &operator+=(const cvector<value_type> &rhs)
inline cvectorProxy &operator+=(const std::vector<value_type> &rhs)
inline cvectorProxy &operator+=(const_reference value)
inline cvectorProxy &operator+=(std::initializer_list<value_type> rhs_list)

Public Static Attributes

static constexpr size_type npos = {cvector<T>::npos}
class CycleTime : public dv::statistics::Stats<float>
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/stats.hpp>

Class which provides the functionality to measure statistics for cycle time related data.

Public Functions

CycleTime() = delete

Deleted default constructor

inline CycleTime(const dv::Config::Node node, const std::string_view name)

Constructor which selects the default window size for the underlying statistics.

The data will be published to the node

node/name/cycleTime/ if a name is specified, or `node/cycleTime/ if none is specified.

See also

Stats.

See also

Stats

Parameters:
  • node – Parent node relative to which the node for the measured stats should be published

  • name – Name of the node

inline CycleTime(const uint32_t windowSize, const dv::Config::Node node, const std::string_view name)

Constructor which applies the a custom window size for the underlying statistics.

The data will be published to the node

node/name/cycleTime/ if a name is specified, or `node/cycleTime/ if none is specified.

See also

Stats.

See also

Stats

Parameters:
  • node – Parent node relative to which the node for the measured stats should be published

  • name – Name of the node

CycleTime(const CycleTime &other) = delete

Copy - Disallow: since node and name are the same, you’d suddenly have two objects feeding data into the configuration backend and overwriting each other. This is not what you want.

CycleTime &operator=(const CycleTime &rhs) = delete
CycleTime(CycleTime &&other) = default

Move

CycleTime &operator=(CycleTime &&rhs) = default
~CycleTime() noexcept = default

Destructor

inline void start() noexcept

Starts a measurement

inline void finish() noexcept

Finishes a measurement and adds it to the underlying statistical accumulators

Private Members

std::chrono::time_point<std::chrono::steady_clock> mStartTime = {std::chrono::steady_clock::now()}
union dvConfigAttributeRange

Public Members

int32_t intRange
int64_t longRange
float floatRange
double doubleRange
int32_t stringRange
struct dvConfigAttributeRanges

Public Members

union dvConfigAttributeRange min
union dvConfigAttributeRange max
union dvConfigAttributeValue

Public Members

bool boolean
int32_t iint
int64_t ilong
float ffloat
double ddouble
char *string
struct dvModuleDataS

Public Members

dvConfigNode moduleNode
void *moduleState
struct dvModuleFunctionsS

Public Members

bool (*const moduleStaticInit)(dvModuleData moduleData)
bool (*const moduleInit)(dvModuleData moduleData)
void (*const moduleRun)(dvModuleData moduleData)
void (*const moduleConfig)(dvModuleData moduleData)
void (*const moduleExit)(dvModuleData moduleData)
struct dvModuleInfoS

Public Members

int32_t version
const char *description
size_t memSize
dvModuleFunctions functions
struct dvType

Public Members

uint32_t id
const char *identifier
const char *description
size_t sizeOfType
dvTypePackFuncPtr pack
dvTypeUnpackFuncPtr unpack
dvTypeConstructPtr construct
dvTypeDestructPtr destruct
dvTypeTimeElementExtractorPtr timeElementExtractor
dvTypeUnpackTimeElementRangeFuncPtr unpackTimeElementRange
struct dvTypedObject

Public Members

uint32_t typeId
size_t objSize
void *obj
struct dvTypeTimeElementExtractor

Public Members

int64_t startTimestamp
int64_t endTimestamp
int64_t numElements
class Helper

Public Static Functions

static inline std::string typeToStringConverter(AttributeType type)
static inline AttributeType stringToTypeConverter(const std::string &typeString)
static inline std::string valueToStringConverter(AttributeType type, union dvConfigAttributeValue value)
static inline union dvConfigAttributeValue stringToValueConverter(AttributeType type, const std::string &valueString)
static inline std::string flagsToStringConverter(int flags)
static inline int stringToFlagsConverter(const std::string &flagsString)
static inline std::string rangesToStringConverter(AttributeType type, struct dvConfigAttributeRanges ranges)
static inline struct dvConfigAttributeRanges stringToRangesConverter(AttributeType type, const std::string &rangesString)
template<typename T>
class InputDataWrapper : public dv::_InputDataWrapperCommon<T>
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/data/wrappers.hpp>

Generic case input data wrapper. Used for all types that do not have a more specific input data wrapper.

Template Parameters:

T – The type of the input data

Public Functions

inline InputDataWrapper(std::shared_ptr<const T> p)
inline const T &operator*() const noexcept
inline const T *operator->() const noexcept
template<>
class InputDataWrapper<dv::Frame> : public dv::_InputDataWrapperCommon<dv::Frame>

Public Functions

inline InputDataWrapper(std::shared_ptr<const dv::Frame> p)
inline dv::FrameFormat format() const noexcept

Returns the dv frame format of the current frame

Returns:

the dv frame format of the current frame

inline int16_t sizeX() const noexcept

The width of the current frame

Returns:

the width of the current frame

inline int16_t sizeY() const noexcept

The height of the current frame

Returns:

the height of the current frame

inline int16_t positionX() const noexcept

Returns the position in x of the region of interest (ROI) of the current frame

Returns:

the x coordinate of the start of the region of interest

inline int16_t positionY() const noexcept

Returns the position in y of the region of interest (ROI) of the current frame

Returns:

the y coordinate of the start of the region of interest

inline int64_t timestamp() const noexcept

Returns the timestamp of the start of exposure for this frame, or whatever closest value is available for this sensor.

Returns:

the timestamp of the start of exposure for this frame

inline dv::Duration exposure() const noexcept

Returns the exposure time of this frame

Returns:

The exposure time of this frame

inline int64_t timestampStartOfExposure() const noexcept

Returns the timestamp of the start of exposure for this frame

Returns:

the timestamp of the start of exposure for this frame

inline int64_t timestampEndOfExposure() const noexcept

Returns the timestamp of the end of exposure for this frame

Returns:

the timestamp of the end of exposure for this frame

inline dv::FrameSource source() const noexcept

Returns the source (creation method) of this frame

Returns:

The source (creation method) of this frame

inline std::unique_ptr<const cv::Mat> getMatPointer() const noexcept

Return a read-only OpenCV Mat representing this frame. It is possible to bypass the read-only restriction on a cv::Mat rather easily by dereferencing it and copy-constructing a new cv::Mat, which will point to the same data because that’s how cv::Mat works. Please don’t do this, it will introduce subtle and terrifying bugs.

Returns:

a read-only OpenCV Mat pointer

inline cv::Mat getMatCopy() const noexcept

Return an OpenCV Mat representing a copy of this frame. Contents are freely modifiable.

Returns:

an OpenCV Mat

inline cv::Size size() const

Returns the size of the current frame. This is generally the same as the input dimension, but depending on the ROI setting, can be less

Returns:

The size of the current frame

inline cv::Point position() const

Returns the position of the ROI of the current frame.

Returns:

The position of the start of the ROI of the current frame

inline cv::Rect roi() const

Returns the rectangle defining the region of interest of the current frame

Returns:

The rectangle describing the region of interest of the current frame

class InputDefinition
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/module_io.hpp>

Definition of a module input. Every input to a module has a unique (for the module) name, as well as a type. The type is the 4-character flatbuffers identifier

Public Functions

inline InputDefinition(const std::string &n, const std::string &t, bool opt = false)

Public Members

std::string name
std::string typeName
bool optional
class InputDefinitionList
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/module_io.hpp>

Vector decorator that gives convenience methods to add various kinds of inputs to a module

Public Functions

inline void addInput(const std::string &name, const std::string &typeIdentifier, bool optional = false)

Adds an input of a generic type to this module.

Parameters:
  • name – The name of this input

  • typeIdentifier – The identifier of the FlatBuffers data type used for this input

  • optional – A flag that describes if this input is optional or not. Optional inputs are not required to be connected for successful module startup.

inline void addEventInput(const std::string &name, bool optional = false)

Adds an event data input to this module.

Parameters:
  • name – The name of the event data input

  • optional – A flag to set this input as optional

inline void addFrameInput(const std::string &name, bool optional = false)

Adds a frame input to this module.

Parameters:
  • name – The name of the frame input

  • optional – A flag to set this input as optional

inline void addIMUInput(const std::string &name, bool optional = false)

Adds an IMU input to this module.

Parameters:
  • name – The name of the IMU input

  • optional – A flag to set this input as optional

inline void addTriggerInput(const std::string &name, bool optional = false)

Adds a trigger input to this module.

Parameters:
  • name – The name of the trigger input

  • optional – A flag to set this input as optional

inline void addBoundingBoxInput(const std::string &name, bool optional = false)

Adds a bounding box input to this module.

Parameters:
  • name – The name of the bounding box input

  • optional – A flag to set this input as optional

inline const std::vector<InputDefinition> &getInputs() const

INTERNAL USE Returns the list of configured input definitions

Returns:

The list of configured input definitions

Private Members

std::vector<InputDefinition> inputs
template<typename T, typename U>
class InputVectorDataWrapper : public dv::_InputVectorDataWrapperCommon<T, U>
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/data/wrappers.hpp>

Generic case input data wrapper for vector-like data (must have a dv::cvector<U> called ‘elements’). Used for all vector types that do not have a more specific input data wrapper.

Template Parameters:
  • T – The type of the vector input data

  • U – The type of the vector input data’s elements

Public Functions

inline InputVectorDataWrapper(std::shared_ptr<const T> p)
inline const T &operator*() const noexcept
inline const T *operator->() const noexcept
template<>
class InputVectorDataWrapper<dv::BoundingBoxPacket, dv::BoundingBox> : public dv::_InputVectorDataWrapperCommon<dv::BoundingBoxPacket, dv::BoundingBox>

Public Functions

inline InputVectorDataWrapper(std::shared_ptr<const dv::BoundingBoxPacket> p)
template<>
class InputVectorDataWrapper<dv::EventPacket, dv::Event> : public dv::_InputVectorDataWrapperCommon<dv::EventPacket, dv::Event>

Public Functions

inline InputVectorDataWrapper(std::shared_ptr<const dv::EventPacket> p)
inline operator dv::EventStore() const noexcept

Conversion operator for dv::EventStore. Provides backwards compatibility, due to dv::EventStore having stricter, explicit constructors now.

Returns:

an EventStore sharing this input EventPacket.

template<>
class InputVectorDataWrapper<dv::IMUPacket, dv::IMU> : public dv::_InputVectorDataWrapperCommon<dv::IMUPacket, dv::IMU>

Public Functions

inline InputVectorDataWrapper(std::shared_ptr<const IMUPacket> p)
template<>
class InputVectorDataWrapper<dv::TriggerPacket, dv::Trigger> : public dv::_InputVectorDataWrapperCommon<dv::TriggerPacket, dv::Trigger>

Public Functions

inline InputVectorDataWrapper(std::shared_ptr<const dv::TriggerPacket> p)
struct logEndType
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/log.hpp>

DV custom log end type. Can be piped into the log to commit it. Eg. log.info << "Hello " << "world" << dv::logEnd.

class Logger
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/log.hpp>

Logger class. This class provides logging streams for different log levels to log to.

Public Members

LogStream<dv::logLevel::DEBUG> debug
LogStream<dv::logLevel::INFO> info
LogStream<dv::logLevel::WARNING> warning
LogStream<dv::logLevel::ERROR> error
template<dv::logLevel L>
class LogStream
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/log.hpp>

LogStream class. To be instantiated only by dv::Logger. Handles the actual logging and provides functions to stream logging data in as well as to format logging strings.

Template Parameters:

L – The log level for which this stream should be configured.

Public Functions

template<class T>
inline void operator()(const T &val)

Logs the given argument value.

Template Parameters:

T – the type of the argument value

Parameters:

val – the value to be logged

template<class T>
inline LogStream &operator<<(const T &val)

Appends the given argument value to the current log message. To commit a log message (write it out and flush), one can stream in dv::logEnd or std::endl.

Template Parameters:

T – The type of the value to be appended to the log

Parameters:

val – The value to be appended to the log

Returns:

A reference to the stream, to stream in further values

inline LogStream &operator<<(std::ostream &(*)(std::ostream&))

Commits a log message upon reception of an object of the type of std::endl. Committing a message means writing it out and flushing the buffer.

Returns:

a reference to the log stream for the reception of further values to be logged.

inline LogStream &operator<<(logEndType)

Commits a log message upon reception of dv::logEnd. Committing a message means writing it out and flushing the buffer.

Returns:

a reference to the log stream for the reception of further values to be logged.

template<class T>
inline void write(const T &val)

Appends the given argument value to the current log message. To commit a log message (write it out and flush), one can use the function commit()

Template Parameters:

T – The type of the value to be appended to the log

Parameters:

val – The value to be appended to the log

inline void commit()

Commits the current log message. Committing means writing the message out and flushing the buffer.

inline void flush()

Flushes the buffer without writing out the message.

template<typename S, typename ...Args>
inline void format(const S &format, Args&&... args)

Formats the given format string with the given arguments and writes it to the log. Takes any fmt::format format string.

Template Parameters:
  • S – The format string type

  • Args – The types of the arguments

Parameters:
  • format – The format string

  • args – The argument values to be formatted

Private Members

std::ostringstream stream_

internal string stream that gets used to assemble the log message.

class ModuleBase
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/module_base.hpp>

The dv ModuleBase. Every module shall inherit from this module. The base Module provides the following:

  • Abstraction of the configuration

  • Input / output management

Public Functions

inline ModuleBase()

Base module constructor. The base module constructor initializes the logger and config members of the class, by utilizing the static_thread local pointer to the DV moduleData pointer provided prior to constructrion. This makes sure, that logger and config are available at the time the subclass constructor is called.

virtual ~ModuleBase() = default
ModuleBase(const ModuleBase &m) = delete
ModuleBase(ModuleBase &&m) = delete
ModuleBase &operator=(const ModuleBase &rhs) = delete
ModuleBase &operator=(ModuleBase &&rhs) = delete
inline void configInternal()

Internal method that gets called whenever a config gets changed. It first merges the new config from the config tree into a runtime dictionary (map). After that, a user-provided function is called with which the user has the possibility to copy out config values.

inline virtual void configUpdate()

Virtual function to be implemented by the user. Can be left empty. Called on configuration update, allows more advanced control of how configuration values are updated.

inline void runInternal()

Internal method that gets called to run the main user code. Will call the user-provided run() function and then advance all input data objects by one.

virtual void run() = 0

Virtual function to be implemented by the user. Main function that runs the module and handles data.

Public Members

dvModuleData moduleData

DV low-level module data. Use it to access the low-level DV API.

Logger log

Loggers for the module. Each module has their own to avoid interference.

dv::Config::Node moduleNode

The module configuration node. Use it to access configuration at a lower level than the RuntimeConfigMap.

RuntimeConfig config

Allows easy access to configuration data and is automatically updated with new values on changes in the configuration tree.

RuntimeInputs inputs

Access data inputs and related actions in a type-safe manner.

RuntimeOutputs outputs

Access data outputs and related actions in a type-safe manner.

Public Static Functions

static inline void staticConfigInit(dv::Config::Node moduleNode)

Static config init function. Calles the user provided initConfigOptions function which exists in this class as a static called __getDefaultConfig. It generates the default config and creates the elements for the default config in the DV config tree.

Parameters:

moduleNode – The dvConfig node for which the config should be generated.

static inline void __setStaticModuleData(dvModuleData _moduleData)

INTERNAL USE ONLY Sets the static, thread local module data to be used by a subsequent constructor. This shall only be used prior to

Parameters:

_moduleData – The moduleData param to be used for ModuleBase member initialization upon constructor

static inline void __setStaticGetDefaultConfig(void (*_getDefaultConfig)(RuntimeConfig&))

INTERNAL USE ONLY Sets the __getDefaultConfig static function to the user provided static function that generates the default config map. The reference to this function is used since there is no access to the child - subclass static functions possible from this class. The default config is both generated before instantiation in a call to staticConfigInit as well as in the constructor at runtime.

Parameters:

_getDefaultConfig

Private Static Attributes

static thread_local dvModuleData __moduleData = {nullptr}

moduleData and getDefaultConfig are thread-local to avoid race-conditions between them being initialized here as nullptr and being set in module.hpp. moduleData is different at runtime for each module and must be thread-local. getDefaultConfig is non-atomic and is thread-local for extra safety.

static thread_local void (*__getDefaultConfig)(RuntimeConfig&)
template<class T>
class ModuleStatics
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/module.hpp>

Pure static template class that provides the static C interface functions for the module class T to be exposed to DV. It essentially wraps the the functions of the given C++ module class to the stateless functions and external state of the DV interface. Template parameter T must be a valid DV module, e.g. it has to extend dv::ModuleBase and provide certain static functions. Upon (static) instantiation, the ModuleStatics class performs static (compile time) validations to check if T is a valid module.

Template Parameters:

T – A valid DV Module class that extends dv::ModuleBase

Public Static Functions

static inline bool staticInit(dvModuleData moduleData)

Wrapper for the staticInit DV function. Performs a static call to the configInit<T> function of ModuleBase, which in turn gets the config from the user defined module T. The config then gets parsed and injected as DvConfig nodes.

Parameters:

moduleData – The DV provided moduleData.

Returns:

true if static initialization succeeded, false if it failed.

static inline bool init(dvModuleData moduleData)

Wrapper for the init DV function. Constructs the user defined T module into the module state. Configuration is updated by the ModuleBase constructor.

Parameters:

moduleData – The DV provided moduleData.

Returns:

true if runtime initialization succeeded, false if it failed.

static inline void run(dvModuleData moduleData)

Wrapper for the stateless run DV function. Relays the call to the user defined run function of the user defined T module, which exists as the module state.

Parameters:
  • moduleData – The DV provided moduleData. Used to extract the state.

  • in – The input data to be processed by the module.

  • out – Pointer to the output data.

static inline void exit(dvModuleData moduleData)

Deconstructs the user defined T module in the state by calling its destructor.

Parameters:

moduleData – The DV provided moduleData.

static inline void config(dvModuleData moduleData)

Wrapper for the DV config function. Relays the call to the stateful configUpdate function of the T module. If not overloaded by a the user, the configUpdate function of ModuleBase is called which reads out all config from the DvConfig node and updates a runtime dict of configs.

Parameters:

moduleData – The moduleData provided by DV.

Public Static Attributes

static const struct dvModuleFunctionsS functions = {&ModuleStatics<T>::staticInit, &ModuleStatics<T>::init, &ModuleStatics<T>::run, &ModuleStatics<T>::config, &ModuleStatics<T>::exit}

Static definition of the dvModuleFunctionsS struct. This struct gets filles with the static wrapper functions provided in this class at compile time.

Static definition of the ModuleStatics::functions struct. This struct contains the addresses to all the wrapper functions instantiated to the template module T. This struct is then passed to DV to allow it to access the functionalities inside the module.

Template Parameters:

T – The user defined module. Must inherit from dv::ModuleBase

static const struct dvModuleInfoS info = {1, T::initDescription(), sizeof(T), &functions}

Static definition of the dvModuleInfoS struct. This struct gets filled with the static information from the user provided T module.

Static definition of the info struct, which gets passed to DV. DV reads this and uses the information to call into the module. It gets instantiated with the template parameter T, which has to be a valid module and inherit from dv::ModuleBase.

Template Parameters:

T – The user defined module. Must inherit from dv::ModuleBase

class Node

Public Functions

inline Node(dvConfigNode n)
inline explicit operator dvConfigNode()
inline explicit operator dvConfigNodeConst() const
inline explicit operator bool() const
inline std::string getName() const
inline std::string getPath() const
inline Node getParent() const

This returns a reference to a node, and as such must be carefully mediated with any dvConfigNodeRemoveNode() calls.

Throws:

std::out_of_rangeNode is root and has no parent.

inline std::vector<Node> getChildren() const

This returns a reference to a node, and as such must be carefully mediated with any dvConfigNodeRemoveNode() calls.

inline void addNodeListener(void *userData, dvConfigNodeChangeListener node_changed)
inline void removeNodeListener(void *userData, dvConfigNodeChangeListener node_changed)
inline void removeAllNodeListeners()
inline void addAttributeListener(void *userData, dvConfigAttributeChangeListener attribute_changed)
inline void removeAttributeListener(void *userData, dvConfigAttributeChangeListener attribute_changed)
inline void removeAllAttributeListeners()
inline void removeNode()

Careful, only use if no references exist to this node and all its children. References are created by dv::Config::Tree::getNode(), dv::Config::Node::getRelativeNode(), dv::Config::Node::getParent() and dv::Config::Node::getChildren().

inline void removeSubTree()

Careful, only use if no references exist to this node’s children. References are created by dvConfigTreeGetNode(), dvConfigNodeGetRelativeNode(), dvConfigNodeGetParent() and dvConfigNodeGetChildren().

inline void clearSubTree(bool clearThisNode)
inline void copyTo(dv::Config::Node destination) const
template<AttributeType T>
inline void createAttribute(const std::string &key, const AttributeValue<T> &defaultValue, const AttributeRanges<T> &ranges, AttributeFlags flags, const std::string &description)
inline void createAttribute(const std::string &key, AttributeType type, const dvConfigAttributeValue defaultValue, const dvConfigAttributeRanges &ranges, AttributeFlags flags, const std::string &description)
template<AttributeType T>
inline void removeAttribute(const std::string &key)
inline void removeAttribute(const std::string &key, AttributeType type)
inline void removeAllAttributes()
template<AttributeType T>
inline bool existsAttribute(const std::string &key) const
inline bool existsAttribute(const std::string &key, AttributeType type) const
template<AttributeType T>
inline bool putAttribute(const std::string &key, const AttributeValue<T> &value)
inline bool putAttribute(const std::string &key, AttributeType type, const dvConfigAttributeValue value)
template<AttributeType T>
inline AttributeValue<T> getAttribute(const std::string &key) const
inline dvConfigAttributeValue getAttribute(const std::string &key, AttributeType type) const
template<AttributeType T>
inline bool updateReadOnlyAttribute(const std::string &key, const AttributeValue<T> &value)
inline bool updateReadOnlyAttribute(const std::string &key, AttributeType type, const dvConfigAttributeValue value)
template<AttributeType T>
inline void create(const std::string &key, typename AttributeTypeGenerator<T>::type defaultValue, const AttributeRanges<T> &ranges, AttributeFlags flags, const std::string &description)
template<AttributeType T>
inline void remove(const std::string &key)
template<AttributeType T>
inline bool exists(const std::string &key) const
template<AttributeType T>
inline bool put(const std::string &key, typename AttributeTypeGenerator<T>::type value)
template<AttributeType T>
inline bool updateReadOnly(const std::string &key, typename AttributeTypeGenerator<T>::type value)
template<AttributeType T>
inline AttributeTypeGenerator<T>::type get(const std::string &key) const
inline bool putInt(const std::string &key, int32_t val)
inline bool putLong(const std::string &key, int64_t val)
inline bool putFloat(const std::string &key, float val)
inline bool putDouble(const std::string &key, double val)
inline bool putString(const std::string &key, const std::string &val)
inline bool putBool(const std::string &key, bool val)
inline int32_t getInt(const std::string &key) const
inline int64_t getLong(const std::string &key) const
inline float getFloat(const std::string &key) const
inline double getDouble(const std::string &key) const
inline std::string getString(const std::string &key) const
inline bool getBool(const std::string &key) const
inline bool exportNodeToXML(const std::string &filePath, bool exportAll = false) const
inline bool exportSubTreeToXML(const std::string &filePath, bool exportAll = false) const
inline bool importNodeFromXML(const std::string &filePath, bool strict = true)
inline bool importSubTreeFromXML(const std::string &filePath, bool strict = true)
inline std::string exportNodeToXMLString(bool exportAll = false) const
inline std::string exportSubTreeToXMLString(bool exportAll = false) const
inline bool importNodeFromXMLString(const std::string &xmlString, bool strict = true)
inline bool importSubTreeFromXMLString(const std::string &xmlString, bool strict = true)
inline bool stringToAttributeConverter(const std::string &key, const std::string &type, const std::string &value, bool overrideReadOnly = false)
inline std::vector<std::string> getChildNames() const
inline std::vector<std::string> getAttributeKeys() const
inline AttributeType getAttributeType(const std::string &key) const
template<AttributeType T>
inline AttributeRanges<T> getAttributeRanges(const std::string &key) const
inline struct dvConfigAttributeRanges getAttributeRanges(const std::string &key, AttributeType type) const
template<AttributeType T>
inline int getAttributeFlags(const std::string &key) const
inline int getAttributeFlags(const std::string &key, AttributeType type) const
template<AttributeType T>
inline std::string getAttributeDescription(const std::string &key) const
inline std::string getAttributeDescription(const std::string &key, AttributeType type) const
inline void attributeModifierButton(const std::string &key, const std::string &buttonLabel)
inline void attributeModifierListOptions(const std::string &key, const std::string &listOptions, bool allowMultipleSelections)
inline void attributeModifierFileChooser(const std::string &key, const std::string &typeAndExtensions)
inline void attributeModifierUnit(const std::string &key, const std::string &unitInformation)
inline void attributeModifierPriorityAttributes(const std::string &priorityAttributes)
inline void attributeModifierGUISupport()
inline void attributeBooleanReset(const std::string &key)
inline bool existsRelativeNode(const std::string &nodePath) const
inline Node getRelativeNode(const std::string &relativeNodePath) const

This returns a reference to a node, and as such must be carefully mediated with any dvConfigNodeRemoveNode() calls.

Throws:

std::out_of_range – Invalid relative node path.

inline void attributeUpdaterAdd(const std::string &key, AttributeType type, dvConfigAttributeUpdater updater, void *updaterUserData, bool runOnce = false)
inline void attributeUpdaterRemove(const std::string &key, AttributeType type, dvConfigAttributeUpdater updater, void *updaterUserData)
inline void attributeUpdaterRemoveAll()

Private Members

dvConfigNode node
template<typename T>
class OutputDataWrapper : public dv::_OutputDataWrapperCommon<T>
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/data/wrappers.hpp>

Generic case output data wrapper. Used for all types that do not have a more specific output data wrapper.

Template Parameters:

T – The type of the output data

Public Functions

inline OutputDataWrapper(T *p, dvModuleData m, const std::string &n)
inline T &operator*() noexcept
inline const T &operator*() const noexcept
inline T *operator->() noexcept
inline const T *operator->() const noexcept
template<>
class OutputDataWrapper<dv::Frame> : public dv::_OutputDataWrapperCommon<dv::Frame>

Public Functions

inline OutputDataWrapper(dv::Frame *p, dvModuleData m, const std::string &n, const cv::Size maxSize)
inline OutputDataWrapper &operator=(const _InputDataWrapperCommon<dv::Frame> &rhs)
inline void commit()
inline OutputDataWrapper &operator<<(dv::commitType)
inline void setMat(const cv::Mat &mat)

Copies the supplied OpenCV matrix and sends it to the output.

Parameters:

mat – The matrix to be sent to the output

inline void setMat(cv::Mat &&mat)

Moves the supplied OpenCV matrix and sends it to the output. Do not use it anymore afterwards!

Parameters:

mat – The matrix to be sent to the output

inline OutputDataWrapper<dv::Frame> &operator<<(const cv::Mat &mat)

Copies the supplied OpenCV matrix and sends it to the output.

Parameters:

mat – The matrix to be sent to the output

Returns:

A reference to this output, to send more data

inline OutputDataWrapper<dv::Frame> &operator<<(cv::Mat &&mat)

Moves the supplied OpenCV matrix and sends it to the output.

Parameters:

mat – The matrix to be sent to the output

Returns:

A reference to this output, to send more data

inline dv::FrameFormat format() const noexcept

Returns the dv frame format of the current frame

Returns:

the dv frame format of the current frame

inline int16_t sizeX() const noexcept

The width of the current frame

Returns:

the width of the current frame

inline int16_t sizeY() const noexcept

The height of the current frame

Returns:

the height of the current frame

inline int16_t positionX() const noexcept

Returns the position in x of the region of interest (ROI) of the current frame

Returns:

the x coordinate of the start of the region of interest

inline int16_t positionY() const noexcept

Returns the position in y of the region of interest (ROI) of the current frame

Returns:

the y coordinate of the start of the region of interest

inline int64_t timestamp() const noexcept

Returns the timestamp of this frame (start of exposure or closest)

Returns:

The timestamp of this frame (start of exposure or closest)

inline dv::Duration exposure() const noexcept

Returns the exposure time of this frame

Returns:

The exposure time of this frame

inline int64_t timestampStartOfExposure() const noexcept

Returns the timestamp of the start of exposure for this frame

Returns:

the timestamp of the start of exposure for this frame

inline int64_t timestampEndOfExposure() const noexcept

Returns the timestamp of the end of exposure for this frame

Returns:

the timestamp of the end of exposure for this frame

inline dv::FrameSource source() const noexcept

Returns the source (creation method) of this frame

Returns:

The source (creation method) of this frame

inline void setPosition(int16_t positionX, int16_t positionY) noexcept

Sets the ROI start position for the output frame

inline void setTimestamp(int64_t timestamp) noexcept

Sets the timestamp of the output frame (start of exposure or closest)

inline OutputDataWrapper<dv::Frame> &operator<<(int64_t timestamp)

Sets the timestamp of the current frame on the output (start of exposure or closest).

Parameters:

timestamp – The timestamp to be set

Returns:

A reference to this data, to commit more data

inline void setExposure(const dv::Duration exposure) noexcept

Sets the exposure of this frame

inline void setSource(const dv::FrameSource source) noexcept

Sets the source (creation method) of this frame

inline cv::Size size() const

Returns the size of the current frame. This is generally the same as the input dimension, but depending on the ROI setting, can be less

Returns:

The size of the current frame

inline cv::Point position() const

Returns the position of the ROI of the current frame.

Returns:

The position of the start of the ROI of the current frame

inline cv::Rect roi() const

Returns the rectangle defining the region of interest of the current frame

Returns:

The rectangle describing the region of interest of the current frame

inline void setPosition(const cv::Point &position) noexcept

Sets the position of the ROI of the output frame.

Private Members

cv::Size mMaxSize
class OutputDefinition
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/module_io.hpp>

Definition of a module output. Every output has a unique (for the module) name, as well as a type. THe type is the 4-character flatbuffers identifier.

Public Functions

inline OutputDefinition(const std::string &n, const std::string &t)

Public Members

std::string name
std::string typeName
class OutputDefinitionList
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/module_io.hpp>

Vector decorator that exposes convenience functions to add various types of outputs to a module

Public Functions

inline void addOutput(const std::string &name, const std::string &typeIdentifier)

Adds an output of a generic type to this module.

Parameters:
  • name – The name of this output

  • typeIdentifier – The identifier of the FlatBuffers data type used for this input

inline void addEventOutput(const std::string &name)

Adds an event output to this module.

Parameters:

name – The name of the event output

inline void addFrameOutput(const std::string &name)

Adds a frame output to this module.

Parameters:

name – The name of the frame output

inline void addIMUOutput(const std::string &name)

Adds an IMU output to this module.

Parameters:

name – The name of the IMU output

inline void addTriggerOutput(const std::string &name)

Adds a trigger output to this module.

Parameters:

name – the name of the trigger output

inline void addBoundingBoxOutput(const std::string &name)

Adds a bounding box output to this module.

Parameters:

name – the name of the bounding box output

inline const std::vector<OutputDefinition> &getOutputs() const

INTERNAL USE Returns the list of configured outputs

Returns:

the list of configured outputs

Private Members

std::vector<OutputDefinition> outputs
template<typename T, typename U>
class OutputVectorDataWrapper : public dv::_OutputVectorDataWrapperCommon<T, U>
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/data/wrappers.hpp>

Generic case output vector data wrapper for vector-like data (must have a dv::cvector<U> called ‘elements’). Used for all vector types that do not have a more specific output data wrapper.

Template Parameters:
  • T – The type of the vector output data

  • U – The type of the vector output data’s elements

Public Functions

inline OutputVectorDataWrapper(T *p, dvModuleData m, const std::string &n)
inline T &operator*() noexcept
inline const T &operator*() const noexcept
inline T *operator->() noexcept
inline const T *operator->() const noexcept
template<>
class OutputVectorDataWrapper<dv::BoundingBoxPacket, dv::BoundingBox> : public dv::_OutputVectorDataWrapperCommon<dv::BoundingBoxPacket, dv::BoundingBox>

Public Functions

inline OutputVectorDataWrapper(dv::BoundingBoxPacket *p, dvModuleData m, const std::string &n)
template<>
class OutputVectorDataWrapper<dv::EventPacket, dv::Event> : public dv::_OutputVectorDataWrapperCommon<dv::EventPacket, dv::Event>

Public Functions

inline OutputVectorDataWrapper(dv::EventPacket *p, dvModuleData m, const std::string &n, const cv::Size maxSize)
inline OutputVectorDataWrapper &operator=(const _InputDataWrapperCommon<dv::EventPacket> &rhs)
inline void commit()
inline OutputVectorDataWrapper &operator<<(dv::commitType)

Private Members

cv::Size mMaxSize
template<>
class OutputVectorDataWrapper<dv::IMUPacket, dv::IMU> : public dv::_OutputVectorDataWrapperCommon<dv::IMUPacket, dv::IMU>

Public Functions

inline OutputVectorDataWrapper(IMUPacket *p, dvModuleData m, const std::string &n)
template<>
class OutputVectorDataWrapper<dv::TriggerPacket, dv::Trigger> : public dv::_OutputVectorDataWrapperCommon<dv::TriggerPacket, dv::Trigger>

Public Functions

inline OutputVectorDataWrapper(dv::TriggerPacket *p, dvModuleData m, const std::string &n)
class RuntimeConfig

Public Functions

inline RuntimeConfig(dv::Config::Node mn)
inline void add(const std::string &key, ConfigOption config)

Adds a new configuration option to the set of config options. Configuration options can be generated using the dv::ConfigOption:: ... factory functions. The key is the name of the config option and has to be a name that complies with the specifications of a C variable name.

Parameters:
  • key – The key or name of this config option. Camel case C compliant name

  • config – The config object. Use dv::ConfigOption:: ... factory functions to generate them

inline void setPriorityOptions(const std::vector<std::string> &priorityAttributes)

Sets the priority options for this module. The priority options for the module are the options that are shown to the user in the gui in the sidebar, without having to click on the plus sign. Priority options should be the list of the most important options.

Parameters:

priorityAttributes – The list of the keys of the most important configuration options

template<dv::Config::AttributeType T>
inline const dv::Config::AttributeTypeGenerator<T>::type &get(const std::string &key) const

Returns the current value of this configuration option that is stored under the given key. This is the templated generic function, there are overloaded helper functions available for all supported types

Template Parameters:

T – The AttributeType type of the attribute

Parameters:

key – The name under which this configuration option is stored

Returns:

The currently stored value of this configuration option

template<dv::Config::AttributeType T>
inline void set(const std::string &key, const typename dv::Config::AttributeTypeGenerator<T>::type &value, bool force = false)

Sets the configuration option under the given name to the provided value. Requires the attribute type as a template argument. There are non-templated convenience functions available for all supported attribute types. Note that this function is only guaranteed when called within configUpdate, calling it outside of configUpdate, the behaviour is undefined.

Template Parameters:

T – The type of the attribute

Parameters:
  • key – The name under which this configuration option is stored

  • value – The value to be stored under the config options

  • force – Force an update of the variable (useful for statistics variables)

inline void update()
inline void setBool(const std::string &key, bool value)

Sets the value of a bool config option. Not that this function is only guaranteed when called in the configUpdate function. Calling it outside of it can result in undefined behaviour

Parameters:
  • key – The key of the config option

  • value – The value to be set

inline void setInt(const std::string &key, int32_t value)

Sets the value of an int config option. Not that this function is only guaranteed when called in the configUpdate function. Calling it outside of it can result in undefined behaviour

Parameters:
  • key – The key of the config option

  • value – The value to be set

inline void setLong(const std::string &key, int64_t value)

Sets the value of a long config option. Not that this function is only guaranteed when called in the configUpdate function. Calling it outside of it can result in undefined behaviour

Parameters:
  • key – The key of the config option

  • value – The value to be set

inline void setFloat(const std::string &key, float value)

Sets the value of a float config option. Not that this function is only guaranteed when called in the configUpdate function. Calling it outside of it can result in undefined behaviour

Parameters:
  • key – The key of the config option

  • value – The value to be set

inline void setDouble(const std::string &key, double value)

Sets the value of a double config option. Not that this function is only guaranteed when called in the configUpdate function. Calling it outside of it can result in undefined behaviour

Parameters:
  • key – The key of the config option

  • value – The value to be set

inline void setString(const std::string &key, const std::string &value)

Sets the value of an int config option. Not that this function is only guaranteed when called in the configUpdate function. Calling it outside of it can result in undefined behaviour

Parameters:
  • key – The key of the config option

  • value – The value to be set

inline bool getBool(const std::string &key) const

Returns the value of the config option with the given key. Note that this function will only work if the type of the option is actually bool

Parameters:

key – the key of the option to look up

Returns:

the value of the option

inline int32_t getInt(const std::string &key) const

Returns the value of the config option with the given key. Note that this function will only work if the type of the option is actually int

Parameters:

key – the key of the option to look up

Returns:

the value of the option

inline int64_t getLong(const std::string &key) const

Returns the value of the config option with the given key. Note that this function will only work if the type of the option is actually long

Parameters:

key – the key of the option to look up

Returns:

the value of the option

inline float getFloat(const std::string &key) const

Returns the value of the config option with the given key. Note that this function will only work if the type of the option is actually float

Parameters:

key – the key of the option to look up

Returns:

the value of the option

inline double getDouble(const std::string &key) const

Returns the value of the config option with the given key. Note that this function will only work if the type of the option is actually double

Parameters:

key – the key of the option to look up

Returns:

the value of the option

inline const std::string &getString(const std::string &key) const

Returns the value of the config option with the given key. Note that this function will only work if the type of the option is actually string

Parameters:

key – the key of the option to look up

Returns:

the value of the option

inline void set(const std::string &key, bool value)
inline void set(const std::string &key, int32_t value)
inline void set(const std::string &key, uint32_t value)
inline void set(const std::string &key, int64_t value)
inline void set(const std::string &key, uint64_t value)
inline void set(const std::string &key, float value)
inline void set(const std::string &key, double value)
inline void set(const std::string &key, const std::string &value)
inline void get(const std::string &key, bool &value) const
inline void get(const std::string &key, int32_t &value) const
inline void get(const std::string &key, uint32_t &value) const
inline void get(const std::string &key, int64_t &value) const
inline void get(const std::string &key, uint64_t &value) const
inline void get(const std::string &key, float &value) const
inline void get(const std::string &key, double &value) const
inline void get(const std::string &key, std::string &value) const

Private Members

std::unordered_map<std::string, ConfigOption> configMap
dv::Config::Node moduleNode
template<typename T>
class RuntimeInput : public dv::_RuntimeInputCommon<T>
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/data/wrappers.hpp>

Describes a generic input at runtime. A generic input can be instantiated for any type. This class basically just inherits from _RuntimeInputCommon<T> and does not add any specializations.

Template Parameters:

T – The type of the input data

Public Functions

inline RuntimeInput(const std::string &name, dvModuleData moduleData)
template<>
class RuntimeInput<dv::Frame> : public dv::_RuntimeInputCommon<dv::Frame>

Public Functions

inline RuntimeInput(const std::string &name, dvModuleData moduleData)
inline const InputDataWrapper<dv::Frame> frame() const
inline int sizeX() const
inline int sizeY() const
inline const cv::Size size() const
class RuntimeInputs

Public Functions

inline RuntimeInputs(dvModuleData m)
template<typename T>
inline const RuntimeInput<T> getInput(const std::string &name) const

Returns the information about the input with the specified name. The type of the input has to be specified as well.

Template Parameters:

T – The type of the input

Parameters:

name – The name of the input

Returns:

An object to access the information about the input

template<typename T, typename U>
inline const RuntimeVectorInput<T, U> getVectorInput(const std::string &name) const

Returns the information about the vector input with the specified name. The type of the vector input has to be specified as well.

Template Parameters:
  • T – The type of the vector input

  • U – The type of the vector input’s elements

Parameters:

name – The name of the input

Returns:

An object to access the information about the input

inline const RuntimeVectorInput<dv::EventPacket, dv::Event> getEventInput(const std::string &name) const

(Convenience) Function to get an event input

Parameters:

name – the name of the event input stream

Returns:

An object to access information about the input stream

inline const RuntimeInput<dv::Frame> getFrameInput(const std::string &name) const

(Convenience) Function to get an frame input

Parameters:

name – the name of the frame input stream

Returns:

An object to access information about the input stream

inline const RuntimeVectorInput<dv::IMUPacket, dv::IMU> getIMUInput(const std::string &name) const

(Convenience) Function to get an IMU input

Parameters:

name – the name of the IMU input stream

Returns:

An object to access information about the input stream

inline const RuntimeVectorInput<dv::TriggerPacket, dv::Trigger> getTriggerInput(const std::string &name) const

(Convenience) Function to get an trigger input

Parameters:

name – the name of the trigger input stream

Returns:

An object to access information about the input stream

inline const RuntimeVectorInput<dv::BoundingBoxPacket, dv::BoundingBox> getBoundingBoxInput(const std::string &name) const

(Convenience) Function to get an boundingBox input

Parameters:

name – the name of the boundingBox input stream

Returns:

An object to access information about the input stream

inline const dv::Config::Node infoNode(const std::string &name) const

Returns an info node about the specified input. Can be used to determine dimensions of an input/output

Returns:

A node that contains the specified inputs information, such as “sizeX” or “sizeY”

inline bool isConnected(const std::string &name) const

Returns true, if this optional input is actually connected to an output of another module

Returns:

true, if this input is connected

Private Members

dvModuleData moduleData
template<typename T>
class RuntimeOutput : public dv::_RuntimeOutputCommon<T>
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/data/wrappers.hpp>

Class that describes an output of a generic type at runtime. Can be used to obtain information about the output, as well as getting a new output object to send data to.

Template Parameters:

T – The type of the output data

Public Functions

inline RuntimeOutput(const std::string &name, dvModuleData moduleData)
template<>
class RuntimeOutput<dv::Frame> : public dv::_RuntimeOutputCommon<dv::Frame>
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/data/frame.hpp>

Specialization of the runtime output for frame outputs Provides convenience setup functions for setting up the frame output

Public Functions

inline RuntimeOutput(const std::string &name, dvModuleData moduleData)
inline OutputDataWrapper<dv::Frame> data()

Returns a writeable output wrapper for the given type of this output. Allocates new output memory if necessary. The output can be committed by calling commit on the returned object.

Returns:

A wrapper to allocated output memory to write to

inline OutputDataWrapper<dv::Frame> frame()

Returns the current output frame to set up values and to get the back data buffer

Returns:

The output frame to set up

void setup(const std::string &originDescription) = delete
inline void setup(int sizeX, int sizeY, const std::string &originDescription)

Sets up this frame output with the provided parameters

Parameters:
  • sizeX – The width of the frames supplied on this output

  • sizeY – The height of the frames supplied on this output

  • originDescription – A description of the original creator of the data

template<typename U>
inline void setup(const RuntimeInput<U> &input)

Sets this frame output up with the same parameters the the supplied input.

Parameters:

input – An input to copy the data from

template<typename U, typename TT>
inline void setup(const RuntimeVectorInput<U, TT> &input)

Sets this frame output up with the same parameters as the supplied vector input.

Parameters:

input – A vector input to copy the information from

inline int sizeX() const
inline int sizeY() const
inline const cv::Size size() const
inline void operator<<(dv::commitType)

Convenience shortcut to commit the data on this output directly

inline RuntimeOutput<dv::Frame> &operator<<(int64_t timestamp)

Sets the timestamp of the current frame on the output (start of exposure or closest).

Parameters:

timestamp – The timestamp to be set

Returns:

A reference to this output, to commit more data

inline RuntimeOutput<dv::Frame> &operator<<(const cv::Mat &mat)

Convenience shorthand to commit an OpenCV mat onto this output. If not using this function, call data() to get an output frame to fill into.

Parameters:

mat – The OpenCV Mat to submit

Returns:

A reference to the this

inline RuntimeOutput<dv::Frame> &operator<<(cv::Mat &&mat)

Convenience shorthand to commit an OpenCV mat onto this output. If not using this function, call data() to get an output frame to fill into.

Parameters:

mat – The OpenCV Mat to submit

Returns:

A reference to the this

class RuntimeOutputs

Public Functions

inline RuntimeOutputs(dvModuleData m)
template<typename T>
inline RuntimeOutput<T> getOutput(const std::string &name)

Function to get an output

Parameters:

name – the name of the output stream

Returns:

An object to access the modules output

template<typename T, typename U>
inline RuntimeVectorOutput<T, U> getVectorOutput(const std::string &name)

Function to get a vector output

Parameters:

name – the name of the output stream

Returns:

An object to access the modules output

inline RuntimeVectorOutput<dv::EventPacket, dv::Event> getEventOutput(const std::string &name)

(Convenience) Function to get an event output

Parameters:

name – the name of the event output stream

Returns:

An object to access the modules output

inline RuntimeOutput<dv::Frame> getFrameOutput(const std::string &name)

(Convenience) Function to get an frame output

Parameters:

name – the name of the frame output stream

Returns:

An object to access the modules output

inline RuntimeVectorOutput<dv::IMUPacket, dv::IMU> getIMUOutput(const std::string &name)

(Convenience) Function to get an imu output

Parameters:

name – the name of the imu output stream

Returns:

An object to access the modules output

inline RuntimeVectorOutput<dv::TriggerPacket, dv::Trigger> getTriggerOutput(const std::string &name)

(Convenience) Function to get an trigger output

Parameters:

name – the name of the trigger output stream

Returns:

An object to access the modules output

inline RuntimeVectorOutput<dv::BoundingBoxPacket, dv::BoundingBox> getBoundingBoxOutput(const std::string &name)

(Convenience) Function to get a bounding box output

Parameters:

name – the name of the trigger output stream

Returns:

An object to access the modules output

inline dv::Config::Node infoNode(const std::string &name)

Returns an info node about the specified output, can be used toset output information.

Returns:

A node that can contain output information, such as “sizeX” or “sizeY”

Private Members

dvModuleData moduleData
template<typename T, typename U>
class RuntimeVectorInput : public dv::_RuntimeVectorInputCommon<T, U>
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/data/wrappers.hpp>

Describes a generic vector input at runtime. A generic vecotr input can be instantiated for any vector type (a type with a member called ‘elements’ of type dv::cvector<U>). This class basically just inherits from _RuntimeInputCommon<T> and does not add any specializations.

Template Parameters:
  • T – The type of the vector input data

  • U – The type of the vector input data’s elements

Public Functions

inline RuntimeVectorInput(const std::string &name, dvModuleData moduleData)
template<>
class RuntimeVectorInput<dv::BoundingBoxPacket, dv::BoundingBox> : public dv::_RuntimeVectorInputCommon<dv::BoundingBoxPacket, dv::BoundingBox>
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/data/bounding_box.hpp>

Describes an input for bounding boxes. Offers convenience functions to obtain informations about the bounding box sizes as well as to get the data.

Public Functions

inline RuntimeVectorInput(const std::string &name, dvModuleData moduleData)
inline int sizeX() const
Returns:

The width of the input region in pixels. Any event on this input will have a x-coordinate smaller than the return value of this function.

inline int sizeY() const
Returns:

The height of the input region in pixels. Any event on this input will have a y-coordinate smaller than the return value of this function

inline const cv::Size size() const
Returns:

the input region size in pixels as an OpenCV size object

template<>
class RuntimeVectorInput<dv::EventPacket, dv::Event> : public dv::_RuntimeVectorInputCommon<dv::EventPacket, dv::Event>
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/data/event.hpp>

Describes an input for event packets. Offers convenience functions to obtain informations about the event input as well as to get the event data.

Public Functions

inline RuntimeVectorInput(const std::string &name, dvModuleData moduleData)
inline const InputVectorDataWrapper<dv::EventPacket, dv::Event> events() const

Returns an iterable container of the latest events that arrived at this input.

Returns:

An iterable container of the newest events.

inline int sizeX() const
Returns:

The width of the input region in pixels. Any event on this input will have a x-coordinate smaller than the return value of this function.

inline int sizeY() const
Returns:

The height of the input region in pixels. Any event on this input will have a y-coordinate smaller than the return value of this function

inline dv::EventColor colorForEvent(const dv::Event &evt) const

Determine the color of the Bayer color filter for a specific event, based on its address. WHITE means White/No Filter. Please take into account that there are usually twice as many green pixels as there are red or blue ones.

Parameters:

evt – event to determine filter color for.

Returns:

filter color.

inline const cv::Size size() const
Returns:

the input region size in pixels as an OpenCV size object

Private Members

int colorIndex = -1
template<typename T, typename U>
class RuntimeVectorOutput : public dv::_RuntimeVectorOutputCommon<T, U>
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/data/wrappers.hpp>

Class that describes an output of a generic vector type at runtime. A generic vector input can be instantiated for any vector type (a type with a member called ‘elements’ of type dv::cvector<U>). Can be used to obtain information about the output, as well as getting a new output object to send data to.

Template Parameters:
  • T – The type of the vector output data

  • U – The type of the vector output data’s elements

Public Functions

inline RuntimeVectorOutput(const std::string &name, dvModuleData moduleData)
template<>
class RuntimeVectorOutput<dv::BoundingBoxPacket, dv::BoundingBox> : public dv::_RuntimeVectorOutputCommon<dv::BoundingBoxPacket, dv::BoundingBox>
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/data/bounding_box.hpp>

Specialization of the runtime output for bounding boxes. Provides convenience setup functions for setting up the bounding boxes output.

Public Functions

inline RuntimeVectorOutput(const std::string &name, dvModuleData moduleData)
void setup(const std::string &originDescription) = delete
inline void setup(int sizeX, int sizeY, const std::string &originDescription)

Sets up this bounding boxes output by setting the provided arguments to the output info node

Parameters:
  • sizeX – The width of this output

  • sizeY – The height of this output

  • originDescription – A description that describes the original generator of the data

template<typename U>
inline void setup(const RuntimeInput<U> &input)

Sets this bounding box output up with the same parameters as the supplied input.

Parameters:

input – An input to copy the information from

template<typename U, typename TT>
inline void setup(const RuntimeVectorInput<U, TT> &input)

Sets this bounding box output up with the same parameters as the supplied vector input.

Parameters:

input – A vector input to copy the information from

inline int sizeX() const
Returns:

The width of the input region in pixels. Any event on this input will have a x-coordinate smaller than the return value of this function.

inline int sizeY() const
Returns:

The height of the input region in pixels. Any event on this input will have a y-coordinate smaller than the return value of this function

inline const cv::Size size() const
Returns:

the input region size in pixels as an OpenCV size object

template<>
class RuntimeVectorOutput<dv::EventPacket, dv::Event> : public dv::_RuntimeVectorOutputCommon<dv::EventPacket, dv::Event>
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/data/event.hpp>

Specialization of the runtime output for event outputs. Provides convenience setup functions for setting up the event output

Public Functions

inline RuntimeVectorOutput(const std::string &name, dvModuleData moduleData)
inline OutputVectorDataWrapper<dv::EventPacket, dv::Event> data()

Returns a writeable output wrapper for the given type of this output. Allocates new output memory if necessary. The output can be committed by calling commit on the returned object.

Returns:

A wrapper to allocated output memory to write to

inline OutputVectorDataWrapper<dv::EventPacket, dv::Event> events()
void setup(const std::string &originDescription) = delete
inline void setup(int sizeX, int sizeY, const std::string &originDescription)

Sets up this event output by setting the provided arguments to the output info node

Parameters:
  • sizeX – The width of this event output

  • sizeY – The height of this event output

  • originDescription – A description that describes the original generator of the data

template<typename U>
inline void setup(const RuntimeInput<U> &input)

Sets this event output up with the same parameters as the supplied input.

Parameters:

input – An input to copy the information from

template<typename U, typename TT>
inline void setup(const RuntimeVectorInput<U, TT> &input)

Sets this event output up with the same parameters as the supplied vector input.

Parameters:

input – A vector input to copy the information from

inline int sizeX() const
Returns:

The width of the input region in pixels. Any event on this input will have a x-coordinate smaller than the return value of this function.

inline int sizeY() const
Returns:

The height of the input region in pixels. Any event on this input will have a y-coordinate smaller than the return value of this function

inline const cv::Size size() const
Returns:

the input region size in pixels as an OpenCV size object

template<typename K>
inline RuntimeVectorOutput<dv::EventPacket, dv::Event> &operator<<(const K &rhs)

Convenience shortcut to commit the data on this output directly This gets resolved to one of the various << functions of the data wrapper.

inline void operator<<(commitType)

Convenience shortcut to commit the data on this output directly

template<typename T>
class Stats
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/stats.hpp>

Class which provides the functionality to measure statistics for numeric data types. The following statistics are computed and published, along with the most recently added value itself:

  • mean

  • variance

  • minimum

  • maximum

  • sample count

Public Functions

Stats() = delete

Deleted default constructor

inline Stats(const dv::Config::Node node, const std::string_view name)

Constructor which selects the default window size

Creates a node with the name

name relative to node. The stats will be published to the attributes current, mean, var, min, max and count at this node.

See also

DEFAULT_WINDOW_SIZE for the rolling mean and variance.

Parameters:
  • node – Parent node relative to which the node for the measured stats should be published

  • name – Name of the node

inline Stats(const uint32_t windowSize, const dv::Config::Node node, const std::string_view name)

Constructor which applies a custom window size for the rolling mean and variance.

Creates a node with the name name relative to node. The stats will be published to the attributes current, mean, var, min, max and count at this node.

Parameters:
  • windowSize – size of the accumulator window

  • node – Parent node relative to which the node for the measured stats should be published

  • name – Name of the node

Stats(const Stats &other) = delete

Copy - Disallow: since node and name are the same, you’d suddenly have two objects feeding data into the configuration backend and overwriting each other. This is not what you want.

Stats &operator=(const Stats &rhs) = delete
Stats(Stats &&other) = default

Move

Stats &operator=(Stats &&rhs) = default
virtual ~Stats() noexcept = default

Destructor

inline void operator()(const T value) noexcept

Adds a new value to the underlying accumulator

inline auto currentSample() const noexcept

Returns the most recently added sample

inline auto mean() const noexcept

Returns the rolling mean

inline auto var() const noexcept

Returns the rolling variance

inline auto min() const noexcept

Returns the minimum value

inline auto max() const noexcept

Returns the maximum value

inline auto count() const noexcept

Returns the number of added samples

Protected Types

template<typename ...ARGS>
using accumulator_set = boost::accumulators::accumulator_set<ARGS...>
template<typename ...ARGS>
using stats = boost::accumulators::stats<ARGS...>
using tag_lazy_rolling_mean = boost::accumulators::tag::lazy_rolling_mean
using tag_lazy_rolling_variance = boost::accumulators::tag::lazy_rolling_variance
using tag_min = boost::accumulators::tag::min
using tag_max = boost::accumulators::tag::max
using tag_count = boost::accumulators::tag::count
using accumulator = accumulator_set<T, stats<tag_lazy_rolling_mean, tag_lazy_rolling_variance, tag_min, tag_max, tag_count>>

Protected Attributes

accumulator mAccumulator = {boost::accumulators::tag::rolling_window::window_size = DEFAULT_WINDOW_SIZE}
T mCurrent = {}
uint32_t mWindowSize = {DEFAULT_WINDOW_SIZE}
dv::_RateLimiter mRateLimiter = {1, PUBLISHING_RATE_MS}
std::string mName
dv::Config::Node mNode

Protected Static Attributes

static constexpr uint32_t DEFAULT_WINDOW_SIZE = {500}
static constexpr uint32_t PUBLISHING_RATE_MS = {300}

Private Functions

inline void init()

Initializes the underlying accumulators to zero, and creates the node attributes to which data will be published.

inline void publish() noexcept

Publishes the statistical data to the node attributes

class TCPTLSSocket

Public Functions

inline TCPTLSSocket(asioTCP::socket s, bool tlsEnabled, asioSSL::context *tlsContext)
inline ~TCPTLSSocket()
inline void close()
template<typename StartupHandler>
inline void start(StartupHandler &&stHandler, asioSSL::stream_base::handshake_type type)

Startup handler needs following signature: void (const boost::system::error_code &)

template<typename WriteHandler>
inline void write(const asio::const_buffer &buf, WriteHandler &&wrHandler)

Write handler needs following signature: void (const boost::system::error_code &, size_t)

template<typename ReadHandler>
inline void read(const asio::mutable_buffer &buf, ReadHandler &&rdHandler)

Read handler needs following signature: void (const boost::system::error_code &, size_t)

inline asioTCP::endpoint local_endpoint() const
inline asioIP::address local_address() const
inline uint16_t local_port() const
inline asioTCP::endpoint remote_endpoint() const
inline asioIP::address remote_address() const
inline uint16_t remote_port() const

Private Functions

inline asioTCP::socket &baseSocket()

Private Members

asioTCP::endpoint localEndpoint
asioTCP::endpoint remoteEndpoint
asioSSL::stream<asioTCP::socket> socket
bool socketClosed
bool secureConnection
class Throughput : public dv::statistics::Stats<float>
#include </builds/inivation/dv/dv-runtime/include/dv-sdk/stats.hpp>

Class which provides the functionality to measure statistics for throughput related data.

Public Functions

Throughput() = delete

Deleted default constructor

inline Throughput(const dv::Config::Node node, const std::string_view name)

Constructor which selects the default measurement interval

The data will be published to the node

node/name/throughput/ if a name is specified, or `node/throughput/ if none is specified.

See also

DEFAULT_MEASUREMENT_INTERVAL and window size for the underlying statistics.

See also

Stats.

See also

Stats

Parameters:
  • node – Parent node relative to which the node for the measured stats should be published

  • name – Name of the node

inline Throughput(const std::chrono::microseconds measurementInterval, const dv::Config::Node node, const std::string_view name)

Constructor which applies a custom measurement interval and the default window size for the underlying statistics.

The data will be published to the node

node/name/throughput/ if a name is specified, or `node/throughput/ if none is specified.

See also

Stats.

See also

Stats

Parameters:
  • measurementInterval – The measurement interval with which the throughput shall be evaluated.

  • node – Parent node relative to which the node for the measured stats should be published

  • name – Name of the node

inline Throughput(const uint32_t windowSize, const std::chrono::microseconds measurementInterval, const dv::Config::Node node, const std::string_view name)

Constructor which applies a custom measurement interval and a custom window size for the underlying statistics.

The data will be published to the node

node/name/throughput/ if a name is specified, or `node/throughput/ if none is specified.

See also

Stats.

See also

Stats

Parameters:
  • windowSize – the window size for the statistical accumulators. @See Stats

  • measurementInterval – The measurement interval with which the throughput shall be evaluated.

  • node – Parent node relative to which the node for the measured stats should be published

  • name – Name of the node

Throughput(const Throughput &other) = delete

Copy - Disallow: since node and name are the same, you’d suddenly have two objects feeding data into the configuration backend and overwriting each other. This is not what you want.

Throughput &operator=(const Throughput &rhs) = delete
Throughput(Throughput &&other) = default

Move

Throughput &operator=(Throughput &&rhs) = default
~Throughput() noexcept = default

Destructor

inline void add(const uint64_t elements) noexcept

Updates the statistics by adding elements to the number of elements already received within this interval.

If an interval has finished since we previously called this method, the throughput is computed and added to the underlying statistical accumulators.

See also

Stats.

Parameters:

elements – The number of elements to be added to the throughput computation

Private Members

std::chrono::time_point<std::chrono::steady_clock> mStartTime = {std::chrono::steady_clock::now()}
uint64_t mNumElements = {0}
std::chrono::microseconds mMeasurementInterval = {DEFAULT_MEASUREMENT_INTERVAL}

Private Static Attributes

static constexpr std::chrono::duration DEFAULT_MEASUREMENT_INTERVAL = {std::chrono::milliseconds(1)}
class Tree

Public Functions

inline Tree(dvConfigTree t)
inline explicit operator dvConfigTree() const
inline void deleteTree()
inline bool existsNode(const std::string &nodePath) const
inline Node getRootNode() const
inline Node getNode(const std::string &nodePath) const

This returns a reference to a node, and as such must be carefully mediated with any dvConfigNodeRemoveNode() calls.

Throws:

std::out_of_range – Invalid absolute node path.

inline void attributeUpdaterRemoveAll()
inline bool attributeUpdaterRun()
inline void globalNodeListenerSet(dvConfigNodeChangeListener node_changed, void *userData)

Listener must be able to deal with userData being NULL at any moment. This can happen due to concurrent changes from this setter.

inline void globalAttributeListenerSet(dvConfigAttributeChangeListener attribute_changed, void *userData)

Listener must be able to deal with userData being NULL at any moment. This can happen due to concurrent changes from this setter.

Public Static Functions

static inline Tree globalTree()
static inline Tree newTree()
static inline void errorLogCallbackSet(dvConfigTreeErrorLogCallback error_log_cb)
static inline dvConfigTreeErrorLogCallback errorLogCallbackGet()

Private Members

dvConfigTree tree
template<class T>
class WriteOrderedSocket : public T

Public Functions

template<typename ...ARGS>
inline WriteOrderedSocket(ARGS&&... args)
template<typename WriteHandler>
inline void write(const asio::const_buffer &buf, WriteHandler &&wrHandler)

Write handler needs following signature: void (const boost::system::error_code &, size_t)

Private Members

std::deque<std::pair<asio::const_buffer, std::function<void(const boost::system::error_code&, size_t)>>> writeQueue
namespace dv

Header file that includes the C++ wrapper for the DV logging facilities.

Enums

enum class FileDialogMode

Different opening modes for a File Dialog config option.

Values:

enumerator OPEN
enumerator SAVE
enumerator DIRECTORY
enum class _StringAttributeType

INTERNAL: select between different string types.

Values:

enumerator NORMAL
enumerator LIST
enumerator FILE
enum class _BooleanAttributeType

INTERNAL: select between different boolean types

Values:

enumerator CHECKBOX
enumerator BUTTON
enum class EventColor : int8_t

The EventColor enum contains the color of the Bayer color filter for a specific event address. WHITE means White/No Filter. Please take into account that there are usually twice as many green pixels as there are red or blue ones.

Values:

enumerator WHITE
enumerator RED
enumerator GREEN
enumerator BLUE

Functions

template<class T>
inline T sgn(T x)

Returns the sign of the given number as -1 or 1. Returns 1 for 0.

Template Parameters:

T – The data type of the number and return value

Parameters:

x – the data to be checked

Returns:

-1 iff x < 0, 1 otherwise

Variables

static constexpr EventColor colorKeys[4][4] = {{EventColor::RED, EventColor::GREEN, EventColor::GREEN, EventColor::BLUE}, {EventColor::GREEN, EventColor::BLUE, EventColor::RED, EventColor::GREEN}, {EventColor::GREEN, EventColor::RED, EventColor::BLUE, EventColor::GREEN}, {EventColor::BLUE, EventColor::GREEN, EventColor::GREEN, EventColor::RED},}

Address to Color mapping for events based on Bayer filter.

constexpr commitType commit = {}
constexpr logEndType logEnd = {}
template<typename T>
constexpr bool has_initDescription = has_static_member_function_initDescription<T, const char*>::value

Trait for the existence of a static initDescription method with const char* return value

Template Parameters:

T – The class to be tested

template<typename T>
constexpr bool has_initConfigOptions = has_static_member_function_initConfigOptions<T, void(RuntimeConfig&)>::value

Trait for the existence of a static initConfigOptions method with map argument

Template Parameters:

T – The class to be tested

template<typename T>
constexpr bool has_advancedStaticInit = has_static_member_function_advancedStaticInit<T, void(dvModuleData)>::value
template<typename T>
constexpr bool has_initTypes = has_static_member_function_initTypes<T, void(std::vector<dv::Types::Type>&)>::value
template<typename T>
constexpr bool has_initInputs = has_static_member_function_initInputs<T, void(dv::InputDefinitionList&)>::value
template<typename T>
constexpr bool has_initOutputs = has_static_member_function_initOutputs<T, void(dv::OutputDefinitionList&)>::value
namespace Config

Enums

enum class AttributeType

Values:

enumerator UNKNOWN
enumerator BOOL
enumerator INT
enumerator LONG
enumerator FLOAT
enumerator DOUBLE
enumerator STRING
enum class AttributeFlags : uint32_t

Values:

enumerator NORMAL
enumerator READ_ONLY
enumerator NO_EXPORT
enumerator IMPORTED

Functions

inline AttributeFlags operator|(AttributeFlags lhs, AttributeFlags rhs)
inline AttributeFlags &operator|=(AttributeFlags &lhs, AttributeFlags rhs)
inline int getCFlags(AttributeFlags f)

Variables

static Tree GLOBAL = Tree::globalTree()
namespace runtime

Variables

static constexpr int VERSION_MAJOR = {1}
static constexpr int VERSION_MINOR = {6}
static constexpr int VERSION_PATCH = {2}
static constexpr int VERSION = {((1 * 10000) + (6 * 100) + 2)}
static constexpr std::string_view NAME_STRING = {"dv-runtime"}
static constexpr std::string_view VERSION_STRING = {"1.6.2"}
namespace statistics
file config.hpp
#include “cross/portable_io.h
#include “utils.h
#include <boost/algorithm/string/join.hpp>
#include <chrono>
#include <cmath>
#include <string>
#include <unordered_map>
#include <vector>

Defines

DV_MODULE_MULTI_THREAD_SAFE
file dvConfig.h
#include <errno.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include “dv-sdk/api_visibility.h”

Typedefs

typedef struct dv_config_node *dvConfigNode
typedef const struct dv_config_node *dvConfigNodeConst
typedef void (*dvConfigNodeChangeListener)(dvConfigNode node, void *userData, enum dvConfigNodeEvents event, const char *changeNode)
typedef void (*dvConfigAttributeChangeListener)(dvConfigNode node, void *userData, enum dvConfigAttributeEvents event, const char *changeKey, enum dvConfigAttributeType changeType, union dvConfigAttributeValue changeValue)
typedef struct dv_config_tree *dvConfigTree
typedef const struct dv_config_tree *dvConfigTreeConst
typedef void (*dvConfigTreeErrorLogCallback)(const char *msg, bool fatal)
typedef union dvConfigAttributeValue (*dvConfigAttributeUpdater)(void *userData, const char *key, enum dvConfigAttributeType type)

Enums

enum dvConfigAttributeType

Values:

enumerator DVCFG_TYPE_UNKNOWN
enumerator DVCFG_TYPE_BOOL
enumerator DVCFG_TYPE_INT
enumerator DVCFG_TYPE_LONG
enumerator DVCFG_TYPE_FLOAT
enumerator DVCFG_TYPE_DOUBLE
enumerator DVCFG_TYPE_STRING
enum dvConfigAttributeFlags

Values:

enumerator DVCFG_FLAGS_NORMAL
enumerator DVCFG_FLAGS_READ_ONLY
enumerator DVCFG_FLAGS_NO_EXPORT
enumerator DVCFG_FLAGS_IMPORTED
enum dvConfigNodeEvents

Values:

enumerator DVCFG_NODE_CHILD_ADDED
enumerator DVCFG_NODE_CHILD_REMOVED
enum dvConfigAttributeEvents

Values:

enumerator DVCFG_ATTRIBUTE_ADDED
enumerator DVCFG_ATTRIBUTE_MODIFIED
enumerator DVCFG_ATTRIBUTE_REMOVED
enumerator DVCFG_ATTRIBUTE_MODIFIED_CREATE

Functions

DVSDK_EXPORT const char * dvConfigNodeGetName (dvConfigNodeConst node)
DVSDK_EXPORT const char * dvConfigNodeGetPath (dvConfigNodeConst node)
DVSDK_EXPORT dvConfigNode dvConfigNodeGetParent (dvConfigNodeConst node)

This returns a reference to a node, and as such must be carefully mediated with any dvConfigNodeRemoveNode() calls.

DVSDK_EXPORT dvConfigNode * dvConfigNodeGetChildren (dvConfigNodeConst node, size_t *numChildren)

Remember to free the resulting array. This returns references to nodes, and as such must be carefully mediated with any dvConfigNodeRemoveNode() calls.

DVSDK_EXPORT void dvConfigNodeAddNodeListener (dvConfigNode node, void *userData, dvConfigNodeChangeListener node_changed)
DVSDK_EXPORT void dvConfigNodeRemoveNodeListener (dvConfigNode node, void *userData, dvConfigNodeChangeListener node_changed)
DVSDK_EXPORT void dvConfigNodeRemoveAllNodeListeners (dvConfigNode node)
DVSDK_EXPORT void dvConfigNodeAddAttributeListener (dvConfigNode node, void *userData, dvConfigAttributeChangeListener attribute_changed)
DVSDK_EXPORT void dvConfigNodeRemoveAttributeListener (dvConfigNode node, void *userData, dvConfigAttributeChangeListener attribute_changed)
DVSDK_EXPORT void dvConfigNodeRemoveAllAttributeListeners (dvConfigNode node)
DVSDK_EXPORT void dvConfigNodeRemoveNode (dvConfigNode node)

Careful, only use if no references exist to this node and all its children. References are created by dvConfigTreeGetNode(), dvConfigNodeGetRelativeNode(), dvConfigNodeGetParent() and dvConfigNodeGetChildren().

DVSDK_EXPORT void dvConfigNodeRemoveSubTree (dvConfigNode node)

Careful, only use if no references exist to this node’s children. References are created by dvConfigTreeGetNode(), dvConfigNodeGetRelativeNode(), dvConfigNodeGetParent() and dvConfigNodeGetChildren().

DVSDK_EXPORT void dvConfigNodeClearSubTree (dvConfigNode startNode, bool clearStartNode)
DVSDK_EXPORT void dvConfigNodeCopy (dvConfigNodeConst source, dvConfigNode destination)
DVSDK_EXPORT void dvConfigNodeCreateAttribute (dvConfigNode node, const char *key, enum dvConfigAttributeType type, union dvConfigAttributeValue defaultValue, const struct dvConfigAttributeRanges ranges, int flags, const char *description)
DVSDK_EXPORT void dvConfigNodeRemoveAttribute (dvConfigNode node, const char *key, enum dvConfigAttributeType type)
DVSDK_EXPORT void dvConfigNodeRemoveAllAttributes (dvConfigNode node)
DVSDK_EXPORT bool dvConfigNodeExistsAttribute (dvConfigNodeConst node, const char *key, enum dvConfigAttributeType type)
DVSDK_EXPORT bool dvConfigNodePutAttribute (dvConfigNode node, const char *key, enum dvConfigAttributeType type, union dvConfigAttributeValue value)
DVSDK_EXPORT union dvConfigAttributeValue dvConfigNodeGetAttribute (dvConfigNodeConst node, const char *key, enum dvConfigAttributeType type)
DVSDK_EXPORT bool dvConfigNodeUpdateReadOnlyAttribute (dvConfigNode node, const char *key, enum dvConfigAttributeType type, union dvConfigAttributeValue value)
DVSDK_EXPORT void dvConfigNodeCreateBool (dvConfigNode node, const char *key, bool defaultValue, int flags, const char *description)
DVSDK_EXPORT bool dvConfigNodePutBool (dvConfigNode node, const char *key, bool value)
DVSDK_EXPORT bool dvConfigNodeGetBool (dvConfigNodeConst node, const char *key)
DVSDK_EXPORT void dvConfigNodeCreateInt (dvConfigNode node, const char *key, int32_t defaultValue, int32_t minValue, int32_t maxValue, int flags, const char *description)
DVSDK_EXPORT bool dvConfigNodePutInt (dvConfigNode node, const char *key, int32_t value)
DVSDK_EXPORT int32_t dvConfigNodeGetInt (dvConfigNodeConst node, const char *key)
DVSDK_EXPORT void dvConfigNodeCreateLong (dvConfigNode node, const char *key, int64_t defaultValue, int64_t minValue, int64_t maxValue, int flags, const char *description)
DVSDK_EXPORT bool dvConfigNodePutLong (dvConfigNode node, const char *key, int64_t value)
DVSDK_EXPORT int64_t dvConfigNodeGetLong (dvConfigNodeConst node, const char *key)
DVSDK_EXPORT void dvConfigNodeCreateFloat (dvConfigNode node, const char *key, float defaultValue, float minValue, float maxValue, int flags, const char *description)
DVSDK_EXPORT bool dvConfigNodePutFloat (dvConfigNode node, const char *key, float value)
DVSDK_EXPORT float dvConfigNodeGetFloat (dvConfigNodeConst node, const char *key)
DVSDK_EXPORT void dvConfigNodeCreateDouble (dvConfigNode node, const char *key, double defaultValue, double minValue, double maxValue, int flags, const char *description)
DVSDK_EXPORT bool dvConfigNodePutDouble (dvConfigNode node, const char *key, double value)
DVSDK_EXPORT double dvConfigNodeGetDouble (dvConfigNodeConst node, const char *key)
DVSDK_EXPORT void dvConfigNodeCreateString (dvConfigNode node, const char *key, const char *defaultValue, int32_t minLength, int32_t maxLength, int flags, const char *description)
DVSDK_EXPORT bool dvConfigNodePutString (dvConfigNode node, const char *key, const char *value)
DVSDK_EXPORT char * dvConfigNodeGetString (dvConfigNodeConst node, const char *key)
DVSDK_EXPORT bool dvConfigNodeExportNodeToXML (dvConfigNodeConst node, const char *filePath, bool exportAll)
DVSDK_EXPORT bool dvConfigNodeExportSubTreeToXML (dvConfigNodeConst node, const char *filePath, bool exportAll)
DVSDK_EXPORT bool dvConfigNodeImportNodeFromXML (dvConfigNode node, const char *filePath, bool strict)
DVSDK_EXPORT bool dvConfigNodeImportSubTreeFromXML (dvConfigNode node, const char *filePath, bool strict)
DVSDK_EXPORT char * dvConfigNodeExportNodeToXMLString (dvConfigNodeConst node, bool exportAll)
DVSDK_EXPORT char * dvConfigNodeExportSubTreeToXMLString (dvConfigNodeConst node, bool exportAll)
DVSDK_EXPORT bool dvConfigNodeImportNodeFromXMLString (dvConfigNode node, const char *xmlStr, bool strict)
DVSDK_EXPORT bool dvConfigNodeImportSubTreeFromXMLString (dvConfigNode node, const char *xmlStr, bool strict)
DVSDK_EXPORT bool dvConfigNodeStringToAttributeConverter (dvConfigNode node, const char *key, const char *type, const char *value, bool overrideReadOnly)
DVSDK_EXPORT const char ** dvConfigNodeGetChildNames (dvConfigNodeConst node, size_t *numNames)
DVSDK_EXPORT const char ** dvConfigNodeGetAttributeKeys (dvConfigNodeConst node, size_t *numKeys)
DVSDK_EXPORT enum dvConfigAttributeType dvConfigNodeGetAttributeType (dvConfigNodeConst node, const char *key)
DVSDK_EXPORT struct dvConfigAttributeRanges dvConfigNodeGetAttributeRanges (dvConfigNodeConst node, const char *key, enum dvConfigAttributeType type)
DVSDK_EXPORT int dvConfigNodeGetAttributeFlags (dvConfigNodeConst node, const char *key, enum dvConfigAttributeType type)
DVSDK_EXPORT char * dvConfigNodeGetAttributeDescription (dvConfigNodeConst node, const char *key, enum dvConfigAttributeType type)
DVSDK_EXPORT void dvConfigNodeAttributeModifierButton (dvConfigNode node, const char *key, const char *buttonLabel)
DVSDK_EXPORT void dvConfigNodeAttributeModifierListOptions (dvConfigNode node, const char *key, const char *listOptions, bool allowMultipleSelections)
DVSDK_EXPORT void dvConfigNodeAttributeModifierFileChooser (dvConfigNode node, const char *key, const char *typeAndExtensions)
DVSDK_EXPORT void dvConfigNodeAttributeModifierUnit (dvConfigNode node, const char *key, const char *unitInformation)
DVSDK_EXPORT void dvConfigNodeAttributeModifierPriorityAttributes (dvConfigNode node, const char *priorityAttributes)
DVSDK_EXPORT void dvConfigNodeAttributeModifierGUISupport (dvConfigNode node)
DVSDK_EXPORT void dvConfigNodeAttributeBooleanReset (dvConfigNode node, const char *key)
DVSDK_EXPORT bool dvConfigNodeExistsRelativeNode (dvConfigNodeConst node, const char *nodePath)
DVSDK_EXPORT dvConfigNode dvConfigNodeGetRelativeNode (dvConfigNode node, const char *nodePath)

This returns a reference to a node, and as such must be carefully mediated with any dvConfigNodeRemoveNode() calls.

DVSDK_EXPORT const char * dvConfigHelperTypeToStringConverter (enum dvConfigAttributeType type)
DVSDK_EXPORT enum dvConfigAttributeType dvConfigHelperStringToTypeConverter (const char *typeString)
DVSDK_EXPORT char * dvConfigHelperValueToStringConverter (enum dvConfigAttributeType type, union dvConfigAttributeValue value)
DVSDK_EXPORT union dvConfigAttributeValue dvConfigHelperStringToValueConverter (enum dvConfigAttributeType type, const char *valueString)
DVSDK_EXPORT char * dvConfigHelperFlagsToStringConverter (int flags)
DVSDK_EXPORT int dvConfigHelperStringToFlagsConverter (const char *flagsString)
DVSDK_EXPORT char * dvConfigHelperRangesToStringConverter (enum dvConfigAttributeType type, struct dvConfigAttributeRanges ranges)
DVSDK_EXPORT struct dvConfigAttributeRanges dvConfigHelperStringToRangesConverter (enum dvConfigAttributeType type, const char *rangesString)
DVSDK_EXPORT dvConfigTree dvConfigTreeGlobal (void)
DVSDK_EXPORT dvConfigTree dvConfigTreeNew (void)
DVSDK_EXPORT void dvConfigTreeDelete (dvConfigTree tree)
DVSDK_EXPORT void dvConfigTreeErrorLogCallbackSet (dvConfigTreeErrorLogCallback error_log_cb)
DVSDK_EXPORT dvConfigTreeErrorLogCallback dvConfigTreeErrorLogCallbackGet (void)
DVSDK_EXPORT bool dvConfigTreeExistsNode (dvConfigTreeConst st, const char *nodePath)
DVSDK_EXPORT dvConfigNode dvConfigTreeGetNode (dvConfigTree st, const char *nodePath)

This returns a reference to a node, and as such must be carefully mediated with any dvConfigNodeRemoveNode() calls.

DVSDK_EXPORT void dvConfigNodeAttributeUpdaterAdd (dvConfigNode node, const char *key, enum dvConfigAttributeType type, dvConfigAttributeUpdater updater, void *updaterUserData, bool runOnce)
DVSDK_EXPORT void dvConfigNodeAttributeUpdaterRemove (dvConfigNode node, const char *key, enum dvConfigAttributeType type, dvConfigAttributeUpdater updater, void *updaterUserData)
DVSDK_EXPORT void dvConfigNodeAttributeUpdaterRemoveAll (dvConfigNode node)
DVSDK_EXPORT void dvConfigTreeAttributeUpdaterRemoveAll (dvConfigTree tree)
DVSDK_EXPORT bool dvConfigTreeAttributeUpdaterRun (dvConfigTree tree)
DVSDK_EXPORT void dvConfigTreeGlobalNodeListenerSet (dvConfigTree tree, dvConfigNodeChangeListener node_changed, void *userData)

Listener must be able to deal with userData being NULL at any moment. This can happen due to concurrent changes from this setter.

DVSDK_EXPORT void dvConfigTreeGlobalAttributeListenerSet (dvConfigTree tree, dvConfigAttributeChangeListener attribute_changed, void *userData)

Listener must be able to deal with userData being NULL at any moment. This can happen due to concurrent changes from this setter.

file dvConfig.hpp
#include “dvConfig.h
#include <stdexcept>
#include <string>
#include <string_view>
#include <vector>
file asio_tcptlssocket.hpp
#include <utility>
#include <boost/asio.hpp>
#include <boost/asio/ssl.hpp>
#include <boost/version.hpp>
#include <deque>

Defines

BOOST_ASIO_NET_NEW_INTERFACE

Typedefs

using asioTCP = asioIP::tcp
file portable_endian.h
#include <stdint.h>
#include <string.h>

Endianness conversion functions for a wide variety of systems, including Linux, FreeBSD, MacOS X and Windows.

Functions

static inline float htobeflt(float val)
static inline float htoleflt(float val)
static inline float beflttoh(float val)
static inline float leflttoh(float val)
file portable_io.h
#include <stdlib.h>
#include “dv-sdk/api_visibility.h”
#include <limits.h>

Functions

DVSDK_EXPORT char * portable_get_user_home_directory (void)

Get the user’s home directory path as a string. Returned string is a dynamically allocated copy, always remember to free() it to avoid a memory leak.

Returns:

string containing user home directory path. Always remember to free() this!

DVSDK_EXPORT char * portable_get_executable_location (void)

Get the current executable’s location as a string. Returned string is a dynamically allocated copy, always remember to free() it to avoid a memory leak.

Returns:

string containing current executable path. Always remember to free() this!

DVSDK_EXPORT char * portable_get_user_name (void)

Get the user name of the user that’s currently executing the program.

Returns:

string containing user name. Always remember to free() this!

file portable_threads.h
#include <stdbool.h>
#include <stdlib.h>
#include “dv-sdk/api_visibility.h”

Functions

DVSDK_EXPORT bool portable_thread_set_name (const char *name)
DVSDK_EXPORT bool portable_thread_set_priority_highest (void)
file portable_time.h
#include <stdbool.h>
#include <stdlib.h>
#include <time.h>
#include “dv-sdk/api_visibility.h”

Functions

DVSDK_EXPORT bool portable_clock_gettime_monotonic (struct timespec *monoTime)
DVSDK_EXPORT bool portable_clock_gettime_realtime (struct timespec *realTime)
file bounding_box.hpp
#include “wrappers.hpp
#include <dv-processing/data/bounding_box_base.hpp>
#include <opencv2/core.hpp>
#include <opencv2/core/utility.hpp>
file cstring.hpp
#include <dv-processing/data/cstring.hpp>
file cvector.hpp
#include <dv-processing/data/cvector.hpp>
file cvector_proxy.hpp
#include <dv-processing/data/cvector.hpp>
file imu.hpp
#include “wrappers.hpp
#include <dv-processing/data/imu_base.hpp>
file trigger.hpp
#include “wrappers.hpp
#include <dv-processing/data/trigger_base.hpp>
file types.hpp
#include “../utils.h
#include <cassert>

Typedefs

typedef uint32_t (*dvTypePackFuncPtr)(void *toFlatBufferBuilder, const void *fromObject)
typedef void (*dvTypeUnpackFuncPtr)(void *toObject, const void *fromFlatBuffer)
typedef void *(*dvTypeConstructPtr)(size_t sizeOfObject)
typedef void (*dvTypeDestructPtr)(void *object)
typedef struct dvTypeTimeElementExtractor (*dvTypeTimeElementExtractorPtr)(const void *object)
typedef bool (*dvTypeUnpackTimeElementRangeFuncPtr)(void *toObject, const void *fromFlatBuffer, struct dvTypeTimeElementExtractor range)

Functions

DVSDK_EXPORT struct dvType dvTypeSystemGetInfoByIdentifier (const char *tIdentifier)
DVSDK_EXPORT struct dvType dvTypeSystemGetInfoByID (uint32_t tId)
file wrappers.hpp
#include “../module.h
#include “../utils.h
#include “cvector_proxy.hpp
file log.hpp
#include “utils.h
#include <iostream>
#include <sstream>
file module.h
#include “data/types.hpp
#include “utils.h

Typedefs

typedef struct dvModuleDataS *dvModuleData
typedef struct dvModuleFunctionsS const *dvModuleFunctions
typedef struct dvModuleInfoS const *dvModuleInfo

Enums

enum dvModuleHooks

Values:

enumerator DV_HOOK_DEVICE_DISCOVERY

Functions

DVSDK_EXPORT dvModuleInfo dvModuleGetInfo150 (void)

Function to be implemented by modules. Must return a dvModuleInfoS structure pointer, with all the information from your module.

DVSDK_EXPORT void * dvModuleGetHooks (enum dvModuleHooks hook)

Optional function to be implemented by modules. Must return a pointer to the right structure based on given enum value, or NULL if not supported.

DVSDK_EXPORT void dvModuleRegisterType (dvModuleData moduleData, const struct dvType type)
DVSDK_EXPORT void dvModuleRegisterOutput (dvModuleData moduleData, const char *name, const char *typeName)
DVSDK_EXPORT void dvModuleRegisterInput (dvModuleData moduleData, const char *name, const char *typeName, bool optional)
DVSDK_EXPORT struct dvTypedObject * dvModuleOutputAllocate (dvModuleData moduleData, const char *name)
DVSDK_EXPORT void dvModuleOutputCommit (dvModuleData moduleData, const char *name)
DVSDK_EXPORT const struct dvTypedObject * dvModuleInputGet (dvModuleData moduleData, const char *name)
DVSDK_EXPORT void dvModuleInputAdvance (dvModuleData moduleData, const char *name)
DVSDK_EXPORT void dvModuleInputDismiss (dvModuleData moduleData, const char *name, const struct dvTypedObject *data)
DVSDK_EXPORT dvConfigNode dvModuleOutputGetInfoNode (dvModuleData moduleData, const char *name)
DVSDK_EXPORT dvConfigNodeConst dvModuleInputGetInfoNode (dvModuleData moduleData, const char *name)
DVSDK_EXPORT bool dvModuleInputIsConnected (dvModuleData moduleData, const char *name)
file module.hpp
#include “module_base.hpp
#include <boost/core/demangle.hpp>
#include <boost/tti/has_static_member_function.hpp>
#include <typeinfo>

Defines

registerModuleClass(MODULE)

Macro that expands into the global dvModuleGetInfo150 function, exposed to the API for DV. The function instantiates the ModuleStaticDefinition class with the given Module (A subclass) of dv::ModuleBase and returns the static info section.

Parameters:
  • MODULE

file module_base.hpp
#include “config.hpp
#include “log.hpp
#include “module.h
#include “module_io.hpp
#include “utils.h
#include <utility>
file module_io.hpp
#include “data/bounding_box.hpp
#include “data/event.hpp
#include “data/frame.hpp
#include “data/imu.hpp
#include “data/trigger.hpp
#include “data/wrappers.hpp
#include “module.h
#include “utils.h
#include <opencv2/core.hpp>
file processing.hpp
#include “processing/core.hpp
#include “processing/event.hpp
#include “processing/frame.hpp
file core.hpp
#include “../utils.h
#include <dv-processing/core/core.hpp>
file event.hpp
#include “wrappers.hpp
#include <dv-processing/core/core.hpp>
#include <dv-processing/data/event_base.hpp>
#include <opencv2/core.hpp>
#include <opencv2/core/utility.hpp>
file event.hpp
#include “../utils.h
#include <dv-processing/core/event.hpp>
file frame.hpp
#include “wrappers.hpp
#include <dv-processing/data/frame_base.hpp>
#include <opencv2/core.hpp>
#include <opencv2/core/utility.hpp>
#include <opencv2/imgproc.hpp>
file frame.hpp
#include “../utils.h
#include <dv-processing/core/frame.hpp>
file stats.hpp
#include “config.hpp
#include <boost/accumulators/accumulators.hpp>
#include <boost/accumulators/statistics/max.hpp>
#include <boost/accumulators/statistics/min.hpp>
#include <boost/accumulators/statistics/rolling_mean.hpp>
#include <boost/accumulators/statistics/rolling_variance.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <chrono>
#include <type_traits>
file utils.h
#include <errno.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include “config/dvConfig.h

Defines

UNUSED_ARGUMENT(arg)

Enums

enum dvLogLevel

Values:

enumerator DVLOG_ERROR
enumerator DVLOG_WARNING
enumerator DVLOG_INFO
enumerator DVLOG_DEBUG

Functions

DVSDK_EXPORT void dvLog (enum dvLogLevel level, const char *message)
file version.hpp
#include <string_view>

Defines

DV_RUNTIME_VERSION_MAJOR

dv-runtime version (MAJOR * 10000 + MINOR * 100 + PATCH).

DV_RUNTIME_VERSION_MINOR
DV_RUNTIME_VERSION_PATCH
DV_RUNTIME_VERSION
DV_RUNTIME_NAME_STRING

dv-runtime name string.

DV_RUNTIME_VERSION_STRING

dv-runtime version string.

dir /builds/inivation/dv/dv-runtime/include/dv-sdk/config
dir /builds/inivation/dv/dv-runtime/include/dv-sdk/cross
dir /builds/inivation/dv/dv-runtime/include/dv-sdk/data
dir /builds/inivation/dv/dv-runtime/include/dv-sdk
dir /builds/inivation/dv/dv-runtime/include
dir /builds/inivation/dv/dv-runtime/include/dv-sdk/processing