Integrating Simulink-Generated Control Module (via Embedded Coder) into NS3 Environment for Function Calls

20 views
Skip to first unread message

susu ya

unread,
Oct 4, 2024, 5:26:07 AM10/4/24
to ns-3-users

I have generated a control module in Simulink using Embedded Coder, which resulted in a .cpp file and a .h file. I would like to import this module into the NS3 environment and be able to call functions from the module within my NS3 script. Could you please explain the steps required to properly integrate these files into NS3, including any necessary modifications to configuration files to ensure the .cpp and .h files are compiled and linked correctly?

Thank you in advance for your assistance!

Tommaso Pecorella

unread,
Oct 4, 2024, 4:21:40 PM10/4/24
to ns-3-users
It should be enough to add the files to a folder.

Try making a folder in the "scratch" directory, taking as an example "scratch/subdir".
If the sources need to be used in a module, then they should be added to the module, just like any other source file. However, in a module you'lll have to modify the CMakeLists.txt file - it's explained in the manual.

Reply all
Reply to author
Forward
0 new messages