commandName: RequestCommand | IncomingRequestCommand,
payload: T,
): boolean {
- if (chargingStation.getOcppStrictCompliance() === false) {
+ if (chargingStation.stationInfo?.ocppStrictCompliance === false) {
return true;
}
if (this.jsonSchemas.has(commandName as RequestCommand) === false) {
commandName: RequestCommand | IncomingRequestCommand,
payload: T,
): boolean {
- if (chargingStation.getOcppStrictCompliance() === false) {
+ if (chargingStation.stationInfo?.ocppStrictCompliance === false) {
return true;
}
if (
if (
(chargingStation.inUnknownState() === true &&
commandName === RequestCommand.BOOT_NOTIFICATION) ||
- (chargingStation.getOcppStrictCompliance() === false &&
+ (chargingStation.stationInfo?.ocppStrictCompliance === false &&
chargingStation.inUnknownState() === true) ||
chargingStation.inAcceptedState() === true ||
(chargingStation.inPendingState() === true &&
* @param requestPayload -
*/
const responseCallback = (payload: JsonType, requestPayload: JsonType): void => {
- if (chargingStation.getEnableStatistics() === true) {
+ if (chargingStation.stationInfo?.enableStatistics === true) {
chargingStation.performanceStatistics?.addRequestStatistic(
commandName,
MessageType.CALL_RESULT_MESSAGE,
* @param requestStatistic -
*/
const errorCallback = (error: OCPPError, requestStatistic = true): void => {
- if (requestStatistic === true && chargingStation.getEnableStatistics() === true) {
+ if (
+ requestStatistic === true &&
+ chargingStation.stationInfo?.enableStatistics === true
+ ) {
chargingStation.performanceStatistics?.addRequestStatistic(
commandName,
MessageType.CALL_ERROR_MESSAGE,
reject(error);
};
- if (chargingStation.getEnableStatistics() === true) {
+ if (chargingStation.stationInfo?.enableStatistics === true) {
chargingStation.performanceStatistics?.addRequestStatistic(commandName, messageType);
}
const messageToSend = this.buildMessageToSend(