JsonParser.c 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <stddef.h>
  4. #include <string.h>
  5. #include <assert.h>
  6. #include "hashmap.h"
  7. #include "MessageHandler.h"
  8. #include "SystemLogMessage.h"
  9. #define MESSAGE_TYPE_CALL 2
  10. #define MESSAGE_TYPE_CALLRESULT 3
  11. #define MESSAGE_TYPE_CALLERROR 4
  12. #define PASS 1
  13. #define FAIL -1
  14. void CallErrorHandler(char *id, char *errorCode, char *errorDescription,char *payload);
  15. int CallHandler(char *uuid, char *str1,char *payload);
  16. void CallResultHandler(char *str1,char *payload, int gun_index);
  17. extern void CheckTransactionPacket(char *uuid);
  18. typedef void (*FunCallErrorPtr)(char *id, char *errorCode, char *errorDescription,char *payload); // 先宣告函式指標
  19. typedef void (*FunPtr)(char *payload, int gun_index); // 先宣告函式指標
  20. typedef int (*FunCallPtr)(char *uuid, char *payload); // 先宣告函式指標
  21. typedef enum boolean { FALSE, TRUE } BOOL;
  22. static char *requestNames[] = { "CancelReservation", "ChangeAvailability", "ChangeConfiguration", "ClearCache", \
  23. "ClearChargingProfile", "DataTransfer", "GetCompositeSchedule", "GetConfiguration", \
  24. "GetDiagnostics", "GetLocalListVersion", "RemoteStartTransaction", "RemoteStopTransaction", \
  25. "ReserveNow", "Reset", "SendLocalList", "SetChargingProfile", "TriggerMessage", "UnlockConnector", "UpdateFirmware" };
  26. static char *responseNames[] = { "Authorize", "BootNotification", "DataTransfer", \
  27. "DiagnosticsStatusNotification", \
  28. "FirmwareStatusNotification", \
  29. "Heartbeat", "MeterValues", "StartTransaction", "StatusNotification", \
  30. "StopTransaction" };
  31. static FunPtr funs[] = { handleAuthorizeResponse, handleBootNotificationResponse, handleDataTransferResponse, \
  32. handleDiagnosticsStatusNotificationResponse, \
  33. handleFirmwareStatusNotificationResponse, \
  34. handleHeartbeatResponse, handleMeterValuesResponse, \
  35. handleStartTransactionResponse, \
  36. handleStatusNotificationResponse, \
  37. handleStopTransactionnResponse }; //
  38. static FunCallPtr funcalls[] = { handleCancelReservationRequest, handleChangeAvailabilityRequest, handleChangeConfigurationRequest,handleClearCacheRequest, \
  39. handleClearChargingProfileRequest, handleDataTransferRequest, handleGetCompositeScheduleRequest, handleGetConfigurationRequest, \
  40. handleGetDiagnosticsRequest, handleGetLocalListVersionRequest, handleRemoteStartRequest, handleRemoteStopTransactionRequest, \
  41. handleReserveNowTransactionRequest, handleResetRequest, handleSendLocalListRequest, handleSetChargingProfileRequest, \
  42. handleTriggerMessageRequest, handleUnlockConnectorRequest, handleUpdateFirmwareRequest }; //
  43. static FunCallErrorPtr funcallerror[] = { handleError };
  44. //==========================================
  45. // Receive Message routine
  46. //==========================================
  47. void ReceivedMessage(void *in, size_t len)
  48. {
  49. printf("ReceivedMessage\n");
  50. //char tempin[1024*4];
  51. char tempin[65536];
  52. int MsgType = 0;
  53. //char UniqueId[37],Action[33],Payload[10241],ErrorCode[129],ErrorDescription[513];
  54. char UniqueId[37],Action[33],Payload[64824],ErrorCode[129],ErrorDescription[513];
  55. char *arr[2]= {};
  56. int gun_index = 0;
  57. const char *del = ",";
  58. char *substr = NULL;
  59. int count = 0;
  60. int i = 0;
  61. int c = 0;
  62. int templen = 0;
  63. char key_value[VALUE_MAX_LENGTH];
  64. //parsing received message and do something
  65. memset(key_value, 0, sizeof key_value);
  66. memset(UniqueId, 0, sizeof UniqueId);
  67. memset(Action, 0, sizeof Action);
  68. memset(Payload, 0, sizeof Payload);
  69. memset(ErrorCode, 0, sizeof ErrorCode);
  70. memset(ErrorDescription, 0, sizeof ErrorDescription);
  71. memset(tempin, 0, 1024*4);
  72. strcpy(tempin, (const char *)in);
  73. memset( (void *)in, 0, sizeof(char)*len );
  74. //char *str = "[ ]";
  75. if(strcmp((const char *)tempin,"[ ]") == 0)
  76. {
  77. printf("Message is empty arrary. \n");
  78. return;
  79. }
  80. if(tempin[0] != '\0')//if(jobj != NULL)
  81. {
  82. MsgType = tempin[1] - '0';
  83. //printf("MsgType=%d\n",MsgType);
  84. c = 0;
  85. if((MsgType != 2) && (MsgType != 3) && (MsgType != 4) )
  86. {
  87. return;
  88. }
  89. while ((tempin[4+c] != '\"') && (tempin[4+c] != '\0'))
  90. {
  91. UniqueId[c] = tempin[4+c];
  92. //printf("i=%d UniqueId[c]=%c\n",c, UniqueId[c]);
  93. c++;
  94. }
  95. UniqueId[c] = '\0';
  96. //printf("UniqueId=%s\n",UniqueId);
  97. if(UniqueId[0] == '\0')
  98. {
  99. return;
  100. }
  101. CheckTransactionPacket(UniqueId);
  102. switch (MsgType)
  103. {
  104. case MESSAGE_TYPE_CALL:
  105. //DEBUG_INFO("MESSAGE_TYPE_CALL\n");
  106. c = 0;
  107. while (tempin[4+4+strlen(UniqueId)-1+c] != '\"')
  108. {
  109. Action[c] = tempin[4+4+strlen(UniqueId)-1+c];
  110. //printf("i=%d Action[c]=%c\n",c, Action[c]);
  111. c++;
  112. }
  113. Action[c] = '\0';
  114. //printf("Action=%s\n",Action);
  115. #if 0
  116. if(strcmp(Action,"SendLocalList")==0)
  117. {
  118. //strcpy(Payload,"{\"listVersion\":2003230325,\"localAuthorizationList\":[{\"idTag\":\"2020032311254600000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600001\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600002\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600003\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600004\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600005\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600006\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600007\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600008\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600009\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600010\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600011\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600012\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600013\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600014\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600015\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600016\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600017\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600018\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600019\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600020\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600021\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600022\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600023\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600024\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600025\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600026\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600027\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600028\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600029\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600030\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600031\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600032\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600033\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600034\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600035\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600036\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600037\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600038\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600039\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"202003231125460040\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600041\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600042\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600043\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600044\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600045\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600046\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600047\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600048\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600049\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}}],\"updateType\":\"Full\"}]");
  119. strcpy(Payload,"{\"listVersion\":2003230325,\"localAuthorizationList\":[{\"idTag\":\"2020032311254610100\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254699000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254698000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254697000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254696000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254695000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254694000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254693000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254692000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254691000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254689000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254688000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254687000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254686000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254685000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254684000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254683000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254682000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254681000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254679000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254678000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"202003231125467700\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254676000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254675000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254674000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254673000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254672000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254671000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254669000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254668000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254667000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254666000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254665000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254664000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254663000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254662000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254661000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254659000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254658000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254657000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254656000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254655000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254654000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254653000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254652000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254651000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254649000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254648000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254647000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254646000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254645000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254644000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254643000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254642000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254641000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254639000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254638000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254637000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254636000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254635000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254634000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254633000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254632000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254631000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254629000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254628000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254627000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254626000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254625000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254624000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254623000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254622000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254621000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254619000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254618000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254617000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254616000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254615000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254614000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254613000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254612000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254611000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254690000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254680000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254670000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254660000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254650000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254640000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254630000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254620000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254610000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600000\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600001\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600002\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600003\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600004\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600005\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600006\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600007\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600008\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600009\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600010\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600011\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600012\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600013\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600014\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600015\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600016\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600017\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600018\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600019\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600020\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600021\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600022\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600023\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600024\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600025\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600026\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600027\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600028\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600029\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600030\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600031\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600032\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600033\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600034\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600035\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600036\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600037\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600038\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600039\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"202003231125460040\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600041\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600042\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600043\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600044\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600045\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600046\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600047\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600048\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}},{\"idTag\":\"2020032311254600049\",\"idTagInfo\":{\"expiryDate\":\"2020-04-23T03:25:46.000Z\",\"parentIdTag\":\"0000000000000000000\",\"status\":\"ConcurrentTx\"}}],\"updateType\":\"Full\"}]");
  120. }
  121. else
  122. {
  123. c = 0;
  124. templen= 4+4+3+strlen(UniqueId)-1+strlen(Action)-1;
  125. while ((c+ templen) < (strlen(tempin)-1))
  126. {
  127. Payload[c] = tempin[templen + c];
  128. //printf("i=%d Payload[c]=%c\n",c, Payload[c]);
  129. c++;
  130. }
  131. Payload[c] = '\0';
  132. }
  133. #endif
  134. #if 1
  135. c = 0;
  136. templen= 4+4+3+strlen(UniqueId)-1+strlen(Action)-1;
  137. while ((c+ templen) < (strlen(tempin)-1))
  138. {
  139. Payload[c] = tempin[templen + c];
  140. //printf("i=%d Payload[c]=%c\n",c, Payload[c]);
  141. c++;
  142. }
  143. Payload[c] = '\0';
  144. #endif
  145. //printf("Payload=%s\n",Payload);
  146. CallHandler(UniqueId,Action,Payload);
  147. break;
  148. case MESSAGE_TYPE_CALLRESULT:
  149. c = 0;
  150. templen= 4+3+strlen(UniqueId)-1;
  151. while ((c+ templen) < (strlen(tempin)-1))
  152. {
  153. Payload[c] = tempin[templen + c];
  154. //printf("i=%d sstr=%c\n",c, Payload[c]);
  155. c++;
  156. }
  157. Payload[c] = '\0';
  158. //printf("Payload=%s\n",Payload);
  159. if(hashmap_operation(1, UniqueId, key_value) == TRUE)//if(hashmap_operation(1,NULL/*hashMap*/, UniqueId, mapItem, key_value/*(void**)(&mapItem)*/) == MAP_OK/*hashmap_get(hashMap, UniqueId, (void**)(&mapItem)) == MAP_OK*/)
  160. {
  161. hashmap_operation(2, UniqueId, key_value);//hashmap_operation(2,NULL/*hashMap*/, UniqueId, mapItem, key_value/*(void**)(&mapItem)*/);//hashmap_remove(hashMap, UniqueId);
  162. char * const testdup = strdup(key_value/*mapItem->key_value*/);
  163. //printf("original string: %s (@%p)\n", testdup, testdup);
  164. substr = strtok(testdup, del);
  165. while (substr != NULL) {
  166. arr[count] = substr;
  167. // printf(" arr string: %s (@%p)\n", arr[count], substr);
  168. // printf("#%d sub string: %s (@%p)\n", count++, substr, substr);
  169. count++;
  170. substr = strtok(NULL, del);
  171. }
  172. i=0;
  173. sprintf(Action, "%s", *(arr+i++));
  174. gun_index = atoi(*(arr+i++));
  175. CallResultHandler(Action, Payload, gun_index);
  176. free(testdup);
  177. #if 0 //test ( receive -send )
  178. char difftest[34]={0};
  179. time_t seconds;
  180. seconds = time(NULL);
  181. for(int i=3; i<37; i++)
  182. {
  183. difftest[i-3]= UniqueId[i];
  184. }
  185. printf("receive - sent =%d (seconds)\n",(int)(seconds)-atoi(difftest));
  186. printf("\n messageid=%s\n",difftest);
  187. printf("\n send time=%d (seconds)\n",atoi(difftest));
  188. printf("\n recieve time=%d (seconds)\n",seconds);
  189. if(((int)(seconds)-atoi(difftest)) > 1)
  190. {
  191. printf("receive - sent =%d (seconds)\n",(int)(seconds)-atoi(difftest));
  192. printf("\n messageid=%s\n",difftest);
  193. printf("\n send time=%d (seconds)\n",atoi(difftest));
  194. printf("\n recieve time=%d (seconds)\n",seconds);
  195. DEBUG_INFO("receive - sent =%d (seconds)\n",(int)(seconds)-atoi(difftest));
  196. DEBUG_INFO("\n messageid=%s\n",difftest);
  197. DEBUG_INFO("\n send time=%d (seconds)\n",atoi(difftest));
  198. DEBUG_INFO("\n recieve time=%d (seconds)\n",seconds);
  199. }
  200. #endif
  201. }
  202. break;
  203. case MESSAGE_TYPE_CALLERROR:
  204. //DEBUG_INFO("MESSAGE_TYPE_CALLERROR\n");
  205. c = 0;
  206. while (tempin[4+4+strlen(UniqueId)-1+c] != '\"')
  207. {
  208. ErrorCode[c] = tempin[4+4+strlen(UniqueId)-1+c] ;
  209. // printf("i=%d sstr=%c\n",c, ErrorCode[c]);
  210. c++;
  211. }
  212. ErrorCode[c] = '\0';
  213. // DEBUG_INFO("ErrorCode=%s\n",ErrorCode);
  214. c = 0;
  215. while (tempin[4+4+4+strlen(UniqueId)-1+strlen(ErrorCode)-1+c] != '\"')
  216. {
  217. ErrorDescription[c] = tempin[4+4+4+strlen(UniqueId)-1+strlen(ErrorCode)-1+c];
  218. //printf("i=%d sstr=%c\n",c, ErrorDescription[c]);
  219. c++;
  220. }
  221. ErrorDescription[c] = '\0';
  222. // DEBUG_INFO("ErrorDescription=%s\n",ErrorDescription);
  223. c = 0;
  224. templen= 4+4+4+3+strlen(UniqueId)-1+strlen(ErrorCode)-1+strlen(ErrorDescription)-1;
  225. while ((c+ templen) < (strlen(tempin)-1))
  226. {
  227. Payload[c] = tempin[templen + c];
  228. // printf("i=%d sstr=%c\n",c, Payload[c]);
  229. c++;
  230. }
  231. Payload[c] = '\0';
  232. // DEBUG_INFO("Payload=%s\n",Payload);
  233. if(hashmap_operation(1, UniqueId, key_value) == TRUE)//if(hashmap_operation(1,NULL/*hashMap*/, UniqueId, mapItem, key_value/*(void**)(&mapItem)*/) == MAP_OK/*hashmap_get(hashMap, UniqueId, (void**)(&mapItem)) == MAP_OK*/)
  234. {
  235. hashmap_operation(2, UniqueId, key_value);//hashmap_operation(2,NULL/*hashMap*/, UniqueId, mapItem, key_value/*(void**)(&mapItem)*/);//hashmap_remove(hashMap, UniqueId);
  236. sprintf(Action, "%s", key_value/*mapItem->key_value*/);
  237. #ifdef Debug
  238. DEBUG_INFO("<<<<<%s response\n", Action);
  239. DEBUG_INFO("ErrorCode: %s\n", ErrorCode);
  240. DEBUG_INFO("ErrorDescription: %s\n", ErrorDescription);
  241. #endif
  242. /*
  243. * TODO Handle server error response
  244. */
  245. CallErrorHandler(UniqueId,ErrorCode, ErrorDescription, "");
  246. #ifdef Debug
  247. DEBUG_INFO("After pull hash length: %d\n", hashmap_length(hashMap));
  248. #endif
  249. }
  250. break;
  251. default:
  252. break;
  253. }
  254. }
  255. else
  256. {
  257. printf("Message is null. cant parse messgae. \n");
  258. }
  259. }
  260. int CallHandler(char *uuid, char *str1,char *payload)
  261. {
  262. static int CallHandlerNumber = 0;
  263. static int CallHandlerIndex = 0;
  264. int (*callfptr)(char *uuid,char *payload);
  265. //DEBUG_INFO("enter CallHandler\n");
  266. CallHandlerNumber = sizeof(requestNames)/sizeof(requestNames[0]);
  267. for(int i= 0; i < CallHandlerNumber ; i ++ )
  268. {
  269. if(strcmp(requestNames[i],str1) == 0)
  270. {
  271. CallHandlerIndex = i ;
  272. break;
  273. }
  274. }
  275. callfptr = NULL;
  276. callfptr = funcalls[CallHandlerIndex];
  277. if(callfptr == NULL)
  278. {
  279. //printf("callfptr is null\n");
  280. }
  281. if ( callfptr )
  282. {
  283. //printf("exec CallHandler ... \n");
  284. callfptr(uuid, payload);
  285. callfptr = NULL;
  286. return PASS;
  287. }
  288. callfptr = NULL;
  289. return FAIL;
  290. }
  291. void CallResultHandler(char *str1, char *payload, int gun_index)
  292. {
  293. static int CallResultHandlerNumber = 0;
  294. static int CallResultHandlerIndex = 0;
  295. void (*callResultfptr)(char *payload, int gun_index );
  296. //printf("enter CallResultHandler\n");
  297. CallResultHandlerNumber = sizeof(responseNames)/sizeof(responseNames[0]);
  298. for(int i= 0; i < CallResultHandlerNumber ; i ++ )
  299. {
  300. if(strcmp(responseNames[i],str1) == 0)
  301. {
  302. CallResultHandlerIndex = i ;
  303. break;
  304. }
  305. }
  306. callResultfptr = NULL;
  307. callResultfptr = funs[CallResultHandlerIndex];
  308. if(callResultfptr == NULL)
  309. {
  310. //printf("callResultfptr is null\n");
  311. }
  312. if ( callResultfptr )
  313. {
  314. callResultfptr(payload, gun_index);
  315. }
  316. callResultfptr = NULL;
  317. }
  318. void CallErrorHandler(char *id, char *errorCode, char *errorDescription,char *payload)
  319. {
  320. void (*callErrorfptr)(char *id, char *errorCode, char *errorDescription,char *payload );
  321. callErrorfptr = NULL;
  322. callErrorfptr = funcallerror[0];
  323. //printf("CallErrorHandler \n");
  324. if(callErrorfptr == NULL)
  325. {
  326. printf("callErrorfptr is null\n");
  327. }
  328. if ( callErrorfptr )
  329. {
  330. //printf("callErrorfptr is not null\n");
  331. callErrorfptr(id, errorCode, errorDescription, payload);
  332. }
  333. callErrorfptr = NULL;
  334. }