The Process you've created doesn't have any internal states, so it can only create very uninteresting outputs. Let's add some state variables now, and get some dynamics going.

Keeping a state

Modify your source file as follows, to add a state, initialise it, and output it on one of our two output channels.

Py Source Code (against 1262)
# switch on event type elif input['event']['type'] == EVENT_STATE_SET:
# initialise a state
persist['currentMembranePotential'] = 0.5
# ok output['event']['response'] = C_OK
Py Source Code (against 1262)
# write output brahms.operation(persist['self'], OPERATION_SET_CONTENT, \ persist['hOutput'], \
numpy.array([persist['currentMembranePotential'], input['time']['now']], numpy.float64))
Matlab Console
>> test Columns 1 through 7 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0 1.0000 2.0000 3.0000 4.0000 5.0000 6.0000 Columns 8 through 10 0.5000 0.5000 0.5000 7.0000 8.0000 9.0000

Good, now we've got an internal state, and we're sending it out on our output port. Now let's add some dynamics.

Modifying internal state

This is going to be the cell's membrane potential (which we'll model as being between zero and one, so it doesn't get too neuroscience-y). Let's implement its decay back towards zero. We'll also make the sample rate a bit more realistic, moving from 10Hz to 1000Hz, and run for a quarter of a second, so we get some nice behaviour displayed. We'll get 250 samples logged, now, so we'll plot the output log instead of just displaying it to console. Modify source file and test script as shown below.

M Source Code (against 995)
% add process state = [];
fS = 1000;
cls = 'dev/quickstart/1262'; sys = sys.addprocess('neuron', cls, fS, state);
M Source Code (against 995)
% execution exe = brahms_execution; exe.all = true; exe.name = 'process';
exe.stop = 0.25;
M Source Code (against 995)
% show output
t = ((1:length(out.neuron.out))-1)/fS;
plot(t, out.neuron.out(1, :))
xlabel('time (seconds)');
ylabel('membrane potential (unitless)')

(The t=... stuff just makes sure the plot is in seconds...)

Py Source Code (against 1262)
import math
... # switch on event type elif input['event']['type'] == EVENT_RUN_SERVICE:
# run dynamics
tau = 0.01 # 10mS membrane time constant
fS = input['time']['sampleRate']['rate']
lambd = math.exp(-1.0/(tau * fS))
persist['currentMembranePotential'] = persist['currentMembranePotential'] * lambd
# write output

Which should generate a plot something like this one.

Where do I go from here?

This is entirely up to you. You can keep as much state as you like, in the same way as shown above.