scs-sdk-plugin icon indicating copy to clipboard operation
scs-sdk-plugin copied to clipboard

Usage of named pipes?

Open ndelta0 opened this issue 3 years ago • 5 comments

Is your feature request related to a problem? Please describe. Memory Mapped Files are only a thing in Windows, thus limiting the plugin to Windows only (#75).

Describe the solution you'd like Usage of Named Pipes, they are present in both Windows and Unix/Unix-like, although they have a bit different implementation.

Describe alternatives you've considered Other alternative is a TCP (or UDP maybe?) socket, similarly to how ETCARS and ETS2 Telemetry Server. In case of the latter it would probably require either JSON format or Base64 encoding.

Additional context None

ndelta0 avatar Mar 16 '21 17:03 ndelta0

Linux support is indeed planed. It will need some time, because currently I have no time for that.

I saw some alternatives with TCP, but it will probably a similar solution to memory mapped files like pipes.

RenCloud avatar Mar 16 '21 19:03 RenCloud

It's possible to use something like ZeroMQ, it has lots of libraries for lots of languages, and supports TCP, UDP, IPC, etc.

ndelta0 avatar Mar 16 '21 22:03 ndelta0

I would like to use a way without external libraries, but I will take a look.

RenCloud avatar Mar 17 '21 21:03 RenCloud

Understandable, I just spent an entire day trying to get cppzmq working with the plugin, but it's really useful, you can use publisher/subscriber pattern with topics (maybe events in this case) and subscribers can subscribe to any of the events.

ndelta0 avatar Mar 17 '21 22:03 ndelta0

I've made a crudely working telemetry using the demo and converted it to use ZeroMQ. It was basically plug and play, drop in replacement. You can see the changes here, it was done quickly so there is high possibility for something not working. It makes use of CMake and vcpkg (it makes using open source libraries very very easy).

ndelta0 avatar Mar 18 '21 00:03 ndelta0