I have a question about external link to other executable:
I already use a worker script in js. But Indeed, I have a very specific need, which consists to decode incoming data from CAN and translate them into strings, according to rules stored in an XML file.
So I need to open and parse an Xml file.
I'm pretty OK to do that in python, but not in javascript :).
So I wondering if there is a possibility to execute python script, exe file (with paramterers, and getting standard output), or even dll from a worker script ??
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
it's really easy to parse an XML file from a worker script. You can find an example in exampleScripts\WorkerScripts\TestXml (all XML related functions are described in the manual).
If you want to create an external process you can use createProcessDetatched, createProcess or createProcessAsynchronous (these functions are described in the manual). You can find an example in exampleScripts\WorkerScripts\TestProcess.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I forgot to mention that you can load a dll from a worker script too (loadLibrary). You can find an example in exampleScripts\WorkerScripts\LoadLibrary.
Last edit: Stefan Zieker 2021-02-01
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2021-02-01
Hi Stefan,
Thanks for your response.
Indeed all my needs about XML are in your API, and we can import a DLL.
Double RTFM for me :), my bad.
You've done a great job anyway.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have a question about external link to other executable:
I already use a worker script in js. But Indeed, I have a very specific need, which consists to decode incoming data from CAN and translate them into strings, according to rules stored in an XML file.
So I need to open and parse an Xml file.
I'm pretty OK to do that in python, but not in javascript :).
So I wondering if there is a possibility to execute python script, exe file (with paramterers, and getting standard output), or even dll from a worker script ??
Hi,
it's really easy to parse an XML file from a worker script. You can find an example in exampleScripts\WorkerScripts\TestXml (all XML related functions are described in the manual).
If you want to create an external process you can use createProcessDetatched, createProcess or createProcessAsynchronous (these functions are described in the manual). You can find an example in exampleScripts\WorkerScripts\TestProcess.
I forgot to mention that you can load a dll from a worker script too (loadLibrary). You can find an example in exampleScripts\WorkerScripts\LoadLibrary.
Last edit: Stefan Zieker 2021-02-01
Hi Stefan,
Thanks for your response.
Indeed all my needs about XML are in your API, and we can import a DLL.
Double RTFM for me :), my bad.
You've done a great job anyway.
thx :-)