| Acko01 (2) | |
|
Hello, I am not so experianced with c++ myself, but I need to evaluate if a certain idea might work. I am working with a system for automation purposes that is running on a realtime OS in parallel to windows. Windows and the RTOS exchange data via shared memory. The application in the RTOS is compiled in C++. Now I would like to be able to influence the some data manipulation tasks in the RTOS application without changing the code of the RTOS application. So a concept like calling a dll. My idea was to create a class with virtual methods in the RTOS application. The objects that are used should then be created on the Windows side with the same class prototype, but specific implementation of the virtual methods. The objects should then be moved to the shared memory, where they are used by the RTOS application. Is something like this possible or am I completly on the wrong path? Help on this topic would be very much appreciated. Thanks | |
|
|
|
| JLBorges (1754) | ||
http://www.boost.org/doc/libs/1_53_0/doc/html/interprocess/sharedmemorybetweenprocesses.html | ||
|
|
||
| Acko01 (2) | |
|
Thank you very much for the explaination. Are there any other possible solutions for my problem? | |
|
|
|
| JLBorges (1754) | |||||||
|
> Now I would like to be able to influence the some data manipulation tasks > in the RTOS application without changing the code of the RTOS application. The data can safely be placed into shared memory, it is the code that would be there only in the windows program. So, 1. separate the code from the data. Something like:
2. create an RTOS side surrogate
3. create an windows side surrogate
For the IPC mechanism you could use shared memory (which you already have), boost::mpi (light and extremely efficient) or just BSD sockets (which everyone supports) | |||||||
|
|
|||||||