if (!this.isRegistered()) {
// Send BootNotification
do {
- // FIXME: duplicated assignment with the boot notification response handler
- this.bootNotificationResponse = await this.ocppRequestService.requestHandler<
+ await this.ocppRequestService.requestHandler<
BootNotificationRequest,
BootNotificationResponse
>(this, RequestCommand.BOOT_NOTIFICATION, this.bootNotificationRequest, {
[
BroadcastChannelProcedureName.BOOT_NOTIFICATION,
async (requestPayload?: BroadcastChannelRequestPayload) => {
- this.chargingStation.bootNotificationResponse =
- await this.chargingStation.ocppRequestService.requestHandler<
- BootNotificationRequest,
- BootNotificationResponse
- >(
- this.chargingStation,
- RequestCommand.BOOT_NOTIFICATION,
- {
- ...this.chargingStation.bootNotificationRequest,
- ...requestPayload
- },
- {
- skipBufferingOnError: true,
- throwError: true
- }
- )
+ await this.chargingStation.ocppRequestService.requestHandler<
+ BootNotificationRequest,
+ BootNotificationResponse
+ >(
+ this.chargingStation,
+ RequestCommand.BOOT_NOTIFICATION,
+ {
+ ...this.chargingStation.bootNotificationRequest,
+ ...requestPayload
+ },
+ {
+ skipBufferingOnError: true,
+ throwError: true
+ }
+ )
return this.chargingStation.bootNotificationResponse
}
],
switch (requestedMessage) {
case OCPP16MessageTrigger.BootNotification:
chargingStation.ocppRequestService
- .requestHandler<OCPP16BootNotificationRequest, OCPP16BootNotificationResponse>(
- chargingStation,
- OCPP16RequestCommand.BOOT_NOTIFICATION,
- chargingStation.bootNotificationRequest as OCPP16BootNotificationRequest,
- { skipBufferingOnError: true, triggerMessage: true }
- )
- .then(response => {
- chargingStation.bootNotificationResponse = response
- })
+ .requestHandler<
+ OCPP16BootNotificationRequest,
+ OCPP16BootNotificationResponse
+ >(chargingStation, OCPP16RequestCommand.BOOT_NOTIFICATION, chargingStation.bootNotificationRequest as OCPP16BootNotificationRequest, { skipBufferingOnError: true, triggerMessage: true })
.catch(errorHandler)
break
case OCPP16MessageTrigger.Heartbeat: