Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added time stamp to secondary events #709

Merged
merged 1 commit into from
Apr 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions nestkernel/event_delivery_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,11 @@ EventDeliveryManager::deliver_events( thread t )
kernel().model_manager.get_secondary_event_prototype( synid, t )
<< readpos;

// set time stamp (used by weight_recorder)
kernel()
.model_manager.get_secondary_event_prototype( synid, t )
.set_stamp( kernel().simulation_manager.get_clock() );

kernel().connection_manager.send_secondary(
t, kernel().model_manager.get_secondary_event_prototype( synid, t ) );
} // of while (true)
Expand Down
72 changes: 72 additions & 0 deletions testsuite/regressiontests/issue-707.sli
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/*
* issue-707.sli
*
* This file is part of NEST.
*
* Copyright (C) 2004 The NEST Initiative
*
* NEST is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* NEST is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NEST. If not, see <http://www.gnu.org/licenses/>.
*
*/


/* BeginDocumentation
Name: testsuite::issue-707

Synopsis: (issue-707) run -> NEST exits if test fails

Description:
This test ensures that the weight of gap junctions can
be recorded with the weight_recorder (thus that SecondaryEvents
have a properly set time stamp).

Author: Jan Hahne
FirstVersion: April 2017
SeeAlso:
*/

(unittest) run
/unittest using

% The following test needs the model hh_psc_alpha_gap, so
% this test should only run if we have GSL
statusdict/have_gsl :: not
{
exit_test_gracefully
}
if

{
ResetKernel

/hh_psc_alpha_gap Create /neuron_in Set
/hh_psc_alpha_gap Create /neuron_out Set
/weight_recorder Create /wr Set

/gap_junction << /weight_recorder wr >> SetDefaults

[neuron_in] [neuron_out]
<< /rule /one_to_one /make_symmetric true >>
<< /model /gap_junction /weight 2.0 >>
Connect

10 Simulate

wr GetStatus /events get /weights get 1 get

2.0 eq
}
assert_or_die

endusing