I need to send data and receive data from a C++ application from MATLAB (and later use that code in Simulink). The C++ program use a API to control a drone to handle the WiFi connection. All the common are done by the API, seen command, read sensor etc. But it MUST use a multi-threaded architecture to work.
I think .mex file won't work for that type of application, if I understand it only call subroutine, but I might be wrong.
I have also looked at the Engine API that allow a C++ program to call MATLAB code. But I need the MATLAB code to control the iteration. I am not sure if it can work well with Simulink or if it will just be really ugly.
At last I have think of using TCP/IP to communicate with the C++ application.
Anyone have suggestion to how to implement that?