Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
`ProcedureName`: 'addChargingStations'
`PDU`: {
`template`: string,
`ProcedureName`: 'addChargingStations'
`PDU`: {
`template`: string,
- `numberOfStations`: number
+ `numberOfStations`: number,
+ `options?`: {
+ `autoStart`: boolean
+ }
{
"_type": "export",
"__export_format": 4,
{
"_type": "export",
"__export_format": 4,
- "__export_date": "2024-02-05T18:06:20.997Z",
- "__export_source": "insomnia.desktop.app:v8.6.0",
+ "__export_date": "2024-02-09T12:44:04.862Z",
+ "__export_source": "insomnia.desktop.app:v8.6.1",
"resources": [
{
"_id": "req_09f5c772800b48d9aea7462de3379752",
"resources": [
{
"_id": "req_09f5c772800b48d9aea7462de3379752",
{
"_id": "req_c43bfb67921546baa49b4ec96e571859",
"parentId": "wrk_509d4a5094fa485ba93e53bc735e8ac3",
{
"_id": "req_c43bfb67921546baa49b4ec96e571859",
"parentId": "wrk_509d4a5094fa485ba93e53bc735e8ac3",
- "modified": 1706781452580,
+ "modified": 1707482593708,
"created": 1706781436512,
"url": "{{baseUrl}}/{{protocol}}/{{version}}/addChargingStations",
"name": "addChargingStations",
"created": 1706781436512,
"url": "{{baseUrl}}/{{protocol}}/{{version}}/addChargingStations",
"name": "addChargingStations",
"method": "POST",
"body": {
"mimeType": "application/json",
"method": "POST",
"body": {
"mimeType": "application/json",
- "text": "{\n\t\"template\": \"evlink.station-template\",\n\t\"numberOfStations\": 1\n}"
+ "text": "{\n\t\"template\": \"evlink.station-template\",\n\t\"numberOfStations\": 1,\n\t\"options\": {\n\t\t\"autoStart\": false\n\t}\n}"
},
"parameters": [],
"headers": [
},
"parameters": [],
"headers": [
{
"_type": "export",
"__export_format": 4,
{
"_type": "export",
"__export_format": 4,
- "__export_date": "2024-02-05T18:06:08.066Z",
- "__export_source": "insomnia.desktop.app:v8.6.0",
+ "__export_date": "2024-02-09T12:41:23.711Z",
+ "__export_source": "insomnia.desktop.app:v8.6.1",
"resources": [
{
"_id": "ws-req_6815f92a40cf410383b99302180164f6",
"resources": [
{
"_id": "ws-req_6815f92a40cf410383b99302180164f6",
{
"_id": "ws-payload_5a7ab577051646ff9975c34ccf900f18",
"parentId": "ws-req_6154d7eed8ba498ca6da5245e205a329",
{
"_id": "ws-payload_5a7ab577051646ff9975c34ccf900f18",
"parentId": "ws-req_6154d7eed8ba498ca6da5245e205a329",
- "modified": 1707156244270,
+ "modified": 1707475945762,
"created": 1671192074985,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"stopSimulator\",\n\t{}\n]",
"created": 1671192074985,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"stopSimulator\",\n\t{}\n]",
{
"_id": "ws-payload_b6275ce690b5411eb84265642cda2014",
"parentId": "ws-req_6815f92a40cf410383b99302180164f6",
{
"_id": "ws-payload_b6275ce690b5411eb84265642cda2014",
"parentId": "ws-req_6815f92a40cf410383b99302180164f6",
- "modified": 1707156242627,
+ "modified": 1707164705938,
"created": 1671297215182,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"startSimulator\",\n\t{}\n]",
"created": 1671297215182,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"startSimulator\",\n\t{}\n]",
{
"_id": "ws-payload_c61ab0e9f9ee43fe96782dfbeabf97d2",
"parentId": "ws-req_8f579f886db842118bf0e1835e7aa750",
{
"_id": "ws-payload_c61ab0e9f9ee43fe96782dfbeabf97d2",
"parentId": "ws-req_8f579f886db842118bf0e1835e7aa750",
- "modified": 1707156246428,
+ "modified": 1707475944960,
"created": 1671297412505,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"closeConnection\",\n\t{}\n]",
"created": 1671297412505,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"closeConnection\",\n\t{}\n]",
{
"_id": "ws-payload_2872e2656c164769acf98cc7ba7ea028",
"parentId": "ws-req_e5902850ac1d40369bd6e942a2755a9d",
{
"_id": "ws-payload_2872e2656c164769acf98cc7ba7ea028",
"parentId": "ws-req_e5902850ac1d40369bd6e942a2755a9d",
- "modified": 1707156248970,
+ "modified": 1707477801921,
"created": 1671297544207,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"listChargingStations\",\n\t{}\n]",
"created": 1671297544207,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"listChargingStations\",\n\t{}\n]",
{
"_id": "ws-payload_edebda0226aa43f88712d7feb60ac645",
"parentId": "ws-req_ebe5a555a6344dfba7e29f857af11d08",
{
"_id": "ws-payload_edebda0226aa43f88712d7feb60ac645",
"parentId": "ws-req_ebe5a555a6344dfba7e29f857af11d08",
- "modified": 1707156255026,
+ "modified": 1707475947625,
"created": 1671297697172,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"startChargingStation\",\n\t{\n\t\t\"hashIds\": [\n\t\t\t\"5b82a559d2b453f6277e272e134ae824ae358cfb6ee2415af9f7c2f325ef8b3e930aeeadcd866df4b8aec58786e60ae7\"\n\t\t]\n\t}\n]",
"created": 1671297697172,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"startChargingStation\",\n\t{\n\t\t\"hashIds\": [\n\t\t\t\"5b82a559d2b453f6277e272e134ae824ae358cfb6ee2415af9f7c2f325ef8b3e930aeeadcd866df4b8aec58786e60ae7\"\n\t\t]\n\t}\n]",
{
"_id": "ws-payload_20cb03a0142d44a98ddb7bc59ccfea11",
"parentId": "ws-req_720b5d562a0f42929ef9aa16019728fe",
{
"_id": "ws-payload_20cb03a0142d44a98ddb7bc59ccfea11",
"parentId": "ws-req_720b5d562a0f42929ef9aa16019728fe",
- "modified": 1707156256712,
+ "modified": 1707157215540,
"created": 1671297731073,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"stopChargingStation\",\n\t{\n\t\t\"hashIds\": [\n\t\t\t\"5b82a559d2b453f6277e272e134ae824ae358cfb6ee2415af9f7c2f325ef8b3e930aeeadcd866df4b8aec58786e60ae7\"\n\t\t]\n\t}\n]",
"created": 1671297731073,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"stopChargingStation\",\n\t{\n\t\t\"hashIds\": [\n\t\t\t\"5b82a559d2b453f6277e272e134ae824ae358cfb6ee2415af9f7c2f325ef8b3e930aeeadcd866df4b8aec58786e60ae7\"\n\t\t]\n\t}\n]",
{
"_id": "ws-payload_d8e66e0f933e4d74bb5fbff4d15a44bf",
"parentId": "ws-req_23025e078480491daf01406b2b5e9cc2",
{
"_id": "ws-payload_d8e66e0f933e4d74bb5fbff4d15a44bf",
"parentId": "ws-req_23025e078480491daf01406b2b5e9cc2",
- "modified": 1707156258087,
+ "modified": 1707157205853,
"created": 1671298432039,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"startAutomaticTransactionGenerator\",\n\t{}\n]",
"created": 1671298432039,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"startAutomaticTransactionGenerator\",\n\t{}\n]",
{
"_id": "ws-payload_1b02fae03f9c4f54af23911678519841",
"parentId": "ws-req_f836c127aca54a909a110a16b791c29b",
{
"_id": "ws-payload_1b02fae03f9c4f54af23911678519841",
"parentId": "ws-req_f836c127aca54a909a110a16b791c29b",
- "modified": 1707156269505,
+ "modified": 1707157211377,
"created": 1673277254287,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"diagnosticsStatusNotification\",\n\t{\n\t\t\"status\": \"Uploaded\"\n\t}\n]",
"created": 1673277254287,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"diagnosticsStatusNotification\",\n\t{\n\t\t\"status\": \"Uploaded\"\n\t}\n]",
{
"_id": "ws-payload_b563d5d8dc284ebb8f9dd2083734cc45",
"parentId": "ws-req_c326f21a473c430081d7229a82c69b33",
{
"_id": "ws-payload_b563d5d8dc284ebb8f9dd2083734cc45",
"parentId": "ws-req_c326f21a473c430081d7229a82c69b33",
- "modified": 1707156270851,
+ "modified": 1707157212800,
"created": 1673279189375,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"firmwareStatusNotification\",\n\t{\n\t\t\"status\": \"Downloading\"\n\t}\n]",
"created": 1673279189375,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"firmwareStatusNotification\",\n\t{\n\t\t\"status\": \"Downloading\"\n\t}\n]",
{
"_id": "ws-payload_e2e7b8a7d8694b94a16868fcd0b90916",
"parentId": "ws-req_d88784511f704224999e41bd53ba71b8",
{
"_id": "ws-payload_e2e7b8a7d8694b94a16868fcd0b90916",
"parentId": "ws-req_d88784511f704224999e41bd53ba71b8",
- "modified": 1707156268568,
+ "modified": 1707157210547,
"created": 1673728879079,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"statusNotification\",\n\t{\n\t\t\"connectorId\": 1,\n\t\t\"status\": \"Available\",\n\t\t\"errorCode\": \"NoError\"\n\t}\n]",
"created": 1673728879079,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"statusNotification\",\n\t{\n\t\t\"connectorId\": 1,\n\t\t\"status\": \"Available\",\n\t\t\"errorCode\": \"NoError\"\n\t}\n]",
{
"_id": "ws-payload_bf36aa8e9c8646d6a37697c6496e257f",
"parentId": "ws-req_fc239903df2d46bb998c16dbcb8cafea",
{
"_id": "ws-payload_bf36aa8e9c8646d6a37697c6496e257f",
"parentId": "ws-req_fc239903df2d46bb998c16dbcb8cafea",
- "modified": 1707156265844,
+ "modified": 1707157207882,
"created": 1674411426307,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"startTransaction\",\n\t{\n\t\t\"hashIds\": [\n\t\t\t\"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\"\n\t\t],\n\t\t\"connectorId\": 1,\n\t\t\"idTag\": \"test\"\n\t}\n]",
"created": 1674411426307,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"startTransaction\",\n\t{\n\t\t\"hashIds\": [\n\t\t\t\"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\"\n\t\t],\n\t\t\"connectorId\": 1,\n\t\t\"idTag\": \"test\"\n\t}\n]",
{
"_id": "ws-payload_43c713bdb0e64cbda34b3102f42da321",
"parentId": "ws-req_e3db8f3f31c947c1969a6a257b65a2d5",
{
"_id": "ws-payload_43c713bdb0e64cbda34b3102f42da321",
"parentId": "ws-req_e3db8f3f31c947c1969a6a257b65a2d5",
- "modified": 1707156266777,
+ "modified": 1707157208836,
"created": 1674411483206,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"stopTransaction\",\n\t{\n\t\t\"hashIds\": [\n\t\t\t\"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\"\n\t\t],\n\t\t\"transactionId\": 235051179\n\t}\n]",
"created": 1674411483206,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"stopTransaction\",\n\t{\n\t\t\"hashIds\": [\n\t\t\t\"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\"\n\t\t],\n\t\t\"transactionId\": 235051179\n\t}\n]",
{
"_id": "ws-payload_95c28d71c8d940bb83ac514f8916a66d",
"parentId": "ws-req_afbfa6e6824b427e99e735c0b1eabe3b",
{
"_id": "ws-payload_95c28d71c8d940bb83ac514f8916a66d",
"parentId": "ws-req_afbfa6e6824b427e99e735c0b1eabe3b",
- "modified": 1707156252122,
+ "modified": 1707157216642,
"created": 1678991663554,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"setSupervisionUrl\",\n\t{\n\t\t\"hashIds\": [\n\t\t\t\"5b82a559d2b453f6277e272e134ae824ae358cfb6ee2415af9f7c2f325ef8b3e930aeeadcd866df4b8aec58786e60ae7\"\n\t\t],\n\t\t\"url\": \"wss://domain.tld\"\n\t}\n]",
"created": 1678991663554,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"setSupervisionUrl\",\n\t{\n\t\t\"hashIds\": [\n\t\t\t\"5b82a559d2b453f6277e272e134ae824ae358cfb6ee2415af9f7c2f325ef8b3e930aeeadcd866df4b8aec58786e60ae7\"\n\t\t],\n\t\t\"url\": \"wss://domain.tld\"\n\t}\n]",
{
"_id": "ws-payload_3e1dffbcefcc481286b44c694b9e6496",
"parentId": "ws-req_3a0ff14878b449f4be3dfbb7432b5f87",
{
"_id": "ws-payload_3e1dffbcefcc481286b44c694b9e6496",
"parentId": "ws-req_3a0ff14878b449f4be3dfbb7432b5f87",
- "modified": 1707156247560,
+ "modified": 1707481292801,
"created": 1706726300041,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"listTemplates\",\n\t{}\n]",
"created": 1706726300041,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"listTemplates\",\n\t{}\n]",
{
"_id": "ws-payload_5e2dfed34a104c28b887c885ada1b4af",
"parentId": "ws-req_8777c5635dd64fccbc2b0f450be656c0",
{
"_id": "ws-payload_5e2dfed34a104c28b887c885ada1b4af",
"parentId": "ws-req_8777c5635dd64fccbc2b0f450be656c0",
- "modified": 1707156250485,
+ "modified": 1707482458081,
"created": 1706778795544,
"name": "New Payload",
"created": 1706778795544,
"name": "New Payload",
- "value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"addChargingStations\",\n\t{\n\t\t\"template\": \"evlink.station-template\",\n\t\t\"numberOfStations\": 1\n\t}\n]",
+ "value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"addChargingStations\",\n\t{\n\t\t\"template\": \"evlink.station-template\",\n\t\t\"numberOfStations\": 1,\n\t\t\"options\": {\n\t\t\t\"autoStart\": false\n\t\t}\n\t}\n]",
"mode": "application/json",
"_type": "websocket_payload"
},
{
"_id": "ws-payload_494fba679fa644ccb318f092e780834f",
"parentId": "ws-req_0bab7a97ceda4944976a463f616dec5c",
"mode": "application/json",
"_type": "websocket_payload"
},
{
"_id": "ws-payload_494fba679fa644ccb318f092e780834f",
"parentId": "ws-req_0bab7a97ceda4944976a463f616dec5c",
- "modified": 1707156253509,
+ "modified": 1707475888681,
"created": 1707143784130,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"performanceStatistics\",\n\t{}\n]",
"created": 1707143784130,
"name": "New Payload",
"value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"performanceStatistics\",\n\t{}\n]",
import { type Storage, StorageFactory } from '../performance/index.js'
import {
type ChargingStationData,
import { type Storage, StorageFactory } from '../performance/index.js'
import {
type ChargingStationData,
+ type ChargingStationOptions,
type ChargingStationWorkerData,
type ChargingStationWorkerEventError,
type ChargingStationWorkerMessage,
type ChargingStationWorkerData,
type ChargingStationWorkerEventError,
type ChargingStationWorkerMessage,
- public async addChargingStation (index: number, stationTemplateFile: string): Promise<void> {
+ public async addChargingStation (
+ index: number,
+ stationTemplateFile: string,
+ options?: ChargingStationOptions
+ ): Promise<void> {
await this.workerImplementation?.addElement({
index,
templateFile: join(
await this.workerImplementation?.addElement({
index,
templateFile: join(
'assets',
'station-templates',
stationTemplateFile
'assets',
'station-templates',
stationTemplateFile
})
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
this.chargingStationsByTemplate.get(parse(stationTemplateFile).name)!.lastIndex = max(
})
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
this.chargingStationsByTemplate.get(parse(stationTemplateFile).name)!.lastIndex = max(
ChargingStationEvents,
type ChargingStationInfo,
type ChargingStationOcppConfiguration,
ChargingStationEvents,
type ChargingStationInfo,
type ChargingStationOcppConfiguration,
+ type ChargingStationOptions,
type ChargingStationTemplate,
type ConnectorStatus,
ConnectorStatusEnum,
type ChargingStationTemplate,
type ConnectorStatus,
ConnectorStatusEnum,
private readonly chargingStationWorkerBroadcastChannel: ChargingStationWorkerBroadcastChannel
private flushMessageBufferSetInterval?: NodeJS.Timeout
private readonly chargingStationWorkerBroadcastChannel: ChargingStationWorkerBroadcastChannel
private flushMessageBufferSetInterval?: NodeJS.Timeout
- constructor (index: number, templateFile: string) {
+ constructor (index: number, templateFile: string, options?: ChargingStationOptions) {
super()
this.started = false
this.starting = false
super()
this.started = false
this.starting = false
- this.stationInfo?.autoStart === true && this.start()
+ if (
+ options?.autoStart === true ||
+ (options?.autoStart !== false && this.stationInfo?.autoStart === true)
+ ) {
+ this.start()
+ }
}
public get hasEvses (): boolean {
}
public get hasEvses (): boolean {
chargingStationWorker = new ThreadWorker<ChargingStationWorkerData>(
(data?: ChargingStationWorkerData): void => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, no-new
chargingStationWorker = new ThreadWorker<ChargingStationWorkerData>(
(data?: ChargingStationWorkerData): void => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, no-new
- new ChargingStation(data!.index, data!.templateFile)
+ new ChargingStation(data!.index, data!.templateFile, data!.options)
try {
const chargingStation = new ChargingStation(
message.data.index,
try {
const chargingStation = new ChargingStation(
message.data.index,
- message.data.templateFile
+ message.data.templateFile,
+ message.data.options
)
parentPort?.postMessage({
event: WorkerMessageEvents.addedWorkerElement,
)
parentPort?.postMessage({
event: WorkerMessageEvents.addedWorkerElement,
bodyBuffer.push(chunk)
})
.on('end', () => {
bodyBuffer.push(chunk)
})
.on('end', () => {
- const body = JSON.parse(Buffer.concat(bodyBuffer).toString()) as RequestPayload
+ let body: RequestPayload | undefined
+ try {
+ body = JSON.parse(Buffer.concat(bodyBuffer).toString()) as RequestPayload
+ } catch (error) {
+ this.sendResponse(
+ this.buildProtocolResponse(uuid, {
+ status: ResponseStatus.FAILURE,
+ errorMessage: (error as Error).message,
+ errorStack: (error as Error).stack
+ })
+ )
+ return
+ }
this.uiServices
.get(version)
?.requestHandler(this.buildProtocolRequest(uuid, procedureName, body))
this.uiServices
.get(version)
?.requestHandler(this.buildProtocolRequest(uuid, procedureName, body))
// )} Raw data received in string format: ${rawData.toString()}`
// )
// )} Raw data received in string format: ${rawData.toString()}`
// )
- // eslint-disable-next-line @typescript-eslint/no-base-to-string
- const request = JSON.parse(rawData.toString()) as ProtocolRequest
+ let request: ProtocolRequest
+ try {
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
+ request = JSON.parse(rawData.toString()) as ProtocolRequest
+ } catch (error) {
+ logger.error(
+ `${this.logPrefix(
+ moduleName,
+ 'validateRawDataRequest'
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
+ )} UI protocol request is not valid JSON: ${rawData.toString()}`
+ )
+ return false
+ }
if (!Array.isArray(request)) {
logger.error(
if (!Array.isArray(request)) {
logger.error(
import {
BroadcastChannelProcedureName,
type BroadcastChannelRequestPayload,
import {
BroadcastChannelProcedureName,
type BroadcastChannelRequestPayload,
+ type ChargingStationOptions,
ConfigurationSection,
type JsonType,
ProcedureName,
ConfigurationSection,
type JsonType,
ProcedureName,
procedureName?: ProcedureName,
requestPayload?: RequestPayload
): Promise<ResponsePayload> {
procedureName?: ProcedureName,
requestPayload?: RequestPayload
): Promise<ResponsePayload> {
- const { template, numberOfStations } = requestPayload as {
+ const { template, numberOfStations, options } = requestPayload as {
template: string
numberOfStations: number
template: string
numberOfStations: number
+ options?: ChargingStationOptions
}
if (!this.uiServer.chargingStationTemplates.has(template)) {
return {
}
if (!this.uiServer.chargingStationTemplates.has(template)) {
return {
try {
await Bootstrap.getInstance().addChargingStation(
Bootstrap.getInstance().getLastIndex(template) + 1,
try {
await Bootstrap.getInstance().addChargingStation(
Bootstrap.getInstance().getLastIndex(template) + 1,
+ `${template}.json`,
+ options
)
} catch (error) {
return {
)
} catch (error) {
return {
import type { Statistics } from './Statistics.js'
import { type WorkerData, type WorkerMessage, WorkerMessageEvents } from '../worker/index.js'
import type { Statistics } from './Statistics.js'
import { type WorkerData, type WorkerMessage, WorkerMessageEvents } from '../worker/index.js'
-interface ChargingStationWorkerOptions extends JsonObject {
- elementStartDelay?: number
+export interface ChargingStationOptions extends JsonObject {
+ autoStart?: boolean
}
export interface ChargingStationWorkerData extends WorkerData {
index: number
templateFile: string
}
export interface ChargingStationWorkerData extends WorkerData {
index: number
templateFile: string
- chargingStationWorkerOptions?: ChargingStationWorkerOptions
+ options?: ChargingStationOptions
}
export type EvseStatusWorkerType = Omit<EvseStatus, 'connectors'> & {
}
export type EvseStatusWorkerType = Omit<EvseStatus, 'connectors'> & {
type ChargingStationWorkerMessage,
type ChargingStationWorkerMessageData,
ChargingStationWorkerMessageEvents,
type ChargingStationWorkerMessage,
type ChargingStationWorkerMessageData,
ChargingStationWorkerMessageEvents,
+ type ChargingStationOptions,
type EvseStatusWorkerType
} from './ChargingStationWorker.js'
export type { ChargingStationInfo } from './ChargingStationInfo.js'
type EvseStatusWorkerType
} from './ChargingStationWorker.js'
export type { ChargingStationInfo } from './ChargingStationInfo.js'