Jakob
Jakob
DDeno
Created by Jakob on 4/30/2024 in #help
Passing C enum to function and read in TypeScript
Thank you for the fast response 😄
18 replies
DDeno
Created by Jakob on 4/30/2024 in #help
Passing C enum to function and read in TypeScript
And I declare the variable as buffer in the symbols object
18 replies
DDeno
Created by Jakob on 4/30/2024 in #help
Passing C enum to function and read in TypeScript
The result is then error[0]
18 replies
DDeno
Created by Jakob on 4/30/2024 in #help
Passing C enum to function and read in TypeScript
It does work like so for me. But I am not sure if this is the propper way of doing it: const error = new Uint8Array(1); lib.symbols.IedConnection_connect(conn, error, host, port);
18 replies
DDeno
Created by Jakob on 4/30/2024 in #help
Passing C enum to function and read in TypeScript
Yes exactly that
18 replies
DDeno
Created by Jakob on 4/30/2024 in #help
Passing C enum to function and read in TypeScript
This gives me a Segmentation fault (core dumped) error. I think the enum has to be instantiated as an ArrayBuffer, but do not know how to read that buffer correctly.
18 replies
DDeno
Created by Jakob on 4/30/2024 in #help
Passing C enum to function and read in TypeScript
This means that I could do something like this? let error = 0; lib.symbols.IedConnection_connect(... , error, ...); console.log(error)
18 replies
DDeno
Created by Jakob on 4/30/2024 in #help
Passing C enum to function and read in TypeScript
How would+
18 replies