|
@@ -26,7 +26,7 @@ struct PsuData *ShmPsuData ;
|
|
|
struct OCPP16Data *ShmOCPP16Data;
|
|
|
|
|
|
//ConfigurationMaxKeys
|
|
|
-#define GetConfigurationMaxKeysNUM 43
|
|
|
+#define GetConfigurationMaxKeysNUM 44
|
|
|
|
|
|
pthread_mutex_t lock_send = PTHREAD_MUTEX_INITIALIZER;
|
|
|
char queuedata[QUEUE_MESSAGE_LENGTH] = {0};
|
|
@@ -70,7 +70,6 @@ static int authorizeRetryTimes = 0; //number of Retry times
|
|
|
//===============================
|
|
|
// OCPP other variables
|
|
|
//===============================
|
|
|
-//int isUpdateRequest = FALSE;
|
|
|
static int HeartBeatWaitTime = 10;
|
|
|
static int FirstHeartBeat = 0;
|
|
|
static int FirmwareStatusNotificationStatus = FIRMWARE_STATUS_IDLE; // Idle
|
|
@@ -2945,7 +2944,7 @@ int sendFirmwareStatusNotificationRequest(char *status)
|
|
|
}
|
|
|
else if(strcmp(status,"DownloadFailed")==0)
|
|
|
{
|
|
|
- FirmwareStatusNotificationStatus = FIRMWARE_STATUS_DOWNLOAD_DAILED;
|
|
|
+ FirmwareStatusNotificationStatus = FIRMWARE_STATUS_DOWNLOAD_FAILED;
|
|
|
}
|
|
|
else if(strcmp(status,"Downloading")==0)
|
|
|
{
|
|
@@ -10542,6 +10541,7 @@ int handleTriggerMessageRequest(char *uuid, char *payload)
|
|
|
if( strcmp(requestedMessagestr, MessageTriggerStr[FirmwareStatusNotification]) == 0)
|
|
|
{
|
|
|
if((FirmwareStatusNotificationStatus != FIRMWARE_STATUS_DOWNLOADING) &&
|
|
|
+ (FirmwareStatusNotificationStatus != FIRMWARE_STATUS_DOWNLOADED) &&
|
|
|
(FirmwareStatusNotificationStatus != FIRMWARE_STATUS_IDLE) &&
|
|
|
(FirmwareStatusNotificationStatus != FIRMWARE_STATUS_INSTALLING) )
|
|
|
{
|
|
@@ -10769,7 +10769,6 @@ int handleUpdateFirmwareRequest(char *uuid, char *payload)
|
|
|
|
|
|
//sendUpdateFirmwareConfirmation(uuid);
|
|
|
ShmOCPP16Data->MsMsg.bits.UpdateFirmwareConf =1;
|
|
|
- //ShmOCPP16Data->MsMsg.bits.UpdateFirmwareReq = 1;
|
|
|
return result;
|
|
|
}
|
|
|
|
|
@@ -10875,7 +10874,7 @@ void *UpdateFirmwareProcess(void *data)
|
|
|
memset(path, 0, ARRAY_SIZE(path));
|
|
|
|
|
|
sendFirmwareStatusNotificationRequest(FirmwareStatusStr[FirmwareStatus_Downloading]);
|
|
|
- ShmOCPP16Data->MsMsg.bits.UpdateFirmwareReq = 1;
|
|
|
+ //ShmOCPP16Data->MsMsg.bits.UpdateFirmwareReq = 1;
|
|
|
|
|
|
if(strncmp(locationstr,"http", 4) == 0)
|
|
|
{
|
|
@@ -10909,15 +10908,13 @@ void *UpdateFirmwareProcess(void *data)
|
|
|
memset(filenametemp, 0, ARRAY_SIZE(filenametemp));
|
|
|
strncpy(filenametemp, ftppath+(ftppathlen-i+1), i+1);
|
|
|
filenametemp[i+1] = 0;
|
|
|
- //sendFirmwareStatusNotificationRequest(FirmwareStatusStr[FirmwareStatus_Downloading]);
|
|
|
|
|
|
-
|
|
|
- do{
|
|
|
+ do
|
|
|
+ {
|
|
|
isSuccess = httpDownLoadFile(host, ftppath, filenametemp, locationstr);
|
|
|
- sleep(retryIntervalInt);
|
|
|
- }while((isSuccess == 0)&&(retriesInt > 0 && retriesInt --));
|
|
|
+ sleep(retryIntervalInt);
|
|
|
+ }while((isSuccess == 0)&&(retriesInt > 0 && retriesInt --));
|
|
|
|
|
|
- // isSuccess = httpDownLoadFile(host, ftppath, filenametemp, locationstr);
|
|
|
|
|
|
if(!isSuccess)
|
|
|
{
|
|
@@ -10925,9 +10922,7 @@ void *UpdateFirmwareProcess(void *data)
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- //ShmOCPP16Data->MsMsg.bits.UpdateFirmwareReq = 1;
|
|
|
sendFirmwareStatusNotificationRequest(FirmwareStatusStr[FirmwareStatus_Downloaded]);
|
|
|
- //isUpdateRequest = TRUE;
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -10990,10 +10985,8 @@ void *UpdateFirmwareProcess(void *data)
|
|
|
port = 21;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- //sendFirmwareStatusNotificationRequest(FirmwareStatusStr[FirmwareStatus_Downloading]);
|
|
|
-
|
|
|
- do{
|
|
|
+ do
|
|
|
+ {
|
|
|
isSuccess = ftpDownLoadFile(host1, user, password, port, ftppath, filenametemp, locationstr);
|
|
|
sleep(retryIntervalInt);
|
|
|
}while((!isSuccess)&&(retriesInt > 0 && retriesInt --));
|
|
@@ -11007,21 +11000,15 @@ void *UpdateFirmwareProcess(void *data)
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- //ShmOCPP16Data->MsMsg.bits.UpdateFirmwareReq = 1;
|
|
|
sendFirmwareStatusNotificationRequest(FirmwareStatusStr[FirmwareStatus_Downloaded]);
|
|
|
- //isUpdateRequest = TRUE;
|
|
|
}
|
|
|
- ShmOCPP16Data->MsMsg.bits.UpdateFirmwareReq = 1;
|
|
|
-
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
-
|
|
|
sendFirmwareStatusNotificationRequest(FirmwareStatusStr[FirmwareStatus_DownloadFailed]);
|
|
|
- //ShmOCPP16Data->MsMsg.bits.UpdateFirmwareReq = 1;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
+ ShmOCPP16Data->MsMsg.bits.UpdateFirmwareReq = 1;
|
|
|
pthread_exit(NULL);
|
|
|
|
|
|
}
|
|
@@ -11657,7 +11644,6 @@ int initialConfigurationTable(void)
|
|
|
/*Core Profile*/
|
|
|
//AllowOfflineTxForUnknownId
|
|
|
ShmOCPP16Data->ConfigurationTable.CoreProfile[AllowOfflineTxForUnknownId].ItemAccessibility = 1;
|
|
|
- printf("AllowoddlineTXForUnknownId type: %d \n", ShmOCPP16Data->ConfigurationTable.CoreProfile[AllowOfflineTxForUnknownId].ItemAccessibility);
|
|
|
strcpy((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[AllowOfflineTxForUnknownId].ItemName, "AllowOfflineTxForUnknownId");
|
|
|
strcpy((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[AllowOfflineTxForUnknownId].ItemData, "FALSE" );
|
|
|
|
|
@@ -11931,7 +11917,15 @@ int initialConfigurationTable(void)
|
|
|
|
|
|
fprintf(outfile,"{\"key\":\"%s\",\"readonly\":%s,\"value\":\"%s\"}\n","WebSocketPingInterval", "false", ShmOCPP16Data->ConfigurationTable.CoreProfile[WebSocketPingInterval].ItemData);
|
|
|
|
|
|
- //* Local Auth List Management Profile*/
|
|
|
+ // QueueOffLineStartTransactionMessage
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[QueueOffLineStartTransactionMessage].ItemAccessibility = 1;
|
|
|
+ strcpy((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[QueueOffLineStartTransactionMessage].ItemName, "QueueOffLineStartTransactionMessage");
|
|
|
+ strcpy((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[QueueOffLineStartTransactionMessage].ItemData, "TRUE" );
|
|
|
+
|
|
|
+ fprintf(outfile,"{\"key\":\"%s\",\"readonly\":%s,\"value\":\"%s\"}\n","QueueOffLineStartTransactionMessage", "false", ShmOCPP16Data->ConfigurationTable.CoreProfile[QueueOffLineStartTransactionMessage].ItemData);
|
|
|
+
|
|
|
+
|
|
|
+ //* Local Auth List Management Profile*/
|
|
|
#if 0
|
|
|
//For OCTT Test Case
|
|
|
ShmOCPP16Data->ConfigurationTable.LocalAuthListManagementProfile[LocalAuthListEnabled].ItemAccessibility = 1;
|
|
@@ -12080,14 +12074,12 @@ int initialConfigurationTable(void)
|
|
|
//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, "BlinkRepeat") == 0)
|
|
@@ -12095,14 +12087,12 @@ int initialConfigurationTable(void)
|
|
|
//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, "ConnectionTimeOut") == 0 )
|
|
@@ -12115,7 +12105,6 @@ int initialConfigurationTable(void)
|
|
|
{
|
|
|
ShmOCPP16Data->ConfigurationTable.CoreProfile[GetConfigurationMaxKeys].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[GetConfigurationMaxKeys].ItemData, "%d", atoi(valuestr));
|
|
|
-
|
|
|
}
|
|
|
|
|
|
if(strcmp(keystr, "HeartbeatInterval") == 0)
|
|
@@ -12123,7 +12112,6 @@ int initialConfigurationTable(void)
|
|
|
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)
|
|
@@ -12155,28 +12143,24 @@ int initialConfigurationTable(void)
|
|
|
{
|
|
|
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, "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));
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
@@ -12184,7 +12168,6 @@ int initialConfigurationTable(void)
|
|
|
{
|
|
|
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)
|
|
@@ -12198,42 +12181,36 @@ int initialConfigurationTable(void)
|
|
|
{
|
|
|
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, "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, "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 );
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
@@ -12253,28 +12230,24 @@ int initialConfigurationTable(void)
|
|
|
{
|
|
|
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, "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, "TransactionMessageAttempts") == 0)
|
|
@@ -12282,7 +12255,6 @@ int initialConfigurationTable(void)
|
|
|
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)
|
|
@@ -12290,85 +12262,78 @@ int initialConfigurationTable(void)
|
|
|
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, "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, "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, "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, "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, "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, "MaxChargingProfilesInstalled") == 0)
|
|
|
{
|
|
|
ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[MaxChargingProfilesInstalled].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
|
|
|
sprintf((char *)ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[MaxChargingProfilesInstalled].ItemData, "%d", atoi(valuestr) );
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -12709,6 +12674,16 @@ void StoreConfigurationTable(void)
|
|
|
|
|
|
fprintf(outfile,"{\"key\":\"%s\",\"readonly\":%s,\"value\":\"%s\"}\n","WebSocketPingInterval", "false", (char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[WebSocketPingInterval].ItemData);
|
|
|
|
|
|
+ // QueueOffLineStartTransactionMessage
|
|
|
+ /*
|
|
|
+ ShmOCPP16Data->ConfigurationTable.CoreProfile[QueueOffLineStartTransactionMessage].ItemAccessibility = 0;
|
|
|
+ strcpy((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[QueueOffLineStartTransactionMessage].ItemName, "QueueOffLineStartTransactionMessage");
|
|
|
+ strcpy((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[QueueOffLineStartTransactionMessage].ItemData, "TRUE" );
|
|
|
+ */
|
|
|
+
|
|
|
+ fprintf(outfile,"{\"key\":\"%s\",\"readonly\":%s,\"value\":\"%s\"}\n","QueueOffLineStartTransactionMessage", "false", (char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[QueueOffLineStartTransactionMessage].ItemData);
|
|
|
+
|
|
|
+
|
|
|
//* Local Auth List Management Profile*/
|
|
|
//LocalAuthListEnabled
|
|
|
/*
|
|
@@ -13424,6 +13399,26 @@ void getKeyValue(char *keyReq)
|
|
|
isKnowKey = TRUE;
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ if(isEmpty || strcmp(keyReq, "QueueOffLineStartTransactionMessage") == 0 )
|
|
|
+ {
|
|
|
+ strcpy((char *)ShmOCPP16Data->GetConfiguration.Key[GetConfiguration_QueueOffLineStartTransactionMessage].Item, "QueueOffLineStartTransactionMessage");
|
|
|
+ strcpy((char *)ShmOCPP16Data->GetConfiguration.ResponseConfigurationKey[GetConfiguration_QueueOffLineStartTransactionMessage].Key, "QueueOffLineStartTransactionMessage");
|
|
|
+
|
|
|
+ if(ShmOCPP16Data->ConfigurationTable.CoreProfile[QueueOffLineStartTransactionMessage].ItemAccessibility == 1)
|
|
|
+ {
|
|
|
+ strcpy((char *)ShmOCPP16Data->GetConfiguration.ResponseConfigurationKey[GetConfiguration_QueueOffLineStartTransactionMessage].ReadOnly, "0"/*"FALSE"*/);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ strcpy((char *)ShmOCPP16Data->GetConfiguration.ResponseConfigurationKey[GetConfiguration_QueueOffLineStartTransactionMessage].ReadOnly, "1"/*"TRUE"*/);
|
|
|
+ }
|
|
|
+
|
|
|
+ strcpy((char *)ShmOCPP16Data->GetConfiguration.ResponseConfigurationKey[GetConfiguration_QueueOffLineStartTransactionMessage].Value, (const char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[QueueOffLineStartTransactionMessage].ItemData );
|
|
|
+ isKnowKey = TRUE;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
#if 1
|
|
|
if(isEmpty || strcmp(keyReq, "LocalAuthListEnabled") == 0 )
|
|
|
{
|
|
@@ -14392,6 +14387,26 @@ int setKeyValue(char *key, char *value)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if(strcmp(key, "QueueOffLineStartTransactionMessage") == 0)
|
|
|
+ {
|
|
|
+ if(ShmOCPP16Data->ConfigurationTable.CoreProfile[QueueOffLineStartTransactionMessage].ItemAccessibility == 1)
|
|
|
+ {
|
|
|
+ strcpy(str, (const char*)value);
|
|
|
+ for(int i = 0; str[i]; i++)
|
|
|
+ {
|
|
|
+ str[i] = tolower(str[i]);
|
|
|
+ }
|
|
|
+ //Charger.QueueOffLineStartTransactionMessage = (value.toLowerCase().equals("true")?true:false);
|
|
|
+ sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[QueueOffLineStartTransactionMessage].ItemData, "%s", (strcmp(str, "true")==0) ?"TRUE":"FALSE" );
|
|
|
+ isSuccess = ConfigurationStatus_Accepted;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ isSuccess = ConfigurationStatus_Rejected;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
#if 0
|
|
|
//For OCPP Test Case
|
|
|
if(strcmp(key, "LocalAuthorizationListEnabled") == 0)
|