3 #include "TimingSingleton.h"
4 #include "TransactionStatus.h"
6 #define NUMBER_OF_SENSORS 1
9 int main(int numargs, char ** args) {
10 TimingSingleton * timer = TimingSingleton_getInstance();
12 bool foundError = false;
13 Vector<TransactionStatus *> * transStatusList = new Vector<TransactionStatus *>();
15 // Setup the 2 clients
16 IoTString *baseurl = new IoTString("http://dc-6.calit2.uci.edu/test.iotcloud/");
17 IoTString * password = new IoTString("reallysecret");
18 Table * t1 = new Table(baseurl, password, MACHINE_ID, -1);
23 baseurl->releaseRef();
24 password->releaseRef();
27 printf("Setting up keys\n");
28 for (int i = 0; i < NUMBER_OF_SENSORS; i++) {
31 sprintf(buffer, "sensor%d", i);
32 IoTString *ia = new IoTString(buffer);
33 t1->createNewKey(ia, MACHINE_ID);
38 printf("Updating table\n");
40 for (uint i = 0; i < transStatusList->size(); i++) {
41 TransactionStatus * status = transStatusList->get(i);
42 if (status->getStatus() != TransactionStatus_StatusCommitted) {
44 printf("Status error\n");
50 printf("Found Errors...\n");
52 printf("No Errors Found...\n");
55 delete transStatusList;