NEST  2.6.0,not_revisioned_source_dir@0
Public Member Functions | Protected Attributes | List of all members
nest::Event Class Referenceabstract

Encapsulates information which is sent between Nodes. More...

#include <event.h>

Inheritance diagram for nest::Event:
nest::DataEvent< double > nest::ConductanceEvent nest::CurrentEvent nest::DataEvent< D > nest::DataLoggingReply nest::DataLoggingRequest nest::RateEvent nest::SpikeEvent

Public Member Functions

 Event ()
 
virtual ~Event ()
 
virtual Eventclone () 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...
 
Nodeget_receiver () const
 Return reference to receiving Node. More...
 
Nodeget_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...
 
Nodesender_
 Pointer to sender or NULL. More...
 
Nodereceiver_
 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...
 

Detailed Description

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.

See also
Node
SpikeEvent
RateEvent
CurrentEvent
CurrentEvent
ConductanceEvent

Constructor & Destructor Documentation

nest::Event::Event ( )
virtual nest::Event::~Event ( )
inlinevirtual

Member Function Documentation

virtual Event* nest::Event::clone ( ) const
pure virtual
delay nest::Event::get_delay ( ) const
inline
delay nest::Event::get_max_delay ( ) const
double_t nest::Event::get_offset ( ) const
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().

port nest::Event::get_port ( ) const
inline

Return the sender port number of the event.

This function returns the number of the port over which the Event was sent.

Return values
Anegative 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().

Node & nest::Event::get_receiver ( void  ) const
inline
long_t nest::Event::get_rel_delivery_steps ( const Time t) const
inline
rport nest::Event::get_rport ( ) const
inline

Return the receiver port number of the event.

This function returns the number of the r-port over which the Event was sent.

Note
A return value of 0 indicates that the r-port is not used.

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().

Node & nest::Event::get_sender ( void  ) const
inline

Return reference to sending Node.

References sender_.

Referenced by nest::Scheduler::send_offgrid_remote(), and nest::Scheduler::send_remote().

index nest::Event::get_sender_gid ( void  ) const
inline
Time const & nest::Event::get_stamp ( ) const
inline
weight nest::Event::get_weight ( ) const
inline
bool nest::Event::is_valid ( ) const
inline

Check integrity of the event.

This function returns true, if all data, in particular sender and receiver pointers are correctly set.

References d_, receiver_, and sender_.

virtual void nest::Event::operator() ( )
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.

void nest::Event::set_delay ( delay  d)
inline
void nest::Event::set_offset ( double_t  t)
inline
void nest::Event::set_port ( port  p)
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.

Parameters
pPort 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().

void nest::Event::set_receiver ( Node r)
inline
void nest::Event::set_rport ( rport  p)
inline
void nest::Event::set_sender ( Node s)
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().

void nest::Event::set_sender_gid ( index  gid)
inline

Change GID of sending Node.

References sender_gid_.

Referenced by nest::Scheduler::prepare_nodes(), and nest::Network::send_local().

void nest::Event::set_stamp ( Time const &  s)
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().

void nest::Event::set_weight ( weight  t)
inline

Member Data Documentation

delay nest::Event::d_
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().

double nest::Event::offset_
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().

port nest::Event::p_
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.

Note
A negative port number indicates an unknown port.

Referenced by get_port(), and set_port().

Node* nest::Event::receiver_
protected
rport nest::Event::rp_
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.

Note
The use of this port number is optional.
An r-port number of 0 indicates that the port is not used.

Referenced by get_rport(), and set_rport().

Node* nest::Event::sender_
protected
index nest::Event::sender_gid_
protected

GID of sender or -1.

Referenced by get_sender_gid(), and set_sender_gid().

Time nest::Event::stamp_
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().

weight nest::Event::w_
protected

Weight of the connection.

Referenced by get_weight(), and set_weight().


The documentation for this class was generated from the following files: