Skip to content

Commit 8a6038c

Browse files
committed
Improve implementation readability and start adjusting all comments.
1 parent 295a73e commit 8a6038c

File tree

39 files changed

+528
-748
lines changed

39 files changed

+528
-748
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ Arduino_MQTT_Client mqttClient(espClient);
710710
// ThingsBoard tb(mqttClient);
711711

712712
// The SDK setup with 128 bytes for JSON payload and 32 fields for JSON object
713-
ThingsBoardSized<32, Default_Response_Amount, CustomLogger> tb(mqttClient, 128, 128);
713+
ThingsBoardSized<32, DEFAULT_RESPONSE_AMOUNT, CustomLogger> tb(mqttClient, 128, 128);
714714
```
715715
716716
## Have a question or proposal?

examples/0002-arduino_rpc/0002-arduino_rpc.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ IAPI_Implementation* apis[1U] = {
5858
&rpc
5959
};
6060
// Initialize ThingsBoard instance with the maximum needed buffer sizes
61-
ThingsBoard tb(mqttClient, MAX_MESSAGE_RECEIVE_SIZE, MAX_MESSAGE_SEND_SIZE, Default_Max_Stack_Size, apis + 0U, apis + 1U);
61+
ThingsBoard tb(mqttClient, MAX_MESSAGE_RECEIVE_SIZE, MAX_MESSAGE_SEND_SIZE, DEFAULT_MAX_STACK_SIZE, apis + 0U, apis + 1U);
6262

6363

6464
// Statuses for subscribing to rpc

examples/0003-esp8266_esp32_send_data/0003-esp8266_esp32_send_data.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,15 @@ const std::array<IAPI_Implementation*, 0U> apis = {};
139139
// Initialize ThingsBoard instance with the maximum needed buffer size
140140
#if THINGSBOARD_ENABLE_DYNAMIC
141141
#if THINGSBOARD_ENABLE_STREAM_UTILS
142-
ThingsBoard tb(mqttClient, MAX_MESSAGE_RECEIVE_SIZE, MAX_MESSAGE_SEND_SIZE, Default_Max_Stack_Size, Default_Buffering_Size, Default_Max_Response_Size, apis.cbegin(), apis.cend());
142+
ThingsBoard tb(mqttClient, MAX_MESSAGE_RECEIVE_SIZE, MAX_MESSAGE_SEND_SIZE, DEFAULT_MAX_STACK_SIZE, DEFAULT_BUFFERING_SIZE, DEFAULT_MAX_RESPONSE_SIZE, apis.cbegin(), apis.cend());
143143
#else
144-
ThingsBoard tb(mqttClient, MAX_MESSAGE_RECEIVE_SIZE, MAX_MESSAGE_SEND_SIZE, Default_Max_Stack_Size, Default_Max_Response_Size, apis.cbegin(), apis.cend());
144+
ThingsBoard tb(mqttClient, MAX_MESSAGE_RECEIVE_SIZE, MAX_MESSAGE_SEND_SIZE, DEFAULT_MAX_STACK_SIZE, DEFAULT_MAX_RESPONSE_SIZE, apis.cbegin(), apis.cend());
145145
#endif
146146
#else
147147
#if THINGSBOARD_ENABLE_STREAM_UTILS
148-
ThingsBoard tb(mqttClient, MAX_MESSAGE_RECEIVE_SIZE, MAX_MESSAGE_SEND_SIZE, Default_Max_Stack_Size, Default_Buffering_Size, apis.cbegin(), apis.cend());
148+
ThingsBoard tb(mqttClient, MAX_MESSAGE_RECEIVE_SIZE, MAX_MESSAGE_SEND_SIZE, DEFAULT_MAX_STACK_SIZE, DEFAULT_BUFFERING_SIZE, apis.cbegin(), apis.cend());
149149
#else
150-
ThingsBoard tb(mqttClient, MAX_MESSAGE_RECEIVE_SIZE, MAX_MESSAGE_SEND_SIZE, Default_Max_Stack_Size, apis.cbegin(), apis.cend());
150+
ThingsBoard tb(mqttClient, MAX_MESSAGE_RECEIVE_SIZE, MAX_MESSAGE_SEND_SIZE, DEFAULT_MAX_STACK_SIZE, apis.cbegin(), apis.cend());
151151
#endif
152152
#endif
153153
#endif

examples/0006-esp8266_esp32_process_shared_attribute_update/0006-esp8266_esp32_process_shared_attribute_update.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ const std::array<IAPI_Implementation*, 1U> apis = {
111111
&shared_update
112112
};
113113
// Initialize ThingsBoard instance with the maximum needed buffer size
114-
ThingsBoard tb(mqttClient, MAX_MESSAGE_RECEIVE_SIZE, MAX_MESSAGE_SEND_SIZE, Default_Max_Stack_Size, apis);
114+
ThingsBoard tb(mqttClient, MAX_MESSAGE_RECEIVE_SIZE, MAX_MESSAGE_SEND_SIZE, DEFAULT_MAX_STACK_SIZE, apis);
115115

116116
// Statuses for subscribing to shared attributes
117117
bool subscribed = false;

examples/0008-esp8266_esp32_provision_device/0008-esp8266_esp32_provision_device.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ const std::array<IAPI_Implementation*, 1U> apis = {
121121
&prov
122122
};
123123
// Initialize ThingsBoard instance with the maximum needed buffer size
124-
ThingsBoard tb(mqttClient, MAX_MESSAGE_RECEIVE_SIZE, MAX_MESSAGE_SEND_SIZE, Default_Max_Stack_Size, apis);
124+
ThingsBoard tb(mqttClient, MAX_MESSAGE_RECEIVE_SIZE, MAX_MESSAGE_SEND_SIZE, DEFAULT_MAX_STACK_SIZE, apis);
125125

126126
uint32_t previous_processing_time = 0U;
127127

examples/0009-esp8266_esp32_process_OTA_MQTT/0009-esp8266_esp32_process_OTA_MQTT.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ const std::array<IAPI_Implementation*, 1U> apis = {
128128
&ota
129129
};
130130
// Initialize ThingsBoard instance with the maximum needed buffer size
131-
ThingsBoard tb(mqttClient, MAX_MESSAGE_RECEIVE_SIZE, MAX_MESSAGE_SEND_SIZE, Default_Max_Stack_Size, apis);
131+
ThingsBoard tb(mqttClient, MAX_MESSAGE_RECEIVE_SIZE, MAX_MESSAGE_SEND_SIZE, DEFAULT_MAX_STACK_SIZE, apis);
132132
// Initalize the Updater client instance used to flash binary to flash memory
133133
#ifdef ESP8266
134134
Arduino_ESP8266_Updater updater;

examples/0010-esp8266_esp32_rpc/0010-esp8266_esp32_rpc.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ const std::array<IAPI_Implementation*, 1U> apis = {
107107
&rpc
108108
};
109109
// Initialize ThingsBoard instance with the maximum needed buffer size
110-
ThingsBoard tb(mqttClient, MAX_MESSAGE_RECEIVE_SIZE, MAX_MESSAGE_SEND_SIZE, Default_Max_Stack_Size, apis);
110+
ThingsBoard tb(mqttClient, MAX_MESSAGE_RECEIVE_SIZE, MAX_MESSAGE_SEND_SIZE, DEFAULT_MAX_STACK_SIZE, apis);
111111

112112
// Statuses for subscribing to rpc
113113
bool subscribed = false;

examples/0011-esp8266_esp32_subscribe_OTA_MQTT/0011-esp8266_esp32_subscribe_OTA_MQTT.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ const std::array<IAPI_Implementation*, 1U> apis = {
123123
&ota
124124
};
125125
// Initialize ThingsBoard instance with the maximum needed buffer size
126-
ThingsBoard tb(mqttClient, MAX_MESSAGE_RECEIVE_SIZE, MAX_MESSAGE_SEND_SIZE, Default_Max_Stack_Size, apis);
126+
ThingsBoard tb(mqttClient, MAX_MESSAGE_RECEIVE_SIZE, MAX_MESSAGE_SEND_SIZE, DEFAULT_MAX_STACK_SIZE, apis);
127127
// Initalize the Updater client instance used to flash binary to flash memory
128128
#ifdef ESP8266
129129
Arduino_ESP8266_Updater updater;

examples/0012-esp8266_esp32_request_shared_attribute/0012-esp8266_esp32_request_shared_attribute.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ const std::array<IAPI_Implementation*, 1U> apis = {
112112
&attr_request
113113
};
114114
// Initialize ThingsBoard instance with the maximum needed buffer size
115-
ThingsBoard tb(mqttClient, MAX_MESSAGE_RECEIVE_SIZE, MAX_MESSAGE_SEND_SIZE, Default_Max_Stack_Size, apis);
115+
ThingsBoard tb(mqttClient, MAX_MESSAGE_RECEIVE_SIZE, MAX_MESSAGE_SEND_SIZE, DEFAULT_MAX_STACK_SIZE, apis);
116116

117117
// Statuses for requesting of attributes
118118
bool requestedClient = false;

examples/0013-esp8266_esp32_request_rpc/0013-esp8266_esp32_request_rpc.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ const std::array<IAPI_Implementation*, 1U> apis = {
104104
&rpc_request
105105
};
106106
// Initialize ThingsBoard instance with the maximum needed buffer size
107-
ThingsBoard tb(mqttClient, MAX_MESSAGE_RECEIVE_SIZE, MAX_MESSAGE_SEND_SIZE, Default_Max_Stack_Size, apis);
107+
ThingsBoard tb(mqttClient, MAX_MESSAGE_RECEIVE_SIZE, MAX_MESSAGE_SEND_SIZE, DEFAULT_MAX_STACK_SIZE, apis);
108108

109109
// Statuses for subscribing to rpc
110110
bool subscribed = false;

0 commit comments

Comments
 (0)