1#ifndef Shared_Attribute_Callback_h
2#define Shared_Attribute_Callback_h
6#if !THINGSBOARD_ENABLE_DYNAMIC
14#if !THINGSBOARD_ENABLE_DYNAMIC
18template <
size_t MaxAttributes = DEFAULT_ATTRIBUTES_AMOUNT>
21#if THINGSBOARD_ENABLE_DYNAMIC
45 template<
typename... Args>
48 , m_attributes(args...)
72 template<
typename... Args>
74 m_attributes.
assign(args...);
78 CString_Container m_attributes = {};
General purpose safe callback wrapper. Expects either c-style or c++ style function pointer,...
Definition: Callback.h:30
std::function< void(argument_types... arguments)> function
Callback signature.
Definition: Callback.h:34
Custom std::array or std::vector implementation that contains a partial vector-like interface impleme...
Definition: Container.h:29
void assign(InputIterator const &first, InputIterator const &last)
Copies all elements from the given start to exclusively the given end iterator into the underlying da...
Definition: Container.h:129
Shared attribute update callback wrapper, contains the needed configuration settings to create the re...
Definition: Shared_Attribute_Callback.h:20
void Set_Attributes(Args const &... args)
Sets all the subscribed shared attributes that will result in the callback method being called if any...
Definition: Shared_Attribute_Callback.h:73
Shared_Attribute_Callback()=default
Constructs empty callback, will result in never being called. Internals are simply default constructe...
Shared_Attribute_Callback(function callback, Args const &... args)
Constructs callback, will be called upon shared attribute update arrival, where atleast one of the gi...
Definition: Shared_Attribute_Callback.h:46
CString_Container const & Get_Attributes() const
Gets all the subscribed shared attributes that will result in the callback method being called if any...
Definition: Shared_Attribute_Callback.h:57
~Shared_Attribute_Callback() override=default