semilimes mcu sdk 1.1.4 semilimes Software Development Kit for microcontrollers

Loading...
Searching...
No Matches
provisioning.h
1#ifndef _provisioning_
2#define _provisioning_
3
4#include "../defines.h"
5
6 class Provisioning
7{
8 private:
9 SmeJson json_data;
10 char* json = nullptr;
11 char* json_reset = nullptr;
12
13 public:
14// Function: ~Provisioning
15
16// distructor of the class, frees up the memory occupied by the array/s
17
18// Prototype:
19// ~Provisioning()
20
21// Parameters:
22
23// Returns:
25 ~Provisioning()
26 {
27 delete[] json;
28 json = nullptr;
29 delete[] json_reset;
30 json_reset = nullptr;
31 }
32
33// Function: Provisioning.set
34
35// create the json needed to Register and Claim the device
36
37// Prototype:
38// void Provisioning::set(const char* devId, const char* provKey);
39
40// Parameters:
43
44// Returns:
46 void set(const char* devId, const char* provKey);
47
48// Function: Provisioning.get
49
50// return the json script
51
52// Prototype:
53// void Provisioning::get();
54
55// Parameters:
56
57// Returns:
59 char* get();
60
61// Function: Provisioning.getRegisterDeviceURL
62
63// provide the url to register the device
64
65// Prototype:
66// char* Provisioning::getRegisterDeviceURL();
67
68// Parameters:
69
70// Returns:
72 char* getRegisterDeviceURL();
73
74// Function: Provisioning.getDeviceClaimStatusURL
75
76// provide the url to claim the device
77
78// Prototype:
79// char* Provisioning::getDeviceClaimStatusURL();
80
81// Parameters:
82
83// Returns:
85 char* getDeviceClaimStatusURL();
86
87// Function: Provisioning.getResetDeviceURL
88
89// provide the url to reset the device
90
91// Prototype:
92// char* Provisioning::getResetDeviceURL();
93
94// Parameters:
95
96// Returns:
98 char* getResetDeviceURL();
99
100// Function: Provisioning.getReset
101
102// return the json script to reset the device
103
104// Prototype:
105// void Provisioning::getReset();
106
107// Parameters:
108
109// Returns:
111 char* getReset();
112};
113
114#endif
Provisioning
Definition provisioning.h:7
Provisioning::getRegisterDeviceURL
char * getRegisterDeviceURL()
Definition provisioning.cpp:60
Provisioning::~Provisioning
~Provisioning()
Definition provisioning.h:25
Provisioning::get
char * get()
Definition provisioning.cpp:43
Provisioning::getDeviceClaimStatusURL
char * getDeviceClaimStatusURL()
Definition provisioning.cpp:77
Provisioning::getResetDeviceURL
char * getResetDeviceURL()
Definition provisioning.cpp:94
Provisioning::getReset
char * getReset()
Definition provisioning.cpp:111
Provisioning::set
void set(const char *devId, const char *provKey)
Definition provisioning.cpp:17