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