|
@@ -11268,8 +11268,8 @@ int initialConfigurationTable(void)
|
|
|
//clock_t start_t, end_t, total_t;
|
|
|
FILE *fp;
|
|
|
FILE *outfile;
|
|
|
- char str[200]={0};
|
|
|
- char sstr[100]={0};
|
|
|
+ char str[512]={0};
|
|
|
+ char sstr[256]={0};
|
|
|
int c = 0;
|
|
|
char *loc;
|
|
|
DEBUG_INFO("initialConfigurationTable...\n");
|
|
@@ -11286,7 +11286,7 @@ int initialConfigurationTable(void)
|
|
|
if(st.st_size < 3100)
|
|
|
{
|
|
|
system("rm -f /Storage/OCPP/OCPPConfiguration");
|
|
|
- DEBUG_INFO("OCPPConfiguration file size: %d is too small, restore to default value.\n", st.st_size);
|
|
|
+ DEBUG_INFO("OCPPConfiguration file size: %d is smaller than 3100 bytes, restore to default value.\n", st.st_size);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -11699,7 +11699,7 @@ int initialConfigurationTable(void)
|
|
|
//DEBUG_INFO("../Storage/OCPP/OCPPConfiguration EXit\n");
|
|
|
char keystr[60]={0};
|
|
|
char readonlystr[10]={0};
|
|
|
- char valuestr[100]={0};
|
|
|
+ char valuestr[256]={0};
|
|
|
fp = fopen("/Storage/OCPP/OCPPConfiguration" , "r");
|
|
|
if(fp == NULL) {
|
|
|
DEBUG_INFO("Error opening file");
|
|
@@ -11710,352 +11710,363 @@ int initialConfigurationTable(void)
|
|
|
{
|
|
|
//DEBUG_INFO("Get Configuration \n");
|
|
|
|
|
|
- str[strlen(str) - 1] = '\0'; // eat the newline fgets() stores
|
|
|
- //*************************key*********************************/
|
|
|
- loc = strstr(str, "key");
|
|
|
- c = 0;
|
|
|
- memset(sstr ,0, ARRAY_SIZE(sstr) );
|
|
|
- while (loc[strlen("key")+3+c] != '\"')
|
|
|
+ if(strlen(str) > 0)
|
|
|
{
|
|
|
- sstr[c] = loc[strlen("key")+3+c];
|
|
|
- c++;
|
|
|
- }
|
|
|
- sstr[c] = '\0';
|
|
|
- strcpy(keystr,sstr);
|
|
|
-
|
|
|
+ str[strlen(str) - 1] = '\0'; // eat the newline fgets() stores
|
|
|
+ //*************************key*********************************/
|
|
|
+ if(strstr(str, "key") != NULL)
|
|
|
+ {
|
|
|
+ loc = strstr(str, "key");
|
|
|
+ c = 0;
|
|
|
+ memset(sstr ,0, ARRAY_SIZE(sstr) );
|
|
|
+ while ((loc[strlen("key")+3+c] != '\"') && (c < (ARRAY_SIZE(sstr)-1)))
|
|
|
+ {
|
|
|
+ sstr[c] = loc[strlen("key")+3+c];
|
|
|
+ c++;
|
|
|
+ }
|
|
|
+ sstr[c] = '\0';
|
|
|
+ strcpy(keystr,sstr);
|
|
|
+ }
|
|
|
|
|
|
- //*************************readonly*********************************/
|
|
|
- loc = strstr(str, "readonly");
|
|
|
- c = 0;
|
|
|
- memset(sstr ,0, ARRAY_SIZE(sstr) );
|
|
|
- while (loc[strlen("readonly")+2+c] != ',')
|
|
|
- {
|
|
|
- sstr[c] = loc[strlen("readonly")+2+c];
|
|
|
- c++;
|
|
|
- }
|
|
|
- sstr[c] = '\0';
|
|
|
- strcpy(readonlystr,sstr);
|
|
|
+ //*************************readonly*********************************/
|
|
|
+ if(strstr(str, "readonly") != NULL)
|
|
|
+ {
|
|
|
+ loc = strstr(str, "readonly");
|
|
|
+ c = 0;
|
|
|
+ memset(sstr ,0, ARRAY_SIZE(sstr) );
|
|
|
+ while ((loc[strlen("readonly")+2+c] != ',') && (c < (ARRAY_SIZE(sstr)-1)))
|
|
|
+ {
|
|
|
+ sstr[c] = loc[strlen("readonly")+2+c];
|
|
|
+ c++;
|
|
|
+ }
|
|
|
+ sstr[c] = '\0';
|
|
|
+ strcpy(readonlystr,sstr);
|
|
|
+ }
|
|
|
|
|
|
- //*************************value*********************************/
|
|
|
- loc = strstr(str, "value");
|
|
|
- c = 0;
|
|
|
- memset(sstr ,0, ARRAY_SIZE(sstr) );
|
|
|
- while (loc[strlen("value")+3+c] != '\"')
|
|
|
- {
|
|
|
- sstr[c] = loc[strlen("value")+3+c];
|
|
|
- c++;
|
|
|
- }
|
|
|
- sstr[c] = '\0';
|
|
|
- strcpy(valuestr,sstr);
|
|
|
+ //*************************value*********************************/
|
|
|
+ if(strstr(str, "value") != NULL)
|
|
|
+ {
|
|
|
+ loc = strstr(str, "value");
|
|
|
+ c = 0;
|
|
|
+ memset(sstr ,0, ARRAY_SIZE(sstr) );
|
|
|
+ while ((loc[strlen("value")+3+c] != '\"') && (c < (ARRAY_SIZE(sstr)-1)))
|
|
|
+ {
|
|
|
+ sstr[c] = loc[strlen("value")+3+c];
|
|
|
+ c++;
|
|
|
+ }
|
|
|
+ sstr[c] = '\0';
|
|
|
+ strcpy(valuestr,sstr);
|
|
|
+ }
|
|
|
|
|
|
-// DEBUG_INFO("keystr=%s\n",keystr);
|
|
|
-// DEBUG_INFO("readonlystr=%s\n",readonlystr);
|
|
|
-// DEBUG_INFO("valuestr=%s\n",valuestr);
|
|
|
+ // DEBUG_INFO("keystr=%s\n",keystr);
|
|
|
+ // DEBUG_INFO("readonlystr=%s\n",readonlystr);
|
|
|
+ // DEBUG_INFO("valuestr=%s\n",valuestr);
|
|
|
|
|
|
- if(strcmp(keystr, "AllowOfflineTxForUnknownId") == 0)
|
|
|
- {
|
|
|
- //Charger.AllowOfflineTxForUnknownId = (value.toLowerCase().equals("true")?true:false);
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[AllowOfflineTxForUnknownId].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[AllowOfflineTxForUnknownId].ItemData, "%s", valuestr );
|
|
|
-// DEBUG_INFO("AllowOfflineTxForUnknownId setting\n");
|
|
|
-// DEBUG_INFO("AllowOfflineTxForUnknownId setting\n");
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "AllowOfflineTxForUnknownId") == 0)
|
|
|
+ {
|
|
|
+ //Charger.AllowOfflineTxForUnknownId = (value.toLowerCase().equals("true")?true:false);
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[AllowOfflineTxForUnknownId].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[AllowOfflineTxForUnknownId].ItemData, "%s", valuestr );
|
|
|
+ // DEBUG_INFO("AllowOfflineTxForUnknownId setting\n");
|
|
|
+ // DEBUG_INFO("AllowOfflineTxForUnknownId setting\n");
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "AuthorizationCacheEnabled") == 0)
|
|
|
- {
|
|
|
- //Charger.AuthorizationCacheEnabled = (value.toLowerCase().equals("true")?true:false);
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizationCacheEnabled].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizationCacheEnabled].ItemData, "%s", valuestr );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "AuthorizationCacheEnabled") == 0)
|
|
|
+ {
|
|
|
+ //Charger.AuthorizationCacheEnabled = (value.toLowerCase().equals("true")?true:false);
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizationCacheEnabled].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizationCacheEnabled].ItemData, "%s", valuestr );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "AuthorizeRemoteTxRequests") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizeRemoteTxRequests].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizeRemoteTxRequests].ItemData, "%s", valuestr );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "AuthorizeRemoteTxRequests") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizeRemoteTxRequests].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizeRemoteTxRequests].ItemData, "%s", valuestr );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "BlinkRepeat") == 0)
|
|
|
- {
|
|
|
- //Charger.BlinkRepeat = Integer.parseInt(value);
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[BlinkRepeat].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[BlinkRepeat].ItemData, "%d", atoi(valuestr) );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "BlinkRepeat") == 0)
|
|
|
+ {
|
|
|
+ //Charger.BlinkRepeat = Integer.parseInt(value);
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[BlinkRepeat].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[BlinkRepeat].ItemData, "%d", atoi(valuestr) );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "ClockAlignedDataInterval") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[ClockAlignedDataInterval].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[ClockAlignedDataInterval].ItemData, "%d", atoi(valuestr) );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "ClockAlignedDataInterval") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[ClockAlignedDataInterval].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[ClockAlignedDataInterval].ItemData, "%d", atoi(valuestr) );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "ConnectionTimeOut") == 0 )
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectionTimeOut].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectionTimeOut].ItemData, "%d", atoi(valuestr));
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "ConnectionTimeOut") == 0 )
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectionTimeOut].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectionTimeOut].ItemData, "%d", atoi(valuestr));
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "GetConfigurationMaxKeys") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[GetConfigurationMaxKeys].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[GetConfigurationMaxKeys].ItemData, "%d", (atoi(valuestr)!=GetConfigurationMaxKeysNUM?GetConfigurationMaxKeysNUM:atoi(valuestr)));
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "GetConfigurationMaxKeys") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[GetConfigurationMaxKeys].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[GetConfigurationMaxKeys].ItemData, "%d", (atoi(valuestr)!=GetConfigurationMaxKeysNUM?GetConfigurationMaxKeysNUM:atoi(valuestr)));
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "HeartbeatInterval") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[HeartbeatInterval].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[HeartbeatInterval].ItemData, "%d", atoi(valuestr));
|
|
|
- HeartBeatWaitTime = atoi(valuestr);
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "HeartbeatInterval") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[HeartbeatInterval].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[HeartbeatInterval].ItemData, "%d", atoi(valuestr));
|
|
|
+ HeartBeatWaitTime = atoi(valuestr);
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "LightIntensity") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[LightIntensity].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[LightIntensity].ItemData, "%d", atoi(valuestr));
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "LightIntensity") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[LightIntensity].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[LightIntensity].ItemData, "%d", atoi(valuestr));
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "LocalAuthorizeOffline") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[LocalAuthorizeOffline].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[LocalAuthorizeOffline].ItemData, "%s", valuestr );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "LocalAuthorizeOffline") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[LocalAuthorizeOffline].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[LocalAuthorizeOffline].ItemData, "%s", valuestr );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "LocalPreAuthorize") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[LocalPreAuthorize].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[LocalPreAuthorize].ItemData, "%s", valuestr );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "LocalPreAuthorize") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[LocalPreAuthorize].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[LocalPreAuthorize].ItemData, "%s", valuestr );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "MaxEnergyOnInvalidId") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[MaxEnergyOnInvalidId].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[MaxEnergyOnInvalidId].ItemData, "%d", atoi(valuestr) );
|
|
|
- ShmSysConfigAndInfo->SysConfig.OfflineMaxChargeEnergy = atoi(valuestr)/1000;
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "MaxEnergyOnInvalidId") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[MaxEnergyOnInvalidId].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[MaxEnergyOnInvalidId].ItemData, "%d", atoi(valuestr) );
|
|
|
+ ShmSysConfigAndInfo->SysConfig.OfflineMaxChargeEnergy = atoi(valuestr)/1000;
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "MeterValuesAlignedData") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[MeterValuesAlignedData].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[MeterValuesAlignedData].ItemData, "%s", valuestr );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "MeterValuesAlignedData") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[MeterValuesAlignedData].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[MeterValuesAlignedData].ItemData, "%s", valuestr );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "MeterValuesAlignedDataMaxLength") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[MeterValuesAlignedDataMaxLength].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[MeterValuesAlignedDataMaxLength].ItemData, "%d", atoi(valuestr));
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "MeterValuesAlignedDataMaxLength") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[MeterValuesAlignedDataMaxLength].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[MeterValuesAlignedDataMaxLength].ItemData, "%d", atoi(valuestr));
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "MeterValuesSampledData") == 0 )
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[MeterValuesSampledData].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[MeterValuesSampledData].ItemData, "%s", valuestr );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "MeterValuesSampledData") == 0 )
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[MeterValuesSampledData].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[MeterValuesSampledData].ItemData, "%s", valuestr );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "MeterValuesSampledDataMaxLength") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[MeterValuesSampledDataMaxLength].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[MeterValuesSampledDataMaxLength].ItemData, "%d", atoi(valuestr));
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "MeterValuesSampledDataMaxLength") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[MeterValuesSampledDataMaxLength].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[MeterValuesSampledDataMaxLength].ItemData, "%d", atoi(valuestr));
|
|
|
+ }
|
|
|
|
|
|
|
|
|
- if(strcmp(keystr, "MeterValueSampleInterval") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[MeterValueSampleInterval].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[MeterValueSampleInterval].ItemData, "%d", atoi(valuestr));
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "MeterValueSampleInterval") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[MeterValueSampleInterval].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[MeterValueSampleInterval].ItemData, "%d", atoi(valuestr));
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "MinimumStatusDuration") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[MinimumStatusDuration].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[MinimumStatusDuration].ItemData, "%d", atoi(valuestr) );
|
|
|
- server_cycle_Status = atoi(valuestr); //StatusNotification cycle
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "MinimumStatusDuration") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[MinimumStatusDuration].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[MinimumStatusDuration].ItemData, "%d", atoi(valuestr) );
|
|
|
+ server_cycle_Status = atoi(valuestr); //StatusNotification cycle
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "NumberOfConnectors") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[NumberOfConnectors].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[NumberOfConnectors].ItemData, "%d", atoi(valuestr) );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "NumberOfConnectors") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[NumberOfConnectors].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[NumberOfConnectors].ItemData, "%d", atoi(valuestr) );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "ResetRetries") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[ResetRetries].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[ResetRetries].ItemData, "%d", atoi(valuestr) );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "ResetRetries") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[ResetRetries].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[ResetRetries].ItemData, "%d", atoi(valuestr) );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "ConnectorPhaseRotation") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectorPhaseRotation].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectorPhaseRotation].ItemData, "%s", valuestr );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "ConnectorPhaseRotation") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectorPhaseRotation].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectorPhaseRotation].ItemData, "%s", valuestr );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "ConnectorPhaseRotationMaxLength") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectorPhaseRotationMaxLength].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectorPhaseRotationMaxLength].ItemData, "%d", atoi(valuestr) );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "ConnectorPhaseRotationMaxLength") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectorPhaseRotationMaxLength].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectorPhaseRotationMaxLength].ItemData, "%d", atoi(valuestr) );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "StopTransactionOnEVSideDisconnect") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTransactionOnEVSideDisconnect].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTransactionOnEVSideDisconnect].ItemData, "%s", valuestr );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "StopTransactionOnEVSideDisconnect") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTransactionOnEVSideDisconnect].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTransactionOnEVSideDisconnect].ItemData, "%s", valuestr );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "StopTransactionOnInvalidId") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTransactionOnInvalidId].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTransactionOnInvalidId].ItemData, "%s", valuestr );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "StopTransactionOnInvalidId") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTransactionOnInvalidId].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTransactionOnInvalidId].ItemData, "%s", valuestr );
|
|
|
+ }
|
|
|
|
|
|
|
|
|
- if(strcmp(keystr, "StopTxnAlignedData") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnAlignedData].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnAlignedData].ItemData, "%s", valuestr );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "StopTxnAlignedData") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnAlignedData].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnAlignedData].ItemData, "%s", valuestr );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "StopTxnAlignedDataMaxLength") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnAlignedDataMaxLength].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnAlignedDataMaxLength].ItemData, "%d", atoi(valuestr) );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "StopTxnAlignedDataMaxLength") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnAlignedDataMaxLength].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnAlignedDataMaxLength].ItemData, "%d", atoi(valuestr) );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "StopTxnSampledData") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnSampledData].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnSampledData].ItemData, "%s", valuestr );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "StopTxnSampledData") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnSampledData].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnSampledData].ItemData, "%s", valuestr );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "StopTxnSampledDataMaxLength") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnSampledDataMaxLength].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnSampledDataMaxLength].ItemData, "%d", atoi(valuestr) );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "StopTxnSampledDataMaxLength") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnSampledDataMaxLength].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnSampledDataMaxLength].ItemData, "%d", atoi(valuestr) );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "SupportedFeatureProfiles") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[SupportedFeatureProfiles].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[SupportedFeatureProfiles].ItemData, "%s", valuestr );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "SupportedFeatureProfiles") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[SupportedFeatureProfiles].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[SupportedFeatureProfiles].ItemData, "%s", valuestr );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "SupportedFeatureProfilesMaxLength") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[SupportedFeatureProfilesMaxLength].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[SupportedFeatureProfilesMaxLength].ItemData, "%d", atoi(valuestr) );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "SupportedFeatureProfilesMaxLength") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[SupportedFeatureProfilesMaxLength].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[SupportedFeatureProfilesMaxLength].ItemData, "%d", atoi(valuestr) );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "TransactionMessageAttempts") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[TransactionMessageAttempts].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[TransactionMessageAttempts].ItemData, "%d", atoi(valuestr) );
|
|
|
- TransactionMessageAttemptsValue = atoi(valuestr);
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "TransactionMessageAttempts") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[TransactionMessageAttempts].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[TransactionMessageAttempts].ItemData, "%d", atoi(valuestr) );
|
|
|
+ TransactionMessageAttemptsValue = atoi(valuestr);
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "TransactionMessageRetryInterval") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[TransactionMessageRetryInterval].ItemAccessibility= (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[TransactionMessageRetryInterval].ItemData, "%d", atoi(valuestr) );
|
|
|
- TransactionMessageRetryIntervalValue = atoi(valuestr);
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "TransactionMessageRetryInterval") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[TransactionMessageRetryInterval].ItemAccessibility= (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[TransactionMessageRetryInterval].ItemData, "%d", atoi(valuestr) );
|
|
|
+ TransactionMessageRetryIntervalValue = atoi(valuestr);
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "UnlockConnectorOnEVSideDisconnect") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[UnlockConnectorOnEVSideDisconnect].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[UnlockConnectorOnEVSideDisconnect].ItemData, "%s", valuestr );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "UnlockConnectorOnEVSideDisconnect") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[UnlockConnectorOnEVSideDisconnect].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[UnlockConnectorOnEVSideDisconnect].ItemData, "%s", valuestr );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "WebSocketPingInterval") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[WebSocketPingInterval].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[WebSocketPingInterval].ItemData, "%d", atoi(valuestr) );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "WebSocketPingInterval") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[WebSocketPingInterval].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[WebSocketPingInterval].ItemData, "%d", atoi(valuestr) );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "QueueOffLineStartTransactionMessage") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[QueueOffLineStartTransactionMessage].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[QueueOffLineStartTransactionMessage].ItemData, "%s", valuestr);
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "QueueOffLineStartTransactionMessage") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[QueueOffLineStartTransactionMessage].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[QueueOffLineStartTransactionMessage].ItemData, "%s", valuestr);
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "AuthorizationKey") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizationKey].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizationKey].ItemData, "%s", valuestr);
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "AuthorizationKey") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizationKey].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizationKey].ItemData, "%s", valuestr);
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "SecurityProfile") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[SecurityProfile].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[SecurityProfile].ItemData, "%d", atoi(valuestr) );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "SecurityProfile") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[SecurityProfile].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[SecurityProfile].ItemData, "%d", atoi(valuestr) );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "DefaultPrice") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[DefaultPrice].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[DefaultPrice].ItemData, "%s", valuestr);
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "DefaultPrice") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[DefaultPrice].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[DefaultPrice].ItemData, "%s", valuestr);
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "CustomDisplayCostAndPrice") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[CustomDisplayCostAndPrice].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[CustomDisplayCostAndPrice].ItemData, "%s", valuestr);
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "CustomDisplayCostAndPrice") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[CustomDisplayCostAndPrice].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[CustomDisplayCostAndPrice].ItemData, "%s", valuestr);
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "CustomIdleFeeAfterStop") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.CoreProfile[CustomIdleFeeAfterStop].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[CustomIdleFeeAfterStop].ItemData, "%s", valuestr);
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "CustomIdleFeeAfterStop") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[CustomIdleFeeAfterStop].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[CustomIdleFeeAfterStop].ItemData, "%s", valuestr);
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "LocalAuthListEnabled") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.LocalAuthListManagementProfile[LocalAuthListEnabled].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.LocalAuthListManagementProfile[LocalAuthListEnabled].ItemData, "%s", valuestr );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "LocalAuthListEnabled") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.LocalAuthListManagementProfile[LocalAuthListEnabled].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.LocalAuthListManagementProfile[LocalAuthListEnabled].ItemData, "%s", valuestr );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "LocalAuthListMaxLength") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.LocalAuthListManagementProfile[LocalAuthListMaxLength].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.LocalAuthListManagementProfile[LocalAuthListMaxLength].ItemData, "%d", atoi(valuestr) );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "LocalAuthListMaxLength") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.LocalAuthListManagementProfile[LocalAuthListMaxLength].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.LocalAuthListManagementProfile[LocalAuthListMaxLength].ItemData, "%d", atoi(valuestr) );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "SendLocalListMaxLength") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.LocalAuthListManagementProfile[SendLocalListMaxLength].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.LocalAuthListManagementProfile[SendLocalListMaxLength].ItemData, "%d", atoi(valuestr) );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "SendLocalListMaxLength") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.LocalAuthListManagementProfile[SendLocalListMaxLength].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.LocalAuthListManagementProfile[SendLocalListMaxLength].ItemData, "%d", atoi(valuestr) );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "ReserveConnectorZeroSupported") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.ReservationProfile[ReserveConnectorZeroSupported].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.ReservationProfile[ReserveConnectorZeroSupported].ItemData, "%s", valuestr );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "ReserveConnectorZeroSupported") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.ReservationProfile[ReserveConnectorZeroSupported].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.ReservationProfile[ReserveConnectorZeroSupported].ItemData, "%s", valuestr );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "ChargeProfileMaxStackLevel") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ChargeProfileMaxStackLevel].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ChargeProfileMaxStackLevel].ItemData, "%d", atoi(valuestr) );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "ChargeProfileMaxStackLevel") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ChargeProfileMaxStackLevel].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ChargeProfileMaxStackLevel].ItemData, "%d", atoi(valuestr) );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "ChargingScheduleAllowedChargingRateUnit") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ChargingScheduleAllowedChargingRateUnit].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ChargingScheduleAllowedChargingRateUnit].ItemData, "%s", valuestr );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "ChargingScheduleAllowedChargingRateUnit") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ChargingScheduleAllowedChargingRateUnit].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ChargingScheduleAllowedChargingRateUnit].ItemData, "%s", valuestr );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "ChargingScheduleMaxPeriods") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ChargingScheduleMaxPeriods].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ChargingScheduleMaxPeriods].ItemData, "%d", atoi(valuestr) );
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "ChargingScheduleMaxPeriods") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ChargingScheduleMaxPeriods].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ChargingScheduleMaxPeriods].ItemData, "%d", atoi(valuestr) );
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "ConnectorSwitch3to1PhaseSupported") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ConnectorSwitch3to1PhaseSupported].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ConnectorSwitch3to1PhaseSupported].ItemData, "%s", valuestr);
|
|
|
- }
|
|
|
+ if(strcmp(keystr, "ConnectorSwitch3to1PhaseSupported") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ConnectorSwitch3to1PhaseSupported].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ConnectorSwitch3to1PhaseSupported].ItemData, "%s", valuestr);
|
|
|
+ }
|
|
|
|
|
|
- if(strcmp(keystr, "MaxChargingProfilesInstalled") == 0)
|
|
|
- {
|
|
|
- ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[MaxChargingProfilesInstalled].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
- sprintf((char *)ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[MaxChargingProfilesInstalled].ItemData, "%d", atoi(valuestr) );
|
|
|
+ if(strcmp(keystr, "MaxChargingProfilesInstalled") == 0)
|
|
|
+ {
|
|
|
+ ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[MaxChargingProfilesInstalled].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[MaxChargingProfilesInstalled].ItemData, "%d", atoi(valuestr) );
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|