@@ -45,7 +45,7 @@ SCENARIO("A callback is registered via 'onUpdate' to be called on property chang
45
45
thing.begin (&property_container);
46
46
47
47
CloudInt test = 10 ;
48
- property_container. addPropertyReal ( test, " test" , Permission::ReadWrite).onUpdate (externalCallbackV2);
48
+ addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite).onUpdate (externalCallbackV2);
49
49
50
50
/* [{0: "test", 2: 7}] = 81 A2 00 64 74 65 73 74 02 07 */
51
51
uint8_t const payload[] = {0x81 , 0xA2 , 0x00 , 0x64 , 0x74 , 0x65 , 0x73 , 0x74 , 0x02 , 0x07 };
@@ -75,7 +75,7 @@ SCENARIO("A (boolean) property is manipulated in the callback to its origin stat
75
75
thing.begin (&property_container);
76
76
cbor::encode (thing);
77
77
78
- property_container. addPropertyReal ( switch_turned_on, " switch_turned_on" , Permission::ReadWrite).onUpdate (switch_callback);
78
+ addPropertyToContainer (property_container, switch_turned_on, " switch_turned_on" , Permission::ReadWrite).onUpdate (switch_callback);
79
79
80
80
/* [{0: "switch_turned_on", 4: true}] = 81 A2 00 70 73 77 69 74 63 68 5F 74 75 72 6E 65 64 5F 6F 6E 04 F5 */
81
81
uint8_t const payload[] = {0x81 , 0xA2 , 0x00 , 0x70 , 0x73 , 0x77 , 0x69 , 0x74 , 0x63 , 0x68 , 0x5F , 0x74 , 0x75 , 0x72 , 0x6E , 0x65 , 0x64 , 0x5F , 0x6F , 0x6E , 0x04 , 0xF5 };
@@ -120,7 +120,7 @@ SCENARIO("After a connection/reconnection an incoming cbor payload is processed
120
120
ArduinoCloudThing thing;
121
121
thing.begin (&property_container);
122
122
123
- property_container. addPropertyReal ( test, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (auto_sync_callback);
123
+ addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (auto_sync_callback);
124
124
125
125
test.setLastLocalChangeTimestamp (1550138809 );
126
126
@@ -148,7 +148,7 @@ SCENARIO("After a connection/reconnection an incoming cbor payload is processed
148
148
ArduinoCloudThing thing;
149
149
thing.begin (&property_container);
150
150
151
- property_container. addPropertyReal ( test, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (auto_sync_callback);
151
+ addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (auto_sync_callback);
152
152
test = false ;
153
153
test.setLastLocalChangeTimestamp (1550138811 );
154
154
@@ -175,9 +175,9 @@ SCENARIO("Primitive property: After a connection/reconnection an incoming cbor p
175
175
ArduinoCloudThing thing;
176
176
thing.begin (&property_container);
177
177
178
- property_container. addPropertyReal ( *p, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (auto_sync_callback);
178
+ addPropertyToContainer (property_container, *p, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (auto_sync_callback);
179
179
test = false ;
180
- property_container. updateTimestampOnLocallyChangedProperties ();
180
+ updateTimestampOnLocallyChangedProperties (property_container );
181
181
// There is no RTC on test execution environment so we force the local timestamp
182
182
p->setLastLocalChangeTimestamp (1550138809 );
183
183
@@ -206,9 +206,9 @@ SCENARIO("Primitive property: After a connection/reconnection an incoming cbor p
206
206
ArduinoCloudThing thing;
207
207
thing.begin (&property_container);
208
208
209
- property_container. addPropertyReal ( *p, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (auto_sync_callback);
209
+ addPropertyToContainer (property_container, *p, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (auto_sync_callback);
210
210
test = false ;
211
- property_container. updateTimestampOnLocallyChangedProperties ();
211
+ updateTimestampOnLocallyChangedProperties (property_container );
212
212
// There is no RTC on test execution environment so we force the local timestamp
213
213
p->setLastLocalChangeTimestamp (1550138811 );
214
214
@@ -234,7 +234,7 @@ SCENARIO("Object property: After a connection/reconnection an incoming cbor payl
234
234
ArduinoCloudThing thing;
235
235
thing.begin (&property_container);
236
236
237
- property_container. addPropertyReal ( location_test, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (auto_sync_callback);
237
+ addPropertyToContainer (property_container, location_test, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (auto_sync_callback);
238
238
location_test.setLastLocalChangeTimestamp (1550138809 );
239
239
240
240
/* [{-3: 1550138810.00, 0: "test:lat", 3: 2},{0: "test:lon", 3: 3}] = 82 A3 22 FB 41 D7 19 4F 6E 80 00 00 00 68 74 65 73 74 3A 6C 61 74 02 02 A2 00 68 74 65 73 74 3A 6C 6F 6E 02 03*/
@@ -266,7 +266,7 @@ SCENARIO("Object property: After a connection/reconnection an incoming cbor payl
266
266
ArduinoCloudThing thing;
267
267
thing.begin (&property_container);
268
268
269
- property_container. addPropertyReal ( location_test, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (auto_sync_callback);
269
+ addPropertyToContainer (property_container, location_test, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (auto_sync_callback);
270
270
location_test.setLastLocalChangeTimestamp (1550138811 );
271
271
272
272
/* [{-3: 1550138810.00, 0: "test:lat", 3: 2},{0: "test:lon", 3: 3}] = 82 A3 22 FB 41 D7 19 4F 6E 80 00 00 00 68 74 65 73 74 3A 6C 61 74 02 02 A2 00 68 74 65 73 74 3A 6C 6F 6E 02 03*/
@@ -304,7 +304,7 @@ SCENARIO("After a connection/reconnection an incoming cbor payload is processed
304
304
ArduinoCloudThing thing;
305
305
thing.begin (&property_container);
306
306
307
- property_container. addPropertyReal ( test, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (force_device_sync_callback);
307
+ addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (force_device_sync_callback);
308
308
309
309
/* [{-3: 1550138810.00, 0: "test", 4: true}] = 81 A3 22 FB 41 D7 19 4F 6E 80 00 00 00 64 74 65 73 74 04 F5 */
310
310
uint8_t const payload[] = {0x81 , 0xA3 , 0x22 , 0xFB , 0x41 , 0xD7 , 0x19 , 0x4F , 0x6E , 0x80 , 0x00 , 0x00 , 0x00 , 0x64 , 0x74 , 0x65 , 0x73 , 0x74 , 0x04 , 0xF5 };
@@ -337,7 +337,7 @@ SCENARIO("After a connection/reconnection an incoming cbor payload is processed
337
337
ArduinoCloudThing thing;
338
338
thing.begin (&property_container);
339
339
340
- property_container. addPropertyReal ( test, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (force_cloud_sync_callback);
340
+ addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (force_cloud_sync_callback);
341
341
342
342
/* [{-3: 1550138810.00, 0: "test", 4: true}] = 81 A3 22 FB 41 D7 19 4F 6E 80 00 00 00 64 74 65 73 74 04 F5 */
343
343
uint8_t const payload[] = {0x81 , 0xA3 , 0x22 , 0xFB , 0x41 , 0xD7 , 0x19 , 0x4F , 0x6E , 0x80 , 0x00 , 0x00 , 0x00 , 0x64 , 0x74 , 0x65 , 0x73 , 0x74 , 0x04 , 0xF5 };
@@ -364,7 +364,7 @@ SCENARIO("After a connection/reconnection an incoming cbor payload is processed.
364
364
ArduinoCloudThing thing;
365
365
thing.begin (&property_container);
366
366
367
- property_container. addPropertyReal ( test, " test" , Permission::ReadWrite).onUpdate (change_callback);
367
+ addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite).onUpdate (change_callback);
368
368
369
369
/* [{-3: 1550138810.00, 0: "test", 4: true}] = 81 A3 22 FB 41 D7 19 4F 6E 80 00 00 00 64 74 65 73 74 04 F5 */
370
370
uint8_t const payload[] = {0x81 , 0xA3 , 0x22 , 0xFB , 0x41 , 0xD7 , 0x19 , 0x4F , 0x6E , 0x80 , 0x00 , 0x00 , 0x00 , 0x64 , 0x74 , 0x65 , 0x73 , 0x74 , 0x04 , 0xF5 };
0 commit comments