Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
return this?.wsConnection?.readyState === WebSocket.OPEN;
}
- public getRegistrationStatus(): RegistrationStatusEnumType | undefined {
- return this?.bootNotificationResponse?.status;
- }
-
public inUnknownState(): boolean {
return isNullOrUndefined(this?.bootNotificationResponse?.status);
}
}
throw new OCPPError(
ErrorType.SECURITY_ERROR,
- `Cannot send command ${commandName} PDU when the charging station is in ${chargingStation.getRegistrationStatus()} state on the central server`,
+ `Cannot send command ${commandName} PDU when the charging station is in ${chargingStation?.bootNotificationResponse?.status} state on the central server`,
commandName,
);
}