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';
public async requestHandler<Request extends JsonType, Response extends JsonType>(
commandName: OCPP16RequestCommand,
commandParams?: JsonType,
- params?: SendParams
+ params?: RequestParams
): Promise<Response> {
if (Object.values(OCPP16RequestCommand).includes(commandName)) {
return (await this.sendMessage(
}
throw new OCPPError(
ErrorType.NOT_SUPPORTED,
- `${moduleName}.sendMessageHandler: Unsupported OCPP command ${commandName}`,
+ `${moduleName}.requestHandler: Unsupported OCPP command ${commandName}`,
commandName,
{ commandName }
);
throw new OCPPError(
ErrorType.NOT_SUPPORTED,
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
- `${moduleName}.buildCommandPayload: Unsupported OCPP command: ${commandName}`,
+ `${moduleName}.buildRequestPayload: Unsupported OCPP command: ${commandName}`,
commandName,
{ commandName }
);