Follow this guide to bootstrap a new module that references the BrainSimulator project instead of the binaries.
For this tutorial, we'll use ExampleModule as the name of the module and MyCompany as the base namespace of the module. All the names in the following steps are derived from these names.
- Clone the BrainSimulator project repository.
- Clone this repository into BrainSimulator\Sources\Modules\ExampleModule
The Node project is located in ExampleModule\Module, the CUDA kernels are in ExampleModule\Cuda
-
Open the NewModuleWithSourceDeps solution in VS and rename the solution to ExampleModule
-
Rename the NewModuleWithSourceDeps project to ExampleModule
-
Rename the NewModuleWithSourceDepsCuda project to ExampleModuleCuda
-
In the ExampleModule project, find NewModuleNode.cs and rename it to TestNode.cs
-
Open the file and change line 13 to:
namespace MyCompany.Modules.ExampleModule
-
Rename the NewModuleNode class to TestNode and NewModuleTask to TestTask
-
In ExampleModule\conf\nodes.xml set the type to MyCompany.Modules.ExampleModule.TestNode. It should look like this:
<?xml version="1.0" encoding="utf-8" ?>
<Configuration RootNamespace="MyCompany.Modules">
<KnownNodes>
<Node type="MyCompany.Modules.ExampleModule.TestNode" CanBeAdded="true"/>
</KnownNodes>
</Configuration>
- Rebuild the ExampleModule project. VS doesn't build the module project with BrainSimulator when you run it, because it's not a dependency. You need to do this manually.
- Set the BrainSimulator project as the startup project and then run/debug.
You should be able to load the TestNode in the running instance now.