|
@@ -5739,7 +5739,6 @@ void CheckSystemValue(void)
|
|
|
|
|
|
sendStatusNotificationRequest(gun_index);
|
|
|
clientTime.StatusNotification[gun_index] = time((time_t*)NULL);
|
|
|
- isWebsocketSendable = OFF;
|
|
|
}
|
|
|
|
|
|
if(isWebsocketSendable && (server_sign == TRUE) && (cpinitateMsg.bits[gun_index].TransactionEventReq == ON))
|
|
@@ -17290,7 +17289,7 @@ void InitialSystemValue(void)
|
|
|
sleep(1);
|
|
|
}
|
|
|
|
|
|
-void LWS_Send(char * str)
|
|
|
+void LWS_Send(char *str)
|
|
|
{
|
|
|
//=====================================================
|
|
|
// Check InternetConn 0: disconnected, 1: connected
|
|
@@ -17301,6 +17300,36 @@ void LWS_Send(char * str)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ // Only disable isWebsocketSendable operation initiated by charger
|
|
|
+ if((strstr((char*)str, "\"Authorize\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"BootNotification\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"ClearedChargingLimit\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"DataTransfer\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"FirmwareStatusNotification\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"Get15118EVCertificate\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"GetCertificateStatus\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"Heartbeat\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"LogStatusNotification\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"MeterValues\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"NotifyChargingLimit\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"NotifyCustomerInformation\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"NotifyDisplayMessages\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"NotifyEVChargingNeeds\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"NotifyEVChargingSchedule\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"NotifyEvent\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"NotifyMonitoringReport\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"NotifyReport\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"PublishFirmwareStatusNotification\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"ReportChargingProfiles\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"ReservationStatusUpdate\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"SecurityEventNotification\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"SignCertificate\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"StatusNotification\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"TransactionEven\"") != NULL))
|
|
|
+ {
|
|
|
+ isWebsocketSendable = OFF;
|
|
|
+ }
|
|
|
+
|
|
|
pthread_mutex_lock(&lock_send);
|
|
|
memset(SendBuffer, 0, ARRAY_SIZE(SendBuffer));
|
|
|
sprintf((char *)SendBuffer, "%s", str);
|
|
@@ -17312,7 +17341,7 @@ void LWS_Send(char * str)
|
|
|
//sleep(1);
|
|
|
}
|
|
|
|
|
|
-void LWS_SendNow(char * str)
|
|
|
+void LWS_SendNow(char *str)
|
|
|
{
|
|
|
//=====================================================
|
|
|
// Check InternetConn 0: disconnected, 1: connected
|
|
@@ -17323,6 +17352,36 @@ void LWS_SendNow(char * str)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ // Only disable isWebsocketSendable operation initiated by charger
|
|
|
+ if((strstr((char*)str, "\"Authorize\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"BootNotification\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"ClearedChargingLimit\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"DataTransfer\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"FirmwareStatusNotification\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"Get15118EVCertificate\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"GetCertificateStatus\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"Heartbeat\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"LogStatusNotification\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"MeterValues\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"NotifyChargingLimit\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"NotifyCustomerInformation\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"NotifyDisplayMessages\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"NotifyEVChargingNeeds\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"NotifyEVChargingSchedule\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"NotifyEvent\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"NotifyMonitoringReport\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"NotifyReport\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"PublishFirmwareStatusNotification\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"ReportChargingProfiles\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"ReservationStatusUpdate\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"SecurityEventNotification\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"SignCertificate\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"StatusNotification\"") != NULL)
|
|
|
+ || (strstr((char*)str, "\"TransactionEven\"") != NULL))
|
|
|
+ {
|
|
|
+ isWebsocketSendable = OFF;
|
|
|
+ }
|
|
|
+
|
|
|
pthread_mutex_lock(&lock_send);
|
|
|
memset(SendBuffer, 0, ARRAY_SIZE(SendBuffer));
|
|
|
sprintf((char *)SendBuffer, "%s", str);
|