Renamed OCPP modules
MODIFY
src/server/ocpp/json/JsonWSConnection.ts
src/server/ocpp/json/JsonWSConnection.ts
@@ -148,7 +148,7 @@ export default class JsonWSConnection extends WSConnection {
}
public async handleRequest(messageId: string, commandName: ServerAction, commandPayload: Record<string, unknown> | string): Promise<void> {
- await Logging.logChargingStationServerReceiveAction(Constants.MODULE_JSON_OCPP_SERVER, this.getTenantID(), this.getChargingStationID(), commandName, commandPayload);
+ await Logging.logChargingStationServerReceiveAction(Constants.MODULE_JSON_OCPP_SERVER_16, this.getTenantID(), this.getChargingStationID(), commandName, commandPayload);
const methodName = `handle${commandName}`;
// Check if method exist in the service
if (typeof this.chargingStationService[methodName] === 'function') {
@@ -158,7 +158,7 @@ export default class JsonWSConnection extends WSConnection {
// Call it
const result = await this.chargingStationService[methodName](this.headers, commandPayload);
// Log
- await Logging.logChargingStationServerRespondAction(Constants.MODULE_JSON_OCPP_SERVER, this.getTenantID(), this.getChargingStationID(), commandName, result);
+ await Logging.logChargingStationServerRespondAction(Constants.MODULE_JSON_OCPP_SERVER_16, this.getTenantID(), this.getChargingStationID(), commandName, result);
// Send Response
await this.sendMessage(messageId, result, OCPPMessageType.CALL_RESULT_MESSAGE, commandName);
} else {

MODIFY
src/server/ocpp/soap/services/SoapCentralSystemService12.ts
src/server/ocpp/soap/services/SoapCentralSystemService12.ts
@@ -7,7 +7,7 @@ import { ServerAction } from '../../../../types/Server';
import Utils from '../../../../utils/Utils';
import global from '../../../../types/GlobalType';
-const MODULE_NAME = 'SoapOcppServer12';
+const MODULE_NAME = Constants.MODULE_SOAP_OCPP_SERVER_12;
export default { /* Services */
CentralSystemService: { /* Ports */

MODIFY
src/server/ocpp/soap/services/SoapCentralSystemService15.ts
src/server/ocpp/soap/services/SoapCentralSystemService15.ts
@@ -7,7 +7,7 @@ import { ServerAction } from '../../../../types/Server';
import Utils from '../../../../utils/Utils';
import global from '../../../../types/GlobalType';
-const MODULE_NAME = 'SoapOcppServer15';
+const MODULE_NAME = Constants.MODULE_SOAP_OCPP_SERVER_15;
export default { /* Services */
CentralSystemService: { /* Ports */

MODIFY
src/server/ocpp/soap/services/SoapCentralSystemService16.ts
src/server/ocpp/soap/services/SoapCentralSystemService16.ts
@@ -7,7 +7,7 @@ import { ServerAction } from '../../../../types/Server';
import Utils from '../../../../utils/Utils';
import global from '../../../../types/GlobalType';
-const MODULE_NAME = 'SoapOcppServer16';
+const MODULE_NAME = Constants.MODULE_SOAP_OCPP_SERVER_16;
export default { /* Services */
CentralSystemService: { /* Ports */

MODIFY
src/utils/Constants.ts
src/utils/Constants.ts
@@ -252,7 +252,10 @@ export default class Constants {
public static readonly OICP_SERVER = 'OICP Server';
public static readonly MODULE_AXIOS = 'Axios';
- public static readonly MODULE_JSON_OCPP_SERVER = 'JsonOcppServer';
+ public static readonly MODULE_JSON_OCPP_SERVER_16 = 'OcppJ-16';
+ public static readonly MODULE_SOAP_OCPP_SERVER_12 = 'OcppS-12';
+ public static readonly MODULE_SOAP_OCPP_SERVER_15 = 'OcppS-15';
+ public static readonly MODULE_SOAP_OCPP_SERVER_16 = 'OcppS-16';
// OICP constants
public static readonly OICP_PROGRESS_NOTIFICATION_MAX_INTERVAL = 300; // Hubject restriction: "Progress Notification can be sent only at interval of at least 300 seconds." (5 Minutes)

Renamed OCPP modules