|
| | Shared_Attribute_Update ()=default |
| | Constructor. More...
|
| |
| | ~Shared_Attribute_Update () override=default |
| |
| template<typename InputIterator > |
| bool | Shared_Attributes_Subscribe (InputIterator const &first, InputIterator const &last) |
| | Subscribes shared attribute callbacks, that will be called if an update for the containing shared attributes is received. More...
|
| |
| bool | Shared_Attributes_Subscribe (Callback_Value const &callback) |
| | Subscribes a shared attribute callback, that will be called if an update for the containing shared attributes is received. More...
|
| |
| bool | Shared_Attributes_Unsubscribe () |
| | Unsubcribes all shared attribute callbacks. See https://thingsboard.io/docs/reference/mqtt-api/#subscribe-to-attribute-updates-from-the-server for more information. More...
|
| |
| API_Process_Type | Get_Process_Type () const override |
| | Returns the way the server response should be processed. More...
|
| |
| void | Process_Response (char const *topic, uint8_t *payload, uint32_t length) override |
| | Process callback that will be called upon response arrival. More...
|
| |
| void | Process_Json_Response (char const *topic, JsonDocument const &data) override |
| | Process callback that will be called upon response arrival. More...
|
| |
| bool | Is_Response_Topic_Matching (char const *topic) const override |
| | Compares received response topic and the topic this api implementation handles responses on, messages from all other topics are ignored and only messages from topics that match are handled. More...
|
| |
| bool | Unsubscribe () override |
| | Unsubcribes all callbacks, to clear up any ongoing subscriptions and stop receiving information over the previously subscribed topic. More...
|
| |
| bool | Resubscribe_Permanent_Subscriptions () override |
| | Forwards the call to let the API clear up any ongoing single-event subscriptions (Provision, Attribute Request, RPC Request) and simply resubscribes the topic for all permanent subscriptions (RPC, Shared Attribute Update) More...
|
| |
| void | loop () override |
| | Internal loop method to update inernal timers for API calls that can timeout. More...
|
| |
| void | Initialize () override |
| | Method that allows to construct internal objects, after the required callback member methods have been set already. More...
|
| |
| void | Set_Client_Callbacks (Callback< void, IAPI_Implementation & >::function subscribe_api_callback, Callback< bool, char const *const, JsonDocument const & >::function send_json_callback, Callback< bool, char const *const, char const *const >::function send_json_string_callback, Callback< bool, char const *const >::function subscribe_topic_callback, Callback< bool, char const *const >::function unsubscribe_topic_callback, Callback< uint16_t >::function get_receive_size_callback, Callback< uint16_t >::function get_send_size_callback, Callback< bool, uint16_t, uint16_t >::function set_buffer_size_callback, Callback< size_t * >::function get_request_id_callback) override |
| | Sets the underlying callbacks that are required for the different API Implementation to communicate with the cloud. More...
|
| |
| virtual | ~IAPI_Implementation () |
| | Virtual default destructor, created to ensure that if a pointer to this class is used and deleted, we will also call the derived base class destructor. More...
|
| |
| virtual API_Process_Type | Get_Process_Type () const =0 |
| | Returns the way the server response should be processed. More...
|
| |
| virtual void | Process_Response (char const *topic, uint8_t *payload, uint32_t length)=0 |
| | Process callback that will be called upon response arrival. More...
|
| |
| virtual void | Process_Json_Response (char const *topic, JsonDocument const &data)=0 |
| | Process callback that will be called upon response arrival. More...
|
| |
| virtual bool | Is_Response_Topic_Matching (char const *topic) const =0 |
| | Compares received response topic and the topic this api implementation handles responses on, messages from all other topics are ignored and only messages from topics that match are handled. More...
|
| |
| virtual bool | Unsubscribe ()=0 |
| | Unsubcribes all callbacks, to clear up any ongoing subscriptions and stop receiving information over the previously subscribed topic. More...
|
| |
| virtual bool | Resubscribe_Permanent_Subscriptions ()=0 |
| | Forwards the call to let the API clear up any ongoing single-event subscriptions (Provision, Attribute Request, RPC Request) and simply resubscribes the topic for all permanent subscriptions (RPC, Shared Attribute Update) More...
|
| |
| virtual void | loop ()=0 |
| | Internal loop method to update inernal timers for API calls that can timeout. More...
|
| |
| virtual void | Initialize ()=0 |
| | Method that allows to construct internal objects, after the required callback member methods have been set already. More...
|
| |
| virtual void | Set_Client_Callbacks (Callback< void, IAPI_Implementation & >::function subscribe_api_callback, Callback< bool, char const *const, JsonDocument const & >::function send_json_callback, Callback< bool, char const *const, char const *const >::function send_json_string_callback, Callback< bool, char const *const >::function subscribe_topic_callback, Callback< bool, char const *const >::function unsubscribe_topic_callback, Callback< uint16_t >::function get_receive_size_callback, Callback< uint16_t >::function get_send_size_callback, Callback< bool, uint16_t, uint16_t >::function set_buffer_size_callback, Callback< size_t * >::function get_request_id_callback)=0 |
| | Sets the underlying callbacks that are required for the different API Implementation to communicate with the cloud. More...
|
| |
template<
size_t MaxSubscriptions = DEFAULT_SUBSCRIPTION_AMOUNT,
size_t MaxAttributes = DEFAULT_ATTRIBUTES_AMOUNT, typename Logger = DefaultLogger>
class Shared_Attribute_Update< MaxSubscriptions, MaxAttributes, Logger >
Handles the internal implementation of the ThingsBoard shared Attribute Update API. See https://thingsboard.io/docs/reference/mqtt-api/#subscribe-to-attribute-updates-from-the-server for more information.
- Template Parameters
-
| Logger | Implementation that should be used to print error messages generated by internal processes and additional debugging messages if THINGSBOARD_ENABLE_DEBUG is set, default = DefaultLogger |
| MaxSubscriptions | Maximum amount of simultaneous shared attribute update subscriptions. Once the maximum amount has been reached it is not possible to increase the size, this is done because it allows to allcoate the memory on the stack instead of the heap, default = DEFAULT_SUBSCRIPTION_AMOUNT (1) |
| MaxAttributes | Maximum amount of attributes that will ever be subscribed with one Shared_Attribute_Callback, allows to use an array on the stack in the background, default = DEFAULT_ATTRIBUTES_AMOUNT (1) |