@@ -170,7 +170,7 @@ void Property::execCallbackOnSync() {
170170CborError Property::append (CborEncoder *encoder, bool lightPayload) {
171171 _lightPayload = lightPayload;
172172 _attributeIdentifier = 0 ;
173- CHECK_CBOR (appendAttributesToCloudReal (encoder));
173+ CHECK_CBOR (appendAttributesToCloud (encoder));
174174 fromLocalToCloud ();
175175 _has_been_updated_once = true ;
176176 _has_been_modified_in_callback = false ;
@@ -181,7 +181,7 @@ CborError Property::append(CborEncoder *encoder, bool lightPayload) {
181181 return CborNoError;
182182}
183183
184- CborError Property::appendAttributeReal (bool value, String attributeName, CborEncoder *encoder) {
184+ CborError Property::appendAttribute (bool value, String attributeName, CborEncoder *encoder) {
185185 return appendAttributeName (attributeName, [value](CborEncoder & mapEncoder)
186186 {
187187 CHECK_CBOR (cbor_encode_int (&mapEncoder, static_cast <int >(CborIntegerMapKey::BooleanValue)));
@@ -190,7 +190,7 @@ CborError Property::appendAttributeReal(bool value, String attributeName, CborEn
190190 }, encoder);
191191}
192192
193- CborError Property::appendAttributeReal (int value, String attributeName, CborEncoder *encoder) {
193+ CborError Property::appendAttribute (int value, String attributeName, CborEncoder *encoder) {
194194 return appendAttributeName (attributeName, [value](CborEncoder & mapEncoder)
195195 {
196196 CHECK_CBOR (cbor_encode_int (&mapEncoder, static_cast <int >(CborIntegerMapKey::Value)));
@@ -199,7 +199,7 @@ CborError Property::appendAttributeReal(int value, String attributeName, CborEnc
199199 }, encoder);
200200}
201201
202- CborError Property::appendAttributeReal (unsigned int value, String attributeName, CborEncoder *encoder) {
202+ CborError Property::appendAttribute (unsigned int value, String attributeName, CborEncoder *encoder) {
203203 return appendAttributeName (attributeName, [value](CborEncoder & mapEncoder)
204204 {
205205 CHECK_CBOR (cbor_encode_int (&mapEncoder, static_cast <int >(CborIntegerMapKey::Value)));
@@ -208,7 +208,7 @@ CborError Property::appendAttributeReal(unsigned int value, String attributeName
208208 }, encoder);
209209}
210210
211- CborError Property::appendAttributeReal (float value, String attributeName, CborEncoder *encoder) {
211+ CborError Property::appendAttribute (float value, String attributeName, CborEncoder *encoder) {
212212 return appendAttributeName (attributeName, [value](CborEncoder & mapEncoder)
213213 {
214214 CHECK_CBOR (cbor_encode_int (&mapEncoder, static_cast <int >(CborIntegerMapKey::Value)));
@@ -217,7 +217,7 @@ CborError Property::appendAttributeReal(float value, String attributeName, CborE
217217 }, encoder);
218218}
219219
220- CborError Property::appendAttributeReal (String value, String attributeName, CborEncoder *encoder) {
220+ CborError Property::appendAttribute (String value, String attributeName, CborEncoder *encoder) {
221221 return appendAttributeName (attributeName, [value](CborEncoder & mapEncoder)
222222 {
223223 CHECK_CBOR (cbor_encode_int (&mapEncoder, static_cast <int >(CborIntegerMapKey::StringValue)));
@@ -278,8 +278,8 @@ void Property::setAttributesFromCloud(std::list<CborMapData> * map_data_list) {
278278 setAttributesFromCloud ();
279279}
280280
281- void Property::setAttributeReal (bool & value, String attributeName) {
282- setAttributeReal (attributeName, [&value](CborMapData & md) {
281+ void Property::setAttribute (bool & value, String attributeName) {
282+ setAttribute (attributeName, [&value](CborMapData & md) {
283283 // Manage the case to have boolean values received as integers 0/1
284284 if (md.bool_val .isSet ()) {
285285 value = md.bool_val .get ();
@@ -295,34 +295,34 @@ void Property::setAttributeReal(bool& value, String attributeName) {
295295 });
296296}
297297
298- void Property::setAttributeReal (int & value, String attributeName) {
299- setAttributeReal (attributeName, [&value](CborMapData & md) {
298+ void Property::setAttribute (int & value, String attributeName) {
299+ setAttribute (attributeName, [&value](CborMapData & md) {
300300 value = md.val .get ();
301301 });
302302}
303303
304- void Property::setAttributeReal (unsigned int & value, String attributeName) {
305- setAttributeReal (attributeName, [&value](CborMapData & md) {
304+ void Property::setAttribute (unsigned int & value, String attributeName) {
305+ setAttribute (attributeName, [&value](CborMapData & md) {
306306 value = md.val .get ();
307307 });
308308}
309309
310- void Property::setAttributeReal (float & value, String attributeName) {
311- setAttributeReal (attributeName, [&value](CborMapData & md) {
310+ void Property::setAttribute (float & value, String attributeName) {
311+ setAttribute (attributeName, [&value](CborMapData & md) {
312312 value = md.val .get ();
313313 });
314314}
315315
316- void Property::setAttributeReal (String& value, String attributeName) {
317- setAttributeReal (attributeName, [&value](CborMapData & md) {
316+ void Property::setAttribute (String& value, String attributeName) {
317+ setAttribute (attributeName, [&value](CborMapData & md) {
318318 value = md.str_val .get ();
319319 });
320320}
321321
322322#ifdef __AVR__
323- void Property::setAttributeReal (String attributeName, nonstd::function<void (CborMapData & md)>setValue)
323+ void Property::setAttribute (String attributeName, nonstd::function<void (CborMapData & md)>setValue)
324324#else
325- void Property::setAttributeReal (String attributeName, std::function<void (CborMapData & md)>setValue)
325+ void Property::setAttribute (String attributeName, std::function<void (CborMapData & md)>setValue)
326326#endif
327327{
328328 if (attributeName != " " ) {
@@ -354,13 +354,6 @@ void Property::setAttributeReal(String attributeName, std::function<void (CborMa
354354 });
355355}
356356
357- String Property::getAttributeName (String propertyName, char separator) {
358- int colonPos;
359- String attributeName = " " ;
360- (colonPos = propertyName.indexOf (separator)) != -1 ? attributeName = propertyName.substring (colonPos + 1 ) : " " ;
361- return attributeName;
362- }
363-
364357void Property::updateLocalTimestamp () {
365358 if (isReadableByCloud ()) {
366359 if (_get_time_func) {
0 commit comments