Skip to content

Recreating the Neuron Module

anselg edited this page Jun 17, 2014 · 2 revisions

###Recreating the Hodgkin-Huxley Model Neuron Module

This tutorial is intended for users looking to create their own RTXI modules. We will be using the Plugin-Template module as the base with which we will reconstruct the Hodgkin-Huxley model neuron, a module already available in our repository here.

To get the most out of this tutorial, it helps to understand how the Plugin Template works and have a basic understanding of coding in C++. All instructions will be given using the command line and Vim, and it is assumed the reader already has an installation of RTXI 1.4.

Note: This tutorial is intended for RTXI 1.4. Look forward to altered instructions with the release of RTXI 2.0.

###Table of Contents:

  1. Getting Started
  2. Header File
  3. Include Libraries
  4. Define Variables
  5. Define Functions
  6. Source File
  7. Include Libraries
  8. Implement Functions

###Getting Started: To start, obtain the source files for the plugin template by cloning them from our repositories.

git clone https://github.com/rtxi/plugin-template.git

Now, create a new directory that will contain the new module. For the purposes of this tutorial, it will be called 'my_neuron'.

mkdir neuron
cp plugin-template/* my_neuron/

Now, go the the directory and alter the names of the files and the variables within them to reflect the purpose of the module. In other words, make sure nothing is called 'MyPluginGUI' or 'my_plugin_gui' so that the module will not later be installed as 'MyPluginGUI'. This task is very easily done with the mv and sed commands:

sed -i "s/MyPluginGUI/MyNeuron/g" *
mv my_plugin_gui.h my_neuron.h
mv my_plugin_gui.cpp my_neuron.cpp

Now, will all preliminary steps completed, we are ready to begin creating a new module.

###Header File ####Include Libraries

RTXI uses the Qt libraries for displaying modules in its user interface (UI). As such, we need to include them in the headers and sources.

Clone this wiki locally