0

I would like to relay the output of a device over a proprietary network middleware that is loosely based on dds to a second computer. As I would like to do so with minimum changes to the existing setup, I was wondering if it is possible to program a mock-device that internally handles the networking part but presents itself as a standard char device, so that all existing programs can remain unchanged.

I have never programmed a linux driver before, but after doing some research I think the main issue I am going to face is that the driver itself needs to be implemented in C, whereas the SDK of the middleware is written in C++. I do not have access to the full source code of the middleware, only to its header files and compiled libraries. Even though the middleware is based on DDS, for which C APIs are available, I do not have sufficient information (and time and money) to reimplement the basic functionality of the proprietary protocol in C.

Is it possible to programm a linux char device that uses functionality of a SDK that is only available in C++ ?

magnetometer
  • 646
  • 4
  • 12
  • It is hard to know for sure if this is possible under your constraints. This guide may help: [How do I call a C++ function from C?](https://isocpp.org/wiki/faq/mixing-c-and-cpp#call-cpp) – Chris Aug 26 '16 at 01:49
  • @ChrisStathis thank you for the link, I am going to have a look at it! – magnetometer Aug 26 '16 at 07:01

0 Answers0