ThingsBoard Client SDK 0.16.0
Client SDK to connect with ThingsBoard IoT Platform from IoT devices (Arduino, Espressif, etc.)
Loading...
Searching...
No Matches
IUpdater.h
Go to the documentation of this file.
1#ifndef IUpdater_h
2#define IUpdater_h
3
4// Local include.
5#include "Configuration.h"
6#include "DefaultLogger.h"
7
8// Library include.
9#include <stddef.h>
10#include <stdint.h>
11
12
14class IUpdater {
15 public:
17 virtual ~IUpdater() {}
18
22 virtual bool begin(size_t const & firmware_size) = 0;
23
28 virtual size_t write(uint8_t * payload, size_t const & total_bytes) = 0;
29
31 virtual void reset() = 0;
32
35 virtual bool end() = 0;
36};
37
38#endif // IUpdater_h
Updater interface that contains the method that a class that can be used to flash given binary data o...
Definition: IUpdater.h:14
virtual size_t write(uint8_t *payload, size_t const &total_bytes)=0
Writes the given amount of bytes of the packet data.
virtual bool begin(size_t const &firmware_size)=0
Initalizes the writing of the given data.
virtual void reset()=0
Resets the writing of the given data so it can be restarted with begin.
virtual ~IUpdater()
Virtual default destructor, created to ensure that if a pointer to this class is used and deleted,...
Definition: IUpdater.h:17
virtual bool end()=0
Ends the update and returns wheter it was successfully completed.