@@ -69,53 +69,58 @@ void ArduinoIoTCloudClass::addCallback(ArduinoIoTCloudEvent const event, OnCloud
69
69
/* The following methods are used for non-LoRa boards */
70
70
Property& ArduinoIoTCloudClass::addPropertyReal (bool & property, String name, Permission const permission)
71
71
{
72
- return addPropertyReal (property, _thing_property_container, name, -1 , permission);
72
+ return addPropertyReal (property, name, -1 , permission);
73
73
}
74
74
Property& ArduinoIoTCloudClass::addPropertyReal (float & property, String name, Permission const permission)
75
75
{
76
- return addPropertyReal (property, _thing_property_container, name, -1 , permission);
76
+ return addPropertyReal (property, name, -1 , permission);
77
77
}
78
78
Property& ArduinoIoTCloudClass::addPropertyReal (int & property, String name, Permission const permission)
79
79
{
80
- return addPropertyReal (property, _thing_property_container, name, -1 , permission);
80
+ return addPropertyReal (property, name, -1 , permission);
81
81
}
82
82
Property& ArduinoIoTCloudClass::addPropertyReal (unsigned int & property, String name, Permission const permission)
83
83
{
84
- return addPropertyReal (property, _thing_property_container, name, -1 , permission);
84
+ return addPropertyReal (property, name, -1 , permission);
85
85
}
86
86
Property& ArduinoIoTCloudClass::addPropertyReal (String& property, String name, Permission const permission)
87
87
{
88
- return addPropertyReal (property, _thing_property_container, name, -1 , permission);
88
+ return addPropertyReal (property, name, -1 , permission);
89
89
}
90
90
Property& ArduinoIoTCloudClass::addPropertyReal (Property& property, String name, Permission const permission)
91
91
{
92
- return addPropertyReal (property, _thing_property_container, name, -1 , permission);
92
+ return addPropertyReal (property, name, -1 , permission);
93
93
}
94
94
95
- /* The following methods are used for LoRa boards */
95
+ /* The following methods are used for both LoRa and non-Lora boards */
96
96
Property& ArduinoIoTCloudClass::addPropertyReal (bool & property, String name, int tag, Permission const permission)
97
97
{
98
- return addPropertyReal (property, _thing_property_container, name, tag, permission);
98
+ Property* p = new CloudWrapperBool (property);
99
+ return addPropertyReal (*p, name, tag, permission);
99
100
}
100
101
Property& ArduinoIoTCloudClass::addPropertyReal (float & property, String name, int tag, Permission const permission)
101
102
{
102
- return addPropertyReal (property, _thing_property_container, name, tag, permission);
103
+ Property* p = new CloudWrapperFloat (property);
104
+ return addPropertyReal (*p, name, tag, permission);
103
105
}
104
106
Property& ArduinoIoTCloudClass::addPropertyReal (int & property, String name, int tag, Permission const permission)
105
107
{
106
- return addPropertyReal (property, _thing_property_container, name, tag, permission);
108
+ Property* p = new CloudWrapperInt (property);
109
+ return addPropertyReal (*p, name, tag, permission);
107
110
}
108
111
Property& ArduinoIoTCloudClass::addPropertyReal (unsigned int & property, String name, int tag, Permission const permission)
109
112
{
110
- return addPropertyReal (property, _thing_property_container, name, tag, permission);
113
+ Property* p = new CloudWrapperUnsignedInt (property);
114
+ return addPropertyReal (*p, name, tag, permission);
111
115
}
112
116
Property& ArduinoIoTCloudClass::addPropertyReal (String& property, String name, int tag, Permission const permission)
113
117
{
114
- return addPropertyReal (property, _thing_property_container, name, tag, permission);
118
+ Property* p = new CloudWrapperString (property);
119
+ return addPropertyReal (*p, name, tag, permission);
115
120
}
116
121
Property& ArduinoIoTCloudClass::addPropertyReal (Property& property, String name, int tag, Permission const permission)
117
122
{
118
- return addPropertyReal (property, _thing_property_container , name, tag, permission );
123
+ return addPropertyToContainer (_thing_property_container, property , name, permission, tag );
119
124
}
120
125
121
126
/* The following methods are deprecated but still used for non-LoRa boards */
@@ -205,37 +210,3 @@ __attribute__((weak)) void setDebugMessageLevel(int const /* level */)
205
210
/* do nothing */
206
211
}
207
212
208
- /* *****************************************************************************
209
- * PRIVATE MEMBER FUNCTIONS
210
- ******************************************************************************/
211
-
212
- /* The following methods are used for both LoRa and non-LoRa boards */
213
- Property& ArduinoIoTCloudClass::addPropertyReal (bool & property, PropertyContainer &prop_cont, String name, int tag, Permission const permission)
214
- {
215
- Property* p = new CloudWrapperBool (property);
216
- return addPropertyReal (*p, prop_cont, name, tag, permission);
217
- }
218
- Property& ArduinoIoTCloudClass::addPropertyReal (float & property, PropertyContainer &prop_cont, String name, int tag, Permission const permission)
219
- {
220
- Property* p = new CloudWrapperFloat (property);
221
- return addPropertyReal (*p, prop_cont, name, tag, permission);
222
- }
223
- Property& ArduinoIoTCloudClass::addPropertyReal (int & property, PropertyContainer &prop_cont, String name, int tag, Permission const permission)
224
- {
225
- Property* p = new CloudWrapperInt (property);
226
- return addPropertyReal (*p, prop_cont, name, tag, permission);
227
- }
228
- Property& ArduinoIoTCloudClass::addPropertyReal (unsigned int & property, PropertyContainer &prop_cont, String name, int tag, Permission const permission)
229
- {
230
- Property* p = new CloudWrapperUnsignedInt (property);
231
- return addPropertyReal (*p, prop_cont, name, tag, permission);
232
- }
233
- Property& ArduinoIoTCloudClass::addPropertyReal (String& property, PropertyContainer &prop_cont, String name, int tag, Permission const permission)
234
- {
235
- Property* p = new CloudWrapperString (property);
236
- return addPropertyReal (*p, prop_cont, name, tag, permission);
237
- }
238
- Property& ArduinoIoTCloudClass::addPropertyReal (Property& property, PropertyContainer &prop_cont, String name, int tag, Permission const permission)
239
- {
240
- return addPropertyToContainer (prop_cont, property, name, permission, tag);
241
- }
0 commit comments