NEST
2.6.0,not_revisioned_source_dir@0
|
Encapsulates information which is sent between Nodes. More...
#include <event.h>
Public Member Functions | |
Event () | |
virtual | ~Event () |
virtual Event * | clone () const =0 |
Virtual copy constructor. More... | |
virtual void | operator() ()=0 |
Deliver the event to receiver. More... | |
void | set_receiver (Node &) |
Change pointer to receiving Node. More... | |
Node & | get_receiver () const |
Return reference to receiving Node. More... | |
Node & | get_sender () const |
Return reference to sending Node. More... | |
void | set_sender (Node &) |
Change pointer to sending Node. More... | |
index | get_sender_gid () const |
Return GID of sending Node. More... | |
void | set_sender_gid (index) |
Change GID of sending Node. More... | |
Time const & | get_stamp () const |
Return time stamp of the event. More... | |
void | set_delay (delay) |
Set the transmission delay of the event. More... | |
delay | get_delay () const |
Return transmission delay of the event. More... | |
delay | get_max_delay () const |
long_t | get_rel_delivery_steps (const Time &t) const |
Relative spike delivery time in steps. More... | |
port | get_port () const |
Return the sender port number of the event. More... | |
rport | get_rport () const |
Return the receiver port number of the event. More... | |
void | set_port (port p) |
Set the port number. More... | |
void | set_rport (rport p) |
Set the receiver port number (r-port). More... | |
double_t | get_offset () const |
Return the creation time offset of the Event. More... | |
void | set_offset (double_t t) |
Set the creation time of the Event. More... | |
weight | get_weight () const |
Return the weight. More... | |
void | set_weight (weight t) |
Set weight of the event. More... | |
bool | is_valid () const |
Check integrity of the event. More... | |
void | set_stamp (Time const &) |
Set the time stamp of the event. More... | |
Protected Attributes | |
index | sender_gid_ |
GID of sender or -1. More... | |
Node * | sender_ |
Pointer to sender or NULL. More... | |
Node * | receiver_ |
Pointer to receiver or NULL. More... | |
port | p_ |
Sender port number. More... | |
rport | rp_ |
Receiver port number (r-port). More... | |
delay | d_ |
Transmission delay. More... | |
Time | stamp_ |
Time stamp. More... | |
double | offset_ |
Offset for precise spike times. More... | |
weight | w_ |
Weight of the connection. More... | |
Encapsulates information which is sent between Nodes.
For each type of information there has to be a specialized event class.
Events are used for two tasks. During connection, they are used as polymorphic connect objects. During simulation they are used to transport basic event information from one node to the other.
A connection between two elements is physically established in two steps: First, create an event with the two envolved elements. Second, call the connect method of the event.
An event object contains only administrative information which is needed to successfully deliver the event. Thus, event objects cannot direcly contain custom data: events are not messages. If a node receives an event, arbitrary abounts of data may be exchanged between the participating nodes.
With this restriction it is possible to implement a comparatively efficient event handling scheme. 5-6 function calls per event may seem a long time, but this is cheap if we consider that event handling makes update and communication succeptible to parallel execution.
nest::Event::Event | ( | ) |
|
inlinevirtual |
|
pure virtual |
Virtual copy constructor.
Implemented in nest::DoubleDataEvent, nest::ConductanceEvent, nest::DataLoggingReply, nest::DataLoggingRequest, nest::CurrentEvent, nest::RateEvent, and nest::SpikeEvent.
|
inline |
Return transmission delay of the event.
The delay refers to the time until the event is expected to arrive at the receiver.
References d_.
Referenced by nest::binary_neuron< TGainfunction >::handle(), nest::iaf_psc_exp_multisynapse::handle(), nest::iaf_psc_alpha_multisynapse::handle(), nest::parrot_neuron_ps::handle(), nest::aeif_cond_alpha_multisynapse::handle(), nest::sli_neuron::handle(), nest::izhikevich::handle(), nest::iaf_chs_2007::handle(), nest::iaf_cond_exp::handle(), nest::aeif_cond_alpha_RK5::handle(), nest::hh_cond_exp_traub::handle(), nest::iaf_chxk_2008::handle(), nest::iaf_cond_exp_sfa_rr::handle(), nest::iaf_psc_exp::handle(), nest::aeif_cond_alpha::handle(), nest::iaf_cond_alpha::handle(), nest::iaf_neuron::handle(), nest::hh_psc_alpha::handle(), nest::iaf_psc_alpha_presc::handle(), nest::ht_neuron::handle(), nest::iaf_psc_delta::handle(), nest::iaf_psc_alpha::handle(), nest::aeif_cond_exp::handle(), nest::iaf_tum_2000::handle(), nest::mat2_psc_exp::handle(), nest::iaf_psc_exp_ps::handle(), nest::amat2_psc_exp::handle(), nest::pp_psc_delta::handle(), nest::pp_pop_psc_delta::handle(), nest::iaf_psc_alpha_canon::handle(), nest::iaf_cond_alpha_mc::handle(), nest::iaf_psc_delta_canon::handle(), and nest::operator<().
delay nest::Event::get_max_delay | ( | ) | const |
References nest::Scheduler::get_max_delay().
|
inline |
Return the creation time offset of the Event.
Each Event carries the exact time of creation. This time need not coincide with an integral multiple of the temporal resolution. Rather, Events may be created at any point in time.
References offset_.
Referenced by nest::parrot_neuron_ps::handle(), nest::iaf_psc_alpha_presc::handle(), nest::iaf_psc_exp_ps::handle(), nest::iaf_psc_alpha_canon::handle(), nest::iaf_psc_delta_canon::handle(), nest::ContDelayConnection< targetidentifierT >::send(), and nest::Scheduler::send_offgrid_remote().
|
inline |
Return the sender port number of the event.
This function returns the number of the port over which the Event was sent.
A | negative return value indicates that no port number was available. |
References p_.
Referenced by nest::gamma_sup_generator::event_hook(), nest::poisson_generator_ps::event_hook(), nest::ppd_sup_generator::event_hook(), nest::noise_generator::event_hook(), and nest::sinusoidal_gamma_generator::event_hook().
|
inline |
Return reference to receiving Node.
References receiver_.
Referenced by nest::gamma_sup_generator::event_hook(), nest::poisson_generator_ps::event_hook(), nest::sinusoidal_poisson_generator::event_hook(), nest::ppd_sup_generator::event_hook(), nest::noise_generator::event_hook(), nest::poisson_generator::event_hook(), nest::mip_generator::event_hook(), nest::sinusoidal_gamma_generator::event_hook(), nest::spike_generator::event_hook(), and nest::Node::event_hook().
Relative spike delivery time in steps.
Returns the delivery time of the spike relative to a given time in steps. Causality commands that the result should not be negative.
Time | reference time |
References d_, nest::Time::get_steps(), and stamp_.
Referenced by nest::binary_neuron< TGainfunction >::handle(), nest::iaf_psc_exp_multisynapse::handle(), nest::iaf_psc_alpha_multisynapse::handle(), nest::parrot_neuron_ps::handle(), nest::parrot_neuron::handle(), nest::aeif_cond_alpha_multisynapse::handle(), nest::sli_neuron::handle(), nest::izhikevich::handle(), nest::iaf_chs_2007::handle(), nest::iaf_cond_exp::handle(), nest::aeif_cond_alpha_RK5::handle(), nest::volume_transmitter::handle(), nest::hh_cond_exp_traub::handle(), nest::iaf_chxk_2008::handle(), nest::iaf_cond_exp_sfa_rr::handle(), nest::iaf_psc_exp::handle(), nest::aeif_cond_alpha::handle(), nest::iaf_cond_alpha::handle(), nest::iaf_neuron::handle(), nest::hh_psc_alpha::handle(), nest::ht_neuron::handle(), nest::iaf_psc_alpha_presc::handle(), nest::iaf_psc_delta::handle(), nest::aeif_cond_exp::handle(), nest::iaf_psc_alpha::handle(), nest::iaf_tum_2000::handle(), nest::mat2_psc_exp::handle(), nest::iaf_psc_exp_ps::handle(), nest::amat2_psc_exp::handle(), nest::pp_psc_delta::handle(), nest::pp_pop_psc_delta::handle(), nest::iaf_psc_alpha_canon::handle(), nest::iaf_cond_alpha_mc::handle(), and nest::iaf_psc_delta_canon::handle().
|
inline |
Return the receiver port number of the event.
This function returns the number of the r-port over which the Event was sent.
References rp_.
Referenced by nest::iaf_psc_exp_multisynapse::handle(), nest::iaf_psc_alpha_multisynapse::handle(), nest::music_event_out_proxy::handle(), nest::aeif_cond_alpha_multisynapse::handle(), nest::iaf_psc_exp::handle(), nest::ht_neuron::handle(), nest::correlomatrix_detector::handle(), nest::correlation_detector::handle(), and nest::iaf_cond_alpha_mc::handle().
|
inline |
Return reference to sending Node.
References sender_.
Referenced by nest::Scheduler::send_offgrid_remote(), and nest::Scheduler::send_remote().
|
inline |
Return GID of sending Node.
References assert(), and sender_gid_.
Referenced by nest::binary_neuron< TGainfunction >::handle(), nest::spin_detector::handle(), and nest::spike_detector::handle().
|
inline |
Return time stamp of the event.
The stamp denotes the time when the event was created. The resolution of Stamp is limited by the time base of the simulation kernel (
References stamp_.
Referenced by nest::binary_neuron< TGainfunction >::handle(), nest::music_event_out_proxy::handle(), nest::parrot_neuron_ps::handle(), nest::spin_detector::handle(), nest::spike_detector::handle(), nest::correlomatrix_detector::handle(), nest::correlation_detector::handle(), nest::iaf_psc_exp_ps::handle(), nest::iaf_psc_alpha_canon::handle(), nest::iaf_psc_delta_canon::handle(), nest::operator<(), nest::HTConnection< targetidentifierT >::send(), nest::Quantal_StpConnection< targetidentifierT >::send(), nest::Tsodyks2Connection< targetidentifierT >::send(), nest::STDPConnection< targetidentifierT >::send(), nest::STDPPLConnectionHom< targetidentifierT >::send(), nest::TsodyksConnection< targetidentifierT >::send(), nest::STDPConnectionHom< targetidentifierT >::send(), nest::STDPDopaConnection< targetidentifierT >::send(), nest::Connector< K, ConnectionT >::send(), nest::STDPFACETSHWConnectionHom< targetidentifierT >::send(), nest::Connector< 1, ConnectionT >::send(), and nest::Connector< K_cutoff, ConnectionT >::send().
|
inline |
Return the weight.
References w_.
Referenced by nest::spike_generator::event_hook(), nest::binary_neuron< TGainfunction >::handle(), nest::iaf_psc_exp_multisynapse::handle(), nest::iaf_psc_alpha_multisynapse::handle(), nest::parrot_neuron_ps::handle(), nest::aeif_cond_alpha_multisynapse::handle(), nest::sli_neuron::handle(), nest::izhikevich::handle(), nest::iaf_chs_2007::handle(), nest::iaf_cond_exp::handle(), nest::aeif_cond_alpha_RK5::handle(), nest::hh_cond_exp_traub::handle(), nest::iaf_chxk_2008::handle(), nest::iaf_cond_exp_sfa_rr::handle(), nest::iaf_psc_exp::handle(), nest::iaf_cond_alpha::handle(), nest::aeif_cond_alpha::handle(), nest::iaf_neuron::handle(), nest::hh_psc_alpha::handle(), nest::ht_neuron::handle(), nest::iaf_psc_alpha_presc::handle(), nest::iaf_psc_delta::handle(), nest::aeif_cond_exp::handle(), nest::iaf_psc_alpha::handle(), nest::iaf_tum_2000::handle(), nest::correlomatrix_detector::handle(), nest::mat2_psc_exp::handle(), nest::correlation_detector::handle(), nest::iaf_psc_exp_ps::handle(), nest::amat2_psc_exp::handle(), nest::pp_psc_delta::handle(), nest::pp_pop_psc_delta::handle(), nest::iaf_psc_alpha_canon::handle(), nest::iaf_cond_alpha_mc::handle(), and nest::iaf_psc_delta_canon::handle().
|
inline |
|
pure virtual |
Deliver the event to receiver.
This operator calls the handler for the specific event type at the receiver.
Implemented in nest::DoubleDataEvent, nest::ConductanceEvent, nest::DataLoggingReply, nest::DataLoggingRequest, nest::DSCurrentEvent, nest::CurrentEvent, nest::RateEvent, nest::DSSpikeEvent, and nest::SpikeEvent.
|
inline |
Set the transmission delay of the event.
The delay refers to the time until the event is expected to arrive at the receiver.
t | delay. |
References nest::names::d, and d_.
Referenced by nest::ContDelayConnection< targetidentifierT >::send(), nest::StaticConnectionHomW< targetidentifierT >::send(), nest::StaticConnection< targetidentifierT >::send(), nest::HTConnection< targetidentifierT >::send(), nest::Quantal_StpConnection< targetidentifierT >::send(), nest::Tsodyks2Connection< targetidentifierT >::send(), nest::STDPConnection< targetidentifierT >::send(), nest::STDPPLConnectionHom< targetidentifierT >::send(), nest::TsodyksConnection< targetidentifierT >::send(), nest::STDPConnectionHom< targetidentifierT >::send(), nest::STDPDopaConnection< targetidentifierT >::send(), and nest::STDPFACETSHWConnectionHom< targetidentifierT >::send().
|
inline |
Set the creation time of the Event.
Each Event carries the exact time of creation in realtime. This time need not coincide with an integral multiple of the temporal resolution. Rather, Events may be created at any point in time.
t | Creation time in realtime. t has to be in [0, h). |
References offset_.
Referenced by nest::iaf_psc_exp_ps::emit_instant_spike_(), nest::iaf_psc_delta_canon::emit_instant_spike_(), nest::iaf_psc_alpha_canon::emit_instant_spike_(), nest::iaf_psc_exp_ps::emit_spike_(), nest::iaf_psc_delta_canon::emit_spike_(), nest::iaf_psc_alpha_canon::emit_spike_(), nest::poisson_generator_ps::event_hook(), nest::Scheduler::prepare_nodes(), nest::ContDelayConnection< targetidentifierT >::send(), nest::MusicEventHandler::update(), nest::parrot_neuron_ps::update(), nest::iaf_chxk_2008::update(), nest::iaf_psc_alpha_presc::update(), and nest::spike_generator::update().
|
inline |
Set the port number.
Each event carries the number of the port over which the event is sent. When a connection is established, it receives a unique ID from the sender. This number has to be stored in each Event object.
p | Port number of the connection, or -1 if unknown. |
References nest::names::p, and p_.
Referenced by nest::Connector< K, ConnectionT >::send(), nest::Connector< 1, ConnectionT >::send(), and nest::Connector< K_cutoff, ConnectionT >::send().
|
inline |
Change pointer to receiving Node.
References receiver_.
Referenced by nest::ContDelayConnection< targetidentifierT >::send(), nest::StaticConnectionHomW< targetidentifierT >::send(), nest::StaticConnection< targetidentifierT >::send(), nest::HTConnection< targetidentifierT >::send(), nest::Quantal_StpConnection< targetidentifierT >::send(), nest::Tsodyks2Connection< targetidentifierT >::send(), nest::STDPConnection< targetidentifierT >::send(), nest::STDPPLConnectionHom< targetidentifierT >::send(), nest::TsodyksConnection< targetidentifierT >::send(), nest::STDPConnectionHom< targetidentifierT >::send(), nest::STDPDopaConnection< targetidentifierT >::send(), and nest::STDPFACETSHWConnectionHom< targetidentifierT >::send().
|
inline |
Set the receiver port number (r-port).
When a connection is established, the receiving Node may issue a port number (r-port) to distinguish the incomin connection. By the default, the r-port is not used and its port number defaults to zero.
p | Receiver port number of the connection, or 0 if unused. |
References rp_.
Referenced by nest::ContDelayConnection< targetidentifierT >::send(), nest::StaticConnectionHomW< targetidentifierT >::send(), nest::StaticConnection< targetidentifierT >::send(), nest::HTConnection< targetidentifierT >::send(), nest::Quantal_StpConnection< targetidentifierT >::send(), nest::Tsodyks2Connection< targetidentifierT >::send(), nest::STDPConnection< targetidentifierT >::send(), nest::STDPPLConnectionHom< targetidentifierT >::send(), nest::TsodyksConnection< targetidentifierT >::send(), nest::STDPConnectionHom< targetidentifierT >::send(), nest::STDPDopaConnection< targetidentifierT >::send(), and nest::STDPFACETSHWConnectionHom< targetidentifierT >::send().
|
inline |
Change pointer to sending Node.
References sender_.
Referenced by nest::music_event_in_proxy::handle(), nest::binary_neuron< TGainfunction >::send_test_event(), nest::iaf_psc_exp_multisynapse::send_test_event(), nest::ac_generator::send_test_event(), nest::step_current_generator::send_test_event(), nest::iaf_psc_alpha_multisynapse::send_test_event(), nest::dc_generator::send_test_event(), nest::pulsepacket_generator::send_test_event(), nest::gamma_sup_generator::send_test_event(), nest::poisson_generator_ps::send_test_event(), nest::sinusoidal_poisson_generator::send_test_event(), nest::parrot_neuron_ps::send_test_event(), nest::ppd_sup_generator::send_test_event(), nest::parrot_neuron::send_test_event(), nest::music_event_in_proxy::send_test_event(), nest::aeif_cond_alpha_multisynapse::send_test_event(), nest::sli_neuron::send_test_event(), nest::iaf_chs_2007::send_test_event(), nest::iaf_cond_exp::send_test_event(), nest::noise_generator::send_test_event(), nest::izhikevich::send_test_event(), nest::poisson_generator::send_test_event(), nest::aeif_cond_alpha_RK5::send_test_event(), nest::iaf_chxk_2008::send_test_event(), nest::mip_generator::send_test_event(), nest::hh_cond_exp_traub::send_test_event(), nest::sinusoidal_gamma_generator::send_test_event(), nest::iaf_cond_exp_sfa_rr::send_test_event(), nest::iaf_cond_alpha::send_test_event(), nest::iaf_psc_exp::send_test_event(), nest::aeif_cond_alpha::send_test_event(), nest::iaf_neuron::send_test_event(), nest::hh_psc_alpha::send_test_event(), nest::ht_neuron::send_test_event(), nest::iaf_psc_alpha_presc::send_test_event(), nest::iaf_psc_delta::send_test_event(), nest::mat2_psc_exp::send_test_event(), nest::iaf_psc_alpha::send_test_event(), nest::aeif_cond_exp::send_test_event(), nest::iaf_tum_2000::send_test_event(), nest::iaf_psc_exp_ps::send_test_event(), nest::amat2_psc_exp::send_test_event(), nest::pp_psc_delta::send_test_event(), nest::iaf_psc_alpha_canon::send_test_event(), nest::pp_pop_psc_delta::send_test_event(), nest::iaf_cond_alpha_mc::send_test_event(), nest::Multimeter::send_test_event(), nest::iaf_psc_delta_canon::send_test_event(), and nest::spike_generator::send_test_event().
|
inline |
Change GID of sending Node.
References sender_gid_.
Referenced by nest::Scheduler::prepare_nodes(), and nest::Network::send_local().
|
inline |
Set the time stamp of the event.
The time stamp refers to the time when the event was created.
References stamp_.
Referenced by nest::poisson_generator_ps::event_hook(), nest::Multimeter::handle(), nest::Scheduler::prepare_nodes(), and nest::MusicEventHandler::update().
|
inline |
Set weight of the event.
References nest::names::w, and w_.
Referenced by nest::spike_generator::event_hook(), nest::spin_detector::handle(), nest::ContDelayConnection< targetidentifierT >::send(), nest::StaticConnectionHomW< targetidentifierT >::send(), nest::StaticConnection< targetidentifierT >::send(), nest::HTConnection< targetidentifierT >::send(), nest::Quantal_StpConnection< targetidentifierT >::send(), nest::Tsodyks2Connection< targetidentifierT >::send(), nest::STDPConnection< targetidentifierT >::send(), nest::STDPPLConnectionHom< targetidentifierT >::send(), nest::TsodyksConnection< targetidentifierT >::send(), nest::STDPConnectionHom< targetidentifierT >::send(), nest::STDPDopaConnection< targetidentifierT >::send(), and nest::STDPFACETSHWConnectionHom< targetidentifierT >::send().
|
protected |
Transmission delay.
Number of simulations steps that pass before the event is delivered at the receiver. The delay must be at least 1.
Referenced by get_delay(), get_rel_delivery_steps(), is_valid(), and set_delay().
|
protected |
Offset for precise spike times.
offset_ specifies a correction to the creation time. If the resolution of stamp is not sufficiently precise, this attribute can be used to correct the creation time. offset_ has to be in [0, h).
Referenced by get_offset(), and set_offset().
|
protected |
Sender port number.
The sender port is used as a unique identifier for the connection. The receiver of an event can use the port number to obtain data from the sender. The sender uses this number to locate target-specific information.
Referenced by get_port(), and set_port().
|
protected |
Pointer to receiver or NULL.
Referenced by get_receiver(), is_valid(), nest::SpikeEvent::operator()(), nest::RateEvent::operator()(), nest::CurrentEvent::operator()(), nest::DataLoggingRequest::operator()(), nest::DataLoggingReply::operator()(), nest::ConductanceEvent::operator()(), nest::DoubleDataEvent::operator()(), and set_receiver().
|
protected |
Receiver port number (r-port).
The receiver port (r-port) can be used by the receiving Node to distinguish incoming connections. E.g. the r-port number can be used by Events to access specific parts of a Node. In most cases, however, this port will no be used.
Referenced by get_rport(), and set_rport().
|
protected |
Pointer to sender or NULL.
Referenced by get_sender(), is_valid(), nest::DSSpikeEvent::operator()(), nest::DSCurrentEvent::operator()(), and set_sender().
|
protected |
GID of sender or -1.
Referenced by get_sender_gid(), and set_sender_gid().
|
protected |
Time stamp.
The time stamp specifies the absolute time when the event shall arrive at the target.
Referenced by get_rel_delivery_steps(), get_stamp(), and set_stamp().
|
protected |
Weight of the connection.
Referenced by get_weight(), and set_weight().