|
@@ -24,9 +24,9 @@ char queuedata[QUEUE_MESSAGE_LENGTH] = {0};
|
|
|
static int server_cycle_Status = 120;
|
|
|
|
|
|
//===============================
|
|
|
-// Configuration: unknownkey
|
|
|
+// Configuration: unknown key
|
|
|
//===============================
|
|
|
-static char unknownkey[10][20] = {0};
|
|
|
+static char unknownkey[10][36] = {0};
|
|
|
static int UnknownKeynum = 0;
|
|
|
|
|
|
//===============================
|
|
@@ -3298,10 +3298,7 @@ void CheckSystemValue(void)
|
|
|
// 0: Booting, 1: idle, 2: authorizing, 3: preparing, 4: charging, 5: terminating, 6: alarm, 7: fault
|
|
|
if(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index].Index == tempIndex)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index].SystemStatus != SYS_MODE_CHARGING)
|
|
|
- {
|
|
|
- reqClockAlignMeter[gun_index] = 1;
|
|
|
- }
|
|
|
+ reqClockAlignMeter[gun_index] = 1;
|
|
|
}
|
|
|
}// End for CHAdeMO
|
|
|
}
|
|
@@ -3321,10 +3318,7 @@ void CheckSystemValue(void)
|
|
|
// 0: Booting, 1: idle, 2: authorizing, 3: preparing, 4: charging, 5: terminating, 6: alarm, 7: fault
|
|
|
if(ShmSysConfigAndInfo->SysInfo.CcsChargingData[index].Index == tempIndex)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysInfo.CcsChargingData[index].SystemStatus != SYS_MODE_CHARGING)
|
|
|
- {
|
|
|
- reqClockAlignMeter[gun_index] = 1;
|
|
|
- }
|
|
|
+ reqClockAlignMeter[gun_index] = 1;
|
|
|
}
|
|
|
} // End for CCS
|
|
|
}
|
|
@@ -3344,10 +3338,7 @@ void CheckSystemValue(void)
|
|
|
// 0: Booting, 1: idle, 2: authorizing, 3: preparing, 4: charging, 5: terminating, 6: alarm, 7: fault
|
|
|
if(ShmSysConfigAndInfo->SysInfo.GbChargingData[index].Index == tempIndex)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysInfo.GbChargingData[index].SystemStatus != SYS_MODE_CHARGING)
|
|
|
- {
|
|
|
- reqClockAlignMeter[gun_index] = 1;
|
|
|
- }
|
|
|
+ reqClockAlignMeter[gun_index] = 1;
|
|
|
}
|
|
|
}// End for GB
|
|
|
}
|
|
@@ -3360,10 +3351,7 @@ void CheckSystemValue(void)
|
|
|
// 0: Booting, 1: idle, 2: authorizing, 3: preparing, 4: charging, 5: terminating, 6: alarm, 7: fault
|
|
|
if(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.Index == tempIndex)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.SystemStatus != SYS_MODE_CHARGING)
|
|
|
- {
|
|
|
- reqClockAlignMeter[gun_index] = 1;
|
|
|
- }
|
|
|
+ reqClockAlignMeter[gun_index] = 1;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -3383,10 +3371,7 @@ void CheckSystemValue(void)
|
|
|
// 0: Booting, 1: idle, 2: authorizing, 3: preparing, 4: charging, 5: terminating, 6: alarm, 7: fault
|
|
|
if(ShmSysConfigAndInfo->SysInfo.AcChargingData[index].Index == tempIndex)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysInfo.AcChargingData[index].SystemStatus != SYS_MODE_CHARGING)
|
|
|
- {
|
|
|
- reqClockAlignMeter[gun_index] = 1;
|
|
|
- }
|
|
|
+ reqClockAlignMeter[gun_index] = 1;
|
|
|
}
|
|
|
}//End for AC
|
|
|
}
|
|
@@ -3396,7 +3381,7 @@ void CheckSystemValue(void)
|
|
|
}
|
|
|
|
|
|
// Sample period MeterValue
|
|
|
- if((((time((time_t*)NULL) - clientTime.MeterValues[gun_index]) > (atoi((const char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[MeterValueSampleInterval].ItemData)- 1))))
|
|
|
+ if((((time((time_t*)NULL) - clientTime.MeterValues[gun_index]) > ((atoi((const char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[MeterValueSampleInterval].ItemData))>10?(atoi((const char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[MeterValueSampleInterval].ItemData)- 1):10))))
|
|
|
{
|
|
|
//check Transaction active
|
|
|
if(gunType[gun_index] == GUN_TYPE_CHAdeMO)
|
|
@@ -3510,7 +3495,9 @@ void CheckSystemValue(void)
|
|
|
|
|
|
if(reqSampleMeter[gun_index] == 1)
|
|
|
{
|
|
|
- sendMeterValuesRequest(gun_index, ReadingContext_Sample_Periodic);
|
|
|
+ if(atoi((const char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[MeterValueSampleInterval].ItemData)>0)
|
|
|
+ sendMeterValuesRequest(gun_index, ReadingContext_Sample_Periodic);
|
|
|
+
|
|
|
storeTempStopTransaction(gun_index);
|
|
|
}
|
|
|
|
|
@@ -12847,7 +12834,7 @@ int initialConfigurationTable(void)
|
|
|
char sstr[256]={0};
|
|
|
int c = 0;
|
|
|
char *loc;
|
|
|
- int confVersion = 2;
|
|
|
+ int confVersion = 3;
|
|
|
|
|
|
DEBUG_INFO("initialConfigurationTable...version: %d\n", confVersion);
|
|
|
//start_t = clock();
|
|
@@ -13071,7 +13058,7 @@ int initialConfigurationTable(void)
|
|
|
// StopTxnAlignedData
|
|
|
ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnAlignedData].ItemAccessibility = 0;
|
|
|
strcpy((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnAlignedData].ItemName, "StopTxnAlignedData");
|
|
|
- strcpy((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnAlignedData].ItemData, "Energy.Active.Import.Register" );
|
|
|
+ strcpy((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnAlignedData].ItemData, "" );
|
|
|
|
|
|
fprintf(outfile,"{\"key\":\"%s\",\"readonly\":%s,\"value\":\"%s\"}\n","StopTxnAlignedData", "true", ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnAlignedData].ItemData);
|
|
|
|
|
@@ -13249,7 +13236,7 @@ int initialConfigurationTable(void)
|
|
|
// ChargingScheduleAllowedChargingRateUnit
|
|
|
ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ChargingScheduleAllowedChargingRateUnit].ItemAccessibility = 0;
|
|
|
strcpy((char *)ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ChargingScheduleAllowedChargingRateUnit].ItemName, "ChargingScheduleAllowedChargingRateUnit");
|
|
|
- strcpy((char *)ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ChargingScheduleAllowedChargingRateUnit].ItemData, "Current" );
|
|
|
+ strcpy((char *)ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ChargingScheduleAllowedChargingRateUnit].ItemData, "Current,Power" );
|
|
|
|
|
|
fprintf(outfile,"{\"key\":\"%s\",\"readonly\":%s,\"value\":\"%s\"}\n","ChargingScheduleAllowedChargingRateUnit", "true", ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ChargingScheduleAllowedChargingRateUnit].ItemData);
|
|
|
|
|
@@ -13264,7 +13251,7 @@ int initialConfigurationTable(void)
|
|
|
// ConnectorSwitch3to1PhaseSupported
|
|
|
ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ConnectorSwitch3to1PhaseSupported].ItemAccessibility = 0;
|
|
|
strcpy((char *)ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ConnectorSwitch3to1PhaseSupported].ItemName, "ConnectorSwitch3to1PhaseSupported");
|
|
|
- strcpy((char *)ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ConnectorSwitch3to1PhaseSupported].ItemData, "TRUE" );
|
|
|
+ strcpy((char *)ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ConnectorSwitch3to1PhaseSupported].ItemData, "FALSE" );
|
|
|
|
|
|
fprintf(outfile,"{\"key\":\"%s\",\"readonly\":%s,\"value\":\"%s\"}\n","ConnectorSwitch3to1PhaseSupported", "true", ShmOCPP16Data->ConfigurationTable.SmartChargingProfile[ConnectorSwitch3to1PhaseSupported].ItemData);
|
|
|
|