| 1 | import { |
| 2 | ProcedureName, |
| 3 | type ProtocolRequestHandler, |
| 4 | ProtocolVersion, |
| 5 | } from '../../../types/UIProtocol'; |
| 6 | import type { AbstractUIServer } from '../AbstractUIServer'; |
| 7 | import AbstractUIService from './AbstractUIService'; |
| 8 | |
| 9 | export default class UIService001 extends AbstractUIService { |
| 10 | constructor(uiServer: AbstractUIServer) { |
| 11 | super(uiServer, ProtocolVersion['0.0.1']); |
| 12 | this.requestHandlers.set( |
| 13 | ProcedureName.START_CHARGING_STATION, |
| 14 | this.handleProtocolRequest.bind(this) as ProtocolRequestHandler |
| 15 | ); |
| 16 | this.requestHandlers.set( |
| 17 | ProcedureName.STOP_CHARGING_STATION, |
| 18 | this.handleProtocolRequest.bind(this) as ProtocolRequestHandler |
| 19 | ); |
| 20 | this.requestHandlers.set( |
| 21 | ProcedureName.OPEN_CONNECTION, |
| 22 | this.handleProtocolRequest.bind(this) as ProtocolRequestHandler |
| 23 | ); |
| 24 | this.requestHandlers.set( |
| 25 | ProcedureName.CLOSE_CONNECTION, |
| 26 | this.handleProtocolRequest.bind(this) as ProtocolRequestHandler |
| 27 | ); |
| 28 | this.requestHandlers.set( |
| 29 | ProcedureName.START_AUTOMATIC_TRANSACTION_GENERATOR, |
| 30 | this.handleProtocolRequest.bind(this) as ProtocolRequestHandler |
| 31 | ); |
| 32 | this.requestHandlers.set( |
| 33 | ProcedureName.STOP_AUTOMATIC_TRANSACTION_GENERATOR, |
| 34 | this.handleProtocolRequest.bind(this) as ProtocolRequestHandler |
| 35 | ); |
| 36 | this.requestHandlers.set( |
| 37 | ProcedureName.START_TRANSACTION, |
| 38 | this.handleProtocolRequest.bind(this) as ProtocolRequestHandler |
| 39 | ); |
| 40 | this.requestHandlers.set( |
| 41 | ProcedureName.STOP_TRANSACTION, |
| 42 | this.handleProtocolRequest.bind(this) as ProtocolRequestHandler |
| 43 | ); |
| 44 | this.requestHandlers.set( |
| 45 | ProcedureName.AUTHORIZE, |
| 46 | this.handleProtocolRequest.bind(this) as ProtocolRequestHandler |
| 47 | ); |
| 48 | this.requestHandlers.set( |
| 49 | ProcedureName.BOOT_NOTIFICATION, |
| 50 | this.handleProtocolRequest.bind(this) as ProtocolRequestHandler |
| 51 | ); |
| 52 | this.requestHandlers.set( |
| 53 | ProcedureName.STATUS_NOTIFICATION, |
| 54 | this.handleProtocolRequest.bind(this) as ProtocolRequestHandler |
| 55 | ); |
| 56 | this.requestHandlers.set( |
| 57 | ProcedureName.HEARTBEAT, |
| 58 | this.handleProtocolRequest.bind(this) as ProtocolRequestHandler |
| 59 | ); |
| 60 | this.requestHandlers.set( |
| 61 | ProcedureName.METER_VALUES, |
| 62 | this.handleProtocolRequest.bind(this) as ProtocolRequestHandler |
| 63 | ); |
| 64 | } |
| 65 | } |