Currently working on a project where I have to send the same data to two different places: One is over IP to a server, the other one is local. The idea is to store the data on a remote server and plot the data using QT on the local machine in real time.
My data (coming from microcontroller) is received using a c++ client through serial port; The client sends the data to a c++ server, but I need to plot the data using QT which is a different program independent of c++ client.
I am wondering if two different programs can access to the same memory location just to read the data if I have the memory address of the data!
Here is what I already have: 1. My client program is able to store the data memory address to a txt file. 2. Now I'm testing to manually hard code the memory address to see if I can get the same data.
The problem is that my testing code doesn't output anything. It ran and stopped without doing anything. Here is my testing code:
char* ptr_rx = (char *)0x7fffd2848df0;
cout << ptr_rx << endl;
My client is running when I tried to use another program to read the data using the memory address, so its address should remain the same as long as the client is running.
Please let me know if it's even possible to access the same memory location using memory address by two different programs. I will call it off if it's not possible.