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