Applicable Versions
NetSim StandardNetSim Pro


Applicable Releases
v11.1v12.0v12.1


1. The folder <NetSim_Install_Directory>/src  contains the source code of NetSim. 


2. Do not edit the source code directly in the install directory.


3. The Include and lib directories contain shared headers and libraries that are necessary for building source codes of any protocol in NetSim.


4. Identify the source code directories which will be part of your project. This will typically be those directories which contain files that you may modify as part of your implementation. For Eg: If you are going to make modifications to WLAN/IEEE80.11 protocol then only that directory will be required to create your project.


5. The NetSim.sln file is a solution file that is used to load NetSim source codes in Visual Studio.


6. Steps to create New Workspace:


Goto Netsim, select open simulation

Click on Workspace options


Click on more options

Select New


Assign a suitable name for the new workspace and select the path where the workspace is to be created and click on ok


7.  Now open Netsim-> Open simulation-> workspace options->open code

8. If you are going to make modifications to IEEE802_11 Project, you may modify the source codes of IEEE802_11 that are relevant to your implementation. You can also add new files to IEEE802_11 if required. 


10. Now rebuild the source code project that you have modified to obtain a Dll file which contains your modifications. If the build is successful a message similar        to the following will be displayed in the output window:

11. After a successful build, the DLL will be automatically updated in the bin location of the current workspace

12.  After the successful build of the project, upon running any network simulation in NetSim, a warning message will be displayed in the simulation console as shown below:


13. Press any key to proceed with the simulation. The simulation will now execute per your code.


NOTE: If the user wants to use the default code and DLL, either he/she may create a new workspace or goto Netsim->open simulation-> workspace options and click on Reset code and Reset Binaries buttons.

 

Other related article links:


https://tetcos.freshdesk.com/solution/folders/14000090822


Applicable Releases
v10.2


1. The folder <NetSim_Install_Directory>/src  contains the source code of NetSim. 


2. Do not edit the source code directly in the install directory.


3. The Include and lib directories contain shared headers and libraries that are necessary for building source codes of any protocol in NetSim.


4. Identify the source code directories which will be part of your project. This will typically be those directories which contain files that you may modify as part of your implementation. For Eg: If you are going to make modifications to WLAN/IEEE80.11 protocol then only that directory will be required to create your project.


5. The NetSim.sln file is a solution file that is used to load NetSim source codes in Visual Studio.


6. If you are going to make modifications to IEEE802_11 Project, copy the folders Include, lib, IEEE802_11 and the solution file "NetSim.sln". Paste them in a separate folder in your preferred system location:

Note: You can copy multiple directories if your project involves modifications to more than one protocol. In some cases, additional dependent directories might be required.


6. Use the NetSim.sln solution file in your project folder to load the source codes in Visual Studio. Remove links related to protocols other than IEEE802_11 from the solution explorer window, to avoid confusion. 


7. After this, you may modify the source codes of IEEE802_11 that are relevant to your implementation. You can also add new files to IEEE802_11 if required. 


8. Now rebuild the network to obtain a Dll file which contains your modifications. If the build is successful a message similar to the following will be displayed in the output window:

9. A DLL folder will be created inside your project folder. It will contain your modified IEEE_802_11.dll


10. The modified IEEE_802_11 can then be copied and placed in <NetSim_Install_Directory>/bin folder of NetSim, after suitably renaming the original Dll as a backup to run simulations with your modified code.


11. After placing the modified Dll file <NetSim_Install_Directory>/bin, upon running any network simulation in NetSim, a warning message will be displayed in the simulation console as shown below:


12. Press any key to proceed with the simulation. The simulation will now execute per your code. 


13. After completing your project delete the modified DLL and rename the changed DLL back to its original name. 


Other related article links:


https://tetcos.freshdesk.com/solution/folders/14000090822