File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,6 @@ class ArduinoIoTCloudClass
131
131
inline ArduinoIoTConnectionStatus getIoTStatus () { return _iotStatus; }
132
132
133
133
String _device_id = " " ;
134
- String _thing_id = " " ;
135
134
136
135
ArduinoIoTConnectionStatus _iotStatus = ArduinoIoTConnectionStatus::IDLE;
137
136
ArduinoIoTSynchronizationStatus _syncStatus = ArduinoIoTSynchronizationStatus::SYNC_STATUS_SYNCHRONIZED;
@@ -146,6 +145,10 @@ class ArduinoIoTCloudClass
146
145
147
146
static void execCloudEventCallback (OnCloudEventCallback & callback, void * callback_arg);
148
147
static void printConnectionStatus (ArduinoIoTConnectionStatus status);
148
+
149
+ private:
150
+
151
+ String _thing_id = " " ;
149
152
};
150
153
151
154
#ifdef HAS_TCP
Original file line number Diff line number Diff line change @@ -121,10 +121,10 @@ class ArduinoIoTCloudTCP: public ArduinoIoTCloudClass {
121
121
122
122
inline String getTopic_stdin () const { return String (" /a/d/" + _device_id + " /s/i" ); }
123
123
inline String getTopic_stdout () const { return String (" /a/d/" + _device_id + " /s/o" ); }
124
- inline String getTopic_shadowout () const { return (_thing_id .length () == 0 ) ? String (" " ) : String (" /a/t/" + _thing_id + " /shadow/o" ); }
125
- inline String getTopic_shadowin () const { return (_thing_id .length () == 0 ) ? String (" " ) : String (" /a/t/" + _thing_id + " /shadow/i" ); }
126
- inline String getTopic_dataout () const { return (_thing_id .length () == 0 ) ? String (" /a/d/" + _device_id + " /e/o" ) : String (" /a/t/" + _thing_id + " /e/o" ); }
127
- inline String getTopic_datain () const { return (_thing_id .length () == 0 ) ? String (" /a/d/" + _device_id + " /e/i" ) : String (" /a/t/" + _thing_id + " /e/i" ); }
124
+ inline String getTopic_shadowout () const { return ( getThingId () .length () == 0 ) ? String (" " ) : String (" /a/t/" + getThingId () + " /shadow/o" ); }
125
+ inline String getTopic_shadowin () const { return ( getThingId () .length () == 0 ) ? String (" " ) : String (" /a/t/" + getThingId () + " /shadow/i" ); }
126
+ inline String getTopic_dataout () const { return ( getThingId () .length () == 0 ) ? String (" /a/d/" + _device_id + " /e/o" ) : String (" /a/t/" + getThingId () + " /e/o" ); }
127
+ inline String getTopic_datain () const { return ( getThingId () .length () == 0 ) ? String (" /a/d/" + _device_id + " /e/i" ) : String (" /a/t/" + getThingId () + " /e/i" ); }
128
128
129
129
static void onMessage (int length);
130
130
void handleMessage (int length);
You can’t perform that action at this time.
0 commit comments