@@ -44,12 +44,12 @@ ArduinoIoTCloudClass::ArduinoIoTCloudClass()
44
44
45
45
void ArduinoIoTCloudClass::push ()
46
46
{
47
- requestUpdateForAllProperties (_property_container );
47
+ requestUpdateForAllProperties (_thing_property_container );
48
48
}
49
49
50
50
bool ArduinoIoTCloudClass::setTimestamp (String const & prop_name, unsigned long const timestamp)
51
51
{
52
- Property * p = getProperty (_property_container , prop_name);
52
+ Property * p = getProperty (_thing_property_container , prop_name);
53
53
54
54
if (p == nullptr )
55
55
return false ;
@@ -81,20 +81,30 @@ void ArduinoIoTCloudClass::addPropertyReal(Property& property, String name, int
81
81
}
82
82
83
83
if (seconds == ON_CHANGE) {
84
- addPropertyToContainer (_property_container , property, name, permission, tag).publishOnChange (minDelta, Property::DEFAULT_MIN_TIME_BETWEEN_UPDATES_MILLIS).onUpdate (fn).onSync (synFn);
84
+ addPropertyToContainer (_thing_property_container , property, name, permission, tag).publishOnChange (minDelta, Property::DEFAULT_MIN_TIME_BETWEEN_UPDATES_MILLIS).onUpdate (fn).onSync (synFn);
85
85
} else {
86
- addPropertyToContainer (_property_container , property, name, permission, tag).publishEvery (seconds).onUpdate (fn).onSync (synFn);
86
+ addPropertyToContainer (_thing_property_container , property, name, permission, tag).publishEvery (seconds).onUpdate (fn).onSync (synFn);
87
87
}
88
88
}
89
89
90
90
Property& ArduinoIoTCloudClass::addPropertyReal (Property& property, String name, Permission const permission)
91
91
{
92
- return addPropertyToContainer (_property_container , property, name, permission);
92
+ return addPropertyToContainer (_thing_property_container , property, name, permission);
93
93
}
94
94
95
95
Property& ArduinoIoTCloudClass::addPropertyReal (Property& property, String name, int tag, Permission const permission)
96
96
{
97
- return addPropertyToContainer (_property_container, property, name, permission, tag);
97
+ return addPropertyToContainer (_thing_property_container, property, name, permission, tag);
98
+ }
99
+
100
+ Property& ArduinoIoTCloudClass::addPropertyReal (Property& property, PropertyContainer &prop_cont, String name, Permission const permission)
101
+ {
102
+ return addPropertyToContainer (prop_cont, property, name, permission, -1 );
103
+ }
104
+
105
+ Property& ArduinoIoTCloudClass::addPropertyReal (Property& property, PropertyContainer &prop_cont, String name, int tag, Permission const permission)
106
+ {
107
+ return addPropertyToContainer (prop_cont, property, name, permission, tag);
98
108
}
99
109
100
110
void ArduinoIoTCloudClass::addPropertyReal (bool & property, String name, permissionType permission_type, long seconds, void (*fn)(void ), float minDelta, void(*synFn)(Property & property))
@@ -110,13 +120,23 @@ void ArduinoIoTCloudClass::addPropertyReal(bool& property, String name, int tag,
110
120
111
121
Property& ArduinoIoTCloudClass::addPropertyReal (bool & property, String name, Permission const permission)
112
122
{
113
- return addPropertyReal (property, name, -1 , permission);
123
+ return addPropertyReal (property, _thing_property_container, name, -1 , permission);
114
124
}
115
125
116
126
Property& ArduinoIoTCloudClass::addPropertyReal (bool & property, String name, int tag, Permission const permission)
127
+ {
128
+ return addPropertyReal (property, _thing_property_container, name, tag, permission);
129
+ }
130
+
131
+ Property& ArduinoIoTCloudClass::addPropertyReal (bool & property, PropertyContainer &prop_cont, String name, Permission const permission)
132
+ {
133
+ return addPropertyReal (property, prop_cont, name, -1 , permission);
134
+ }
135
+
136
+ Property& ArduinoIoTCloudClass::addPropertyReal (bool & property, PropertyContainer &prop_cont, String name, int tag, Permission const permission)
117
137
{
118
138
Property* p = new CloudWrapperBool (property);
119
- return addPropertyToContainer (_property_container , *p, name, permission, tag);
139
+ return addPropertyToContainer (prop_cont , *p, name, permission, tag);
120
140
}
121
141
122
142
void ArduinoIoTCloudClass::addPropertyReal (float & property, String name, permissionType permission_type, long seconds, void (*fn)(void ), float minDelta, void(*synFn)(Property & property))
@@ -132,13 +152,23 @@ void ArduinoIoTCloudClass::addPropertyReal(float& property, String name, int tag
132
152
133
153
Property& ArduinoIoTCloudClass::addPropertyReal (float & property, String name, Permission const permission)
134
154
{
135
- return addPropertyReal (property, name, -1 , permission);
155
+ return addPropertyReal (property, _thing_property_container, name, -1 , permission);
136
156
}
137
157
138
158
Property& ArduinoIoTCloudClass::addPropertyReal (float & property, String name, int tag, Permission const permission)
159
+ {
160
+ return addPropertyReal (property, _thing_property_container, name, tag, permission);
161
+ }
162
+
163
+ Property& ArduinoIoTCloudClass::addPropertyReal (float & property, PropertyContainer &prop_cont, String name, Permission const permission)
164
+ {
165
+ return addPropertyReal (property, prop_cont, name, -1 , permission);
166
+ }
167
+
168
+ Property& ArduinoIoTCloudClass::addPropertyReal (float & property, PropertyContainer &prop_cont, String name, int tag, Permission const permission)
139
169
{
140
170
Property* p = new CloudWrapperFloat (property);
141
- return addPropertyToContainer (_property_container , *p, name, permission, tag);
171
+ return addPropertyToContainer (prop_cont , *p, name, permission, tag);
142
172
}
143
173
144
174
void ArduinoIoTCloudClass::addPropertyReal (int & property, String name, permissionType permission_type, long seconds, void (*fn)(void ), float minDelta, void(*synFn)(Property & property))
@@ -154,13 +184,23 @@ void ArduinoIoTCloudClass::addPropertyReal(int& property, String name, int tag,
154
184
155
185
Property& ArduinoIoTCloudClass::addPropertyReal (int & property, String name, Permission const permission)
156
186
{
157
- return addPropertyReal (property, name, -1 , permission);
187
+ return addPropertyReal (property, _thing_property_container, name, -1 , permission);
158
188
}
159
189
160
190
Property& ArduinoIoTCloudClass::addPropertyReal (int & property, String name, int tag, Permission const permission)
191
+ {
192
+ return addPropertyReal (property, _thing_property_container, name, tag, permission);
193
+ }
194
+
195
+ Property& ArduinoIoTCloudClass::addPropertyReal (int & property, PropertyContainer &prop_cont, String name, Permission const permission)
196
+ {
197
+ return addPropertyReal (property, prop_cont, name, -1 , permission);
198
+ }
199
+
200
+ Property& ArduinoIoTCloudClass::addPropertyReal (int & property, PropertyContainer &prop_cont, String name, int tag, Permission const permission)
161
201
{
162
202
Property* p = new CloudWrapperInt (property);
163
- return addPropertyToContainer (_property_container , *p, name, permission, tag);
203
+ return addPropertyToContainer (prop_cont , *p, name, permission, tag);
164
204
}
165
205
166
206
void ArduinoIoTCloudClass::addPropertyReal (unsigned int & property, String name, permissionType permission_type, long seconds, void (*fn)(void ), float minDelta, void(*synFn)(Property & property))
@@ -176,13 +216,23 @@ void ArduinoIoTCloudClass::addPropertyReal(unsigned int& property, String name,
176
216
177
217
Property& ArduinoIoTCloudClass::addPropertyReal (unsigned int & property, String name, Permission const permission)
178
218
{
179
- return addPropertyReal (property, name, -1 , permission);
219
+ return addPropertyReal (property, _thing_property_container, name, -1 , permission);
180
220
}
181
221
182
222
Property& ArduinoIoTCloudClass::addPropertyReal (unsigned int & property, String name, int tag, Permission const permission)
223
+ {
224
+ return addPropertyReal (property, _thing_property_container, name, tag, permission);
225
+ }
226
+
227
+ Property& ArduinoIoTCloudClass::addPropertyReal (unsigned int & property, PropertyContainer &prop_cont, String name, Permission const permission)
228
+ {
229
+ return addPropertyReal (property, prop_cont, name, -1 , permission);
230
+ }
231
+
232
+ Property& ArduinoIoTCloudClass::addPropertyReal (unsigned int & property, PropertyContainer &prop_cont, String name, int tag, Permission const permission)
183
233
{
184
234
Property* p = new CloudWrapperUnsignedInt (property);
185
- return addPropertyToContainer (_property_container , *p, name, permission, tag);
235
+ return addPropertyToContainer (prop_cont , *p, name, permission, tag);
186
236
}
187
237
188
238
void ArduinoIoTCloudClass::addPropertyReal (String& property, String name, permissionType permission_type, long seconds, void (*fn)(void ), float minDelta, void(*synFn)(Property & property))
@@ -198,13 +248,23 @@ void ArduinoIoTCloudClass::addPropertyReal(String& property, String name, int ta
198
248
199
249
Property& ArduinoIoTCloudClass::addPropertyReal (String& property, String name, Permission const permission)
200
250
{
201
- return addPropertyReal (property, name, -1 , permission);
251
+ return addPropertyReal (property, _thing_property_container, name, -1 , permission);
202
252
}
203
253
204
254
Property& ArduinoIoTCloudClass::addPropertyReal (String& property, String name, int tag, Permission const permission)
255
+ {
256
+ return addPropertyReal (property, _thing_property_container, name, tag, permission);
257
+ }
258
+
259
+ Property& ArduinoIoTCloudClass::addPropertyReal (String& property, PropertyContainer &prop_cont, String name, Permission const permission)
260
+ {
261
+ return addPropertyReal (property, prop_cont, name, -1 , permission);
262
+ }
263
+
264
+ Property& ArduinoIoTCloudClass::addPropertyReal (String& property, PropertyContainer &prop_cont, String name, int tag, Permission const permission)
205
265
{
206
266
Property* p = new CloudWrapperString (property);
207
- return addPropertyToContainer (_property_container , *p, name, permission, tag);
267
+ return addPropertyToContainer (prop_cont , *p, name, permission, tag);
208
268
}
209
269
210
270
/* *****************************************************************************
0 commit comments