repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename a type definition
[e-mobility-charging-stations-simulator.git]
/
src
/
charging-station
/
ocpp
/
OCPPRequestService.ts
diff --git
a/src/charging-station/ocpp/OCPPRequestService.ts
b/src/charging-station/ocpp/OCPPRequestService.ts
index 021e09f369edb855d5be7d161e512f073d3504a3..ef1e4749d56151d05eafd7ed438236018d8fcec1 100644
(file)
--- a/
src/charging-station/ocpp/OCPPRequestService.ts
+++ b/
src/charging-station/ocpp/OCPPRequestService.ts
@@
-1,8
+1,8
@@
import {
IncomingRequestCommand,
RequestCommand,
import {
IncomingRequestCommand,
RequestCommand,
+ RequestParams,
ResponseType,
ResponseType,
- SendParams,
} from '../../types/ocpp/Requests';
import type ChargingStation from '../ChargingStation';
} from '../../types/ocpp/Requests';
import type ChargingStation from '../ChargingStation';
@@
-33,7
+33,7
@@
export default abstract class OCPPRequestService {
) {
this.chargingStation = chargingStation;
this.ocppResponseService = ocppResponseService;
) {
this.chargingStation = chargingStation;
this.ocppResponseService = ocppResponseService;
- this.
sendMessage
Handler.bind(this);
+ this.
request
Handler.bind(this);
this.sendResult.bind(this);
this.sendError.bind(this);
}
this.sendResult.bind(this);
this.sendError.bind(this);
}
@@
-92,7
+92,7
@@
export default abstract class OCPPRequestService {
messageId: string,
messagePayload: JsonType,
commandName: RequestCommand,
messageId: string,
messagePayload: JsonType,
commandName: RequestCommand,
- params:
Send
Params = {
+ params:
Request
Params = {
skipBufferingOnError: false,
triggerMessage: false,
}
skipBufferingOnError: false,
triggerMessage: false,
}
@@
-115,7
+115,7
@@
export default abstract class OCPPRequestService {
messagePayload: JsonType | OCPPError,
messageType: MessageType,
commandName?: RequestCommand | IncomingRequestCommand,
messagePayload: JsonType | OCPPError,
messageType: MessageType,
commandName?: RequestCommand | IncomingRequestCommand,
- params:
Send
Params = {
+ params:
Request
Params = {
skipBufferingOnError: false,
triggerMessage: false,
}
skipBufferingOnError: false,
triggerMessage: false,
}
@@
-210,7
+210,7
@@
export default abstract class OCPPRequestService {
}
// Handle the request's response
try {
}
// Handle the request's response
try {
- await self.ocppResponseService.
handleResponse
(
+ await self.ocppResponseService.
responseHandler
(
commandName as RequestCommand,
payload,
requestPayload
commandName as RequestCommand,
payload,
requestPayload
@@
-335,9
+335,9
@@
export default abstract class OCPPRequestService {
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
- public abstract
sendMessage
Handler<Request extends JsonType, Response extends JsonType>(
+ public abstract
request
Handler<Request extends JsonType, Response extends JsonType>(
commandName: RequestCommand,
commandParams?: JsonType,
commandName: RequestCommand,
commandParams?: JsonType,
- params?:
Send
Params
+ params?:
Request
Params
): Promise<Response>;
}
): Promise<Response>;
}