| 1 | import { JsonObject } from './JsonType'; |
| 2 | import { WorkerData, WorkerMessage, WorkerMessageEvents } from './Worker'; |
| 3 | |
| 4 | export interface ChargingStationWorkerOptions extends JsonObject { |
| 5 | elementStartDelay?: number; |
| 6 | } |
| 7 | |
| 8 | export interface ChargingStationWorkerData extends WorkerData { |
| 9 | index: number; |
| 10 | templateFile: string; |
| 11 | chargingStationWorkerOptions?: ChargingStationWorkerOptions; |
| 12 | } |
| 13 | |
| 14 | enum InternalChargingStationWorkerMessageEvents { |
| 15 | STARTED = 'started', |
| 16 | STOPPED = 'stopped', |
| 17 | PERFORMANCE_STATISTICS = 'performanceStatistics', |
| 18 | } |
| 19 | |
| 20 | export type ChargingStationWorkerMessageEvents = |
| 21 | | WorkerMessageEvents |
| 22 | | InternalChargingStationWorkerMessageEvents; |
| 23 | |
| 24 | export const ChargingStationWorkerMessageEvents = { |
| 25 | ...WorkerMessageEvents, |
| 26 | ...InternalChargingStationWorkerMessageEvents, |
| 27 | }; |
| 28 | |
| 29 | export interface ChargingStationWorkerMessage |
| 30 | extends Omit<WorkerMessage<ChargingStationWorkerData>, 'id'> { |
| 31 | id: ChargingStationWorkerMessageEvents; |
| 32 | } |