Skip to content

Commit d85fa2b

Browse files
committed
rename NetworkConfigurator to NetworkConfiguratorClass
1 parent 5ba50d6 commit d85fa2b

File tree

8 files changed

+77
-77
lines changed

8 files changed

+77
-77
lines changed

examples/auto-retry/auto-retry.ino

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#define RESETCRED_BUTTON BTN_USER
2020
#elif defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT)
2121
#define RESETCRED_BUTTON 7
22-
#else
22+
#else
2323
#define RESETCRED_BUTTON 13
2424
#endif
2525
uint32_t lastUpdate = 0;
@@ -62,17 +62,17 @@ void setup() {
6262
pinMode(RESETCRED_BUTTON, INPUT);
6363
#endif
6464

65-
#if defined(ARDUINO_OPTA)
65+
#if defined(ARDUINO_OPTA)
6666
if(digitalRead(RESETCRED_BUTTON) == LOW){
6767
#else
6868
if (digitalRead(RESETCRED_BUTTON) == HIGH) {
6969
#endif
7070
Serial.println("Resetting cred");
71-
NetworkConf.resetStoredConfiguration();
71+
NetworkConfigurator.resetStoredConfiguration();
7272
}
73-
NetworkConf.startBLEIfConnectionFails(true);
74-
NetworkConf.updateNetworkOptions();
75-
NetworkConf.begin();
73+
NetworkConfigurator.startBLEIfConnectionFails(true);
74+
NetworkConfigurator.updateNetworkOptions();
75+
NetworkConfigurator.begin();
7676
ProvisioningSystem.begin();
7777

7878
ArduinoCloud.printDebugInfo();
@@ -94,7 +94,7 @@ void loop() {
9494
#if defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_MBED)
9595
watchdog_reset();
9696
#endif
97-
NetworkConfiguratorStates s = NetworkConf.poll();
97+
NetworkConfiguratorStates s = NetworkConfigurator.poll();
9898
if (s == NetworkConfiguratorStates::CONFIGURED && !toUpdate) {
9999
networkConfigured = true;
100100
changeMode(DeviceMode::RUN);
@@ -117,7 +117,7 @@ void loop() {
117117
networkConfigured = false;
118118
}
119119

120-
if (NetworkConf.poll() == NetworkConfiguratorStates::UPDATING_CONFIG) {
120+
if (NetworkConfigurator.poll() == NetworkConfiguratorStates::UPDATING_CONFIG) {
121121
networkConfigured = false;
122122
changeMode(DeviceMode::CONFIG);
123123
return;

examples/auto-retry/thingProperties.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ void initProperties() {
2727
}
2828

2929
GenericConnectionHandler ArduinoIoTPreferredConnection;
30-
NetworkConfigurator NetworkConf(AgentsManager, ArduinoIoTPreferredConnection);
30+
NetworkConfiguratorClass NetworkConfigurator(AgentsManager, ArduinoIoTPreferredConnection);
3131
Provisioning ProvisioningSystem(AgentsManager);

examples/network-setting/network-setting.ino

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "arduino_secrets.h"
2-
/*
2+
/*
33
Sketch generated by the Arduino IoT Cloud Thing "Untitled"
4-
https://create.arduino.cc/cloud/things/4074e850-7086-4682-ba53-0f3bbcb52f12
4+
https://create.arduino.cc/cloud/things/4074e850-7086-4682-ba53-0f3bbcb52f12
55
66
Arduino IoT Cloud Variables description
77
@@ -20,7 +20,7 @@
2020
#define RESETCRED_BUTTON BTN_USER
2121
#elif defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT)
2222
#define RESETCRED_BUTTON 7
23-
#else
23+
#else
2424
#define RESETCRED_BUTTON 13
2525
#endif
2626
uint32_t lastUpdate = 0;
@@ -62,15 +62,15 @@ void setup() {
6262
pinMode(RESETCRED_BUTTON, INPUT);
6363
#endif
6464

65-
#if defined(ARDUINO_OPTA)
65+
#if defined(ARDUINO_OPTA)
6666
if(digitalRead(RESETCRED_BUTTON) == LOW){
6767
#else
6868
if (digitalRead(RESETCRED_BUTTON) == HIGH) {
6969
#endif
7070
Serial.println("Resetting cred");
71-
NetworkConf.resetStoredConfiguration();
71+
NetworkConfigurator.resetStoredConfiguration();
7272
}
73-
73+
7474
/*
7575
The following function allows you to obtain more information
7676
related to the state of network and IoT Cloud connection and errors
@@ -79,7 +79,7 @@ void setup() {
7979
Maximum is 4
8080
*/
8181
setDebugMessageLevel(4);
82-
NetworkConf.begin();
82+
NetworkConfigurator.begin();
8383
ArduinoCloud.printDebugInfo();
8484
}
8585

@@ -88,11 +88,11 @@ void loop() {
8888
#if defined (ARDUINO_ARCH_SAMD) || defined (ARDUINO_ARCH_MBED)
8989
watchdog_reset();
9090
#endif
91-
NetworkConfiguratorStates s = NetworkConf.poll();
91+
NetworkConfiguratorStates s = NetworkConfigurator.poll();
9292
if( s == NetworkConfiguratorStates::CONFIGURED){
9393
changeMode(DeviceMode::RUN);
9494
}
95-
95+
9696
}else if(deviceMode == DeviceMode::RUN){
9797
ArduinoCloud.update();
9898
//Restart BLE if button is pressed
@@ -107,18 +107,18 @@ void loop() {
107107
}
108108
}
109109

110-
if (NetworkConf.poll() == NetworkConfiguratorStates::UPDATING_CONFIG) {
110+
if (NetworkConfigurator.poll() == NetworkConfiguratorStates::UPDATING_CONFIG) {
111111
changeMode(DeviceMode::CONFIG);
112112
return;
113113
}
114-
// Your code here
114+
// Your code here
115115
if(millis()-lastUpdate >10000){
116116
Serial.println("alive");
117117
lastUpdate = millis();
118118
counter++;
119119
}
120120
}
121-
121+
122122
}
123123

124124
/*

examples/network-setting/thingProperties.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ void onCounterChange();
1717
int counter;
1818

1919
GenericConnectionHandler ArduinoIoTPreferredConnection;
20-
NetworkConfigurator NetworkConf(AgentsManager, ArduinoIoTPreferredConnection);
20+
NetworkConfiguratorClass NetworkConfigurator(AgentsManager, ArduinoIoTPreferredConnection);
2121

2222
void initProperties(){
2323

examples/provisioning/provisioning.ino

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ CSRHandlerClass *CSRHandler;
4242

4343
bool clearStoredCredentials() {
4444
const uint8_t empty[4] = {0x00,0x00,0x00,0x00};
45-
/*if(!NetworkConf.resetStoredConfiguration() || \
45+
/*if(!NetworkConfigurator.resetStoredConfiguration() || \
4646
!secureElement.writeSlot(static_cast<int>(SElementArduinoCloudSlot::DeviceId), (byte*)empty, sizeof(empty)) || \
4747
!secureElement.writeSlot(static_cast<int>(SElementArduinoCloudSlot::CompressedCertificate), (byte*)empty, sizeof(empty))) {
4848
return false;
4949
}*/
50-
if(!NetworkConf.resetStoredConfiguration()) {
50+
if(!NetworkConfigurator.resetStoredConfiguration()) {
5151
Serial.println("reset network config failed");
5252
return false;
5353
}
@@ -126,12 +126,12 @@ void setup() {
126126
if (digitalRead(RESETCRED_BUTTON) == HIGH) {
127127
#endif
128128
Serial.println("Resetting cred");
129-
NetworkConf.resetStoredConfiguration();
129+
NetworkConfigurator.resetStoredConfiguration();
130130
}
131131

132-
NetworkConf.setCheckStoredCred(false);
133-
NetworkConf.updateNetworkOptions();
134-
NetworkConf.begin();
132+
NetworkConfigurator.setCheckStoredCred(false);
133+
NetworkConfigurator.updateNetworkOptions();
134+
NetworkConfigurator.begin();
135135
ClaimingHandler.begin(&secureElement, &uhwid, clearStoredCredentials);
136136

137137
Serial.println("end setup");
@@ -141,7 +141,7 @@ void setup() {
141141
DeviceState handleFirstConfig() {
142142
DeviceState nextState = _state;
143143
ClaimingHandler.poll();
144-
NetworkConfiguratorStates s = NetworkConf.poll();
144+
NetworkConfiguratorStates s = NetworkConfigurator.poll();
145145
if (s == NetworkConfiguratorStates::CONFIGURED) {
146146
String deviceId = "";
147147
SElementArduinoCloudDeviceId::read(secureElement, deviceId, SElementArduinoCloudSlot::DeviceId);
@@ -197,7 +197,7 @@ DeviceState handleRun() {
197197
ArduinoCloud.update();
198198

199199
ClaimingHandler.poll();
200-
if (NetworkConf.poll() == NetworkConfiguratorStates::UPDATING_CONFIG) {
200+
if (NetworkConfigurator.poll() == NetworkConfiguratorStates::UPDATING_CONFIG) {
201201
nextState = DeviceState::FIRST_CONFIG;
202202
}
203203

examples/provisioning/thingProperties.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ void initProperties() {
2020
}
2121

2222
GenericConnectionHandler ArduinoIoTPreferredConnection;
23-
NetworkConfigurator NetworkConf(AgentsManager, ArduinoIoTPreferredConnection);
23+
NetworkConfiguratorClass NetworkConfigurator(AgentsManager, ArduinoIoTPreferredConnection);
2424
ClaimingHandlerClass ClaimingHandler(AgentsManager);

0 commit comments

Comments
 (0)