From: Jérôme Benoit Date: Fri, 15 Apr 2022 12:31:18 +0000 (+0200) Subject: Rename a type definition X-Git-Tag: v1.1.58~10 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=be9b0d5057a74c22b436cca1364ab1d8417144f7;p=e-mobility-charging-stations-simulator.git Rename a type definition Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ocpp/1.6/OCPP16RequestService.ts b/src/charging-station/ocpp/1.6/OCPP16RequestService.ts index 62e96b52..d41a4472 100644 --- a/src/charging-station/ocpp/1.6/OCPP16RequestService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16RequestService.ts @@ -9,7 +9,7 @@ import { OCPP16ServiceUtils } from './OCPP16ServiceUtils'; import OCPPError from '../../../exception/OCPPError'; import OCPPRequestService from '../OCPPRequestService'; import type OCPPResponseService from '../OCPPResponseService'; -import { SendParams } from '../../../types/ocpp/Requests'; +import { RequestParams } from '../../../types/ocpp/Requests'; import Utils from '../../../utils/Utils'; const moduleName = 'OCPP16RequestService'; @@ -25,7 +25,7 @@ export default class OCPP16RequestService extends OCPPRequestService { public async requestHandler( commandName: OCPP16RequestCommand, commandParams?: JsonType, - params?: SendParams + params?: RequestParams ): Promise { if (Object.values(OCPP16RequestCommand).includes(commandName)) { return (await this.sendMessage( diff --git a/src/charging-station/ocpp/OCPPRequestService.ts b/src/charging-station/ocpp/OCPPRequestService.ts index 9998d266..ef1e4749 100644 --- a/src/charging-station/ocpp/OCPPRequestService.ts +++ b/src/charging-station/ocpp/OCPPRequestService.ts @@ -1,8 +1,8 @@ import { IncomingRequestCommand, RequestCommand, + RequestParams, ResponseType, - SendParams, } from '../../types/ocpp/Requests'; import type ChargingStation from '../ChargingStation'; @@ -92,7 +92,7 @@ export default abstract class OCPPRequestService { messageId: string, messagePayload: JsonType, commandName: RequestCommand, - params: SendParams = { + params: RequestParams = { skipBufferingOnError: false, triggerMessage: false, } @@ -115,7 +115,7 @@ export default abstract class OCPPRequestService { messagePayload: JsonType | OCPPError, messageType: MessageType, commandName?: RequestCommand | IncomingRequestCommand, - params: SendParams = { + params: RequestParams = { skipBufferingOnError: false, triggerMessage: false, } @@ -338,6 +338,6 @@ export default abstract class OCPPRequestService { public abstract requestHandler( commandName: RequestCommand, commandParams?: JsonType, - params?: SendParams + params?: RequestParams ): Promise; } diff --git a/src/types/ocpp/Requests.ts b/src/types/ocpp/Requests.ts index c8c4007d..1683654c 100644 --- a/src/types/ocpp/Requests.ts +++ b/src/types/ocpp/Requests.ts @@ -13,7 +13,7 @@ import { OCPP16DiagnosticsStatus } from './1.6/DiagnosticsStatus'; import { OCPP16MeterValuesRequest } from './1.6/MeterValues'; import OCPPError from '../../exception/OCPPError'; -export interface SendParams { +export interface RequestParams { skipBufferingOnError?: boolean; triggerMessage?: boolean; }