NEST
2.6.0,not_revisioned_source_dir@0
|
Event handler for all events of a MUSIC port received on this process. More...
#include <music_event_handler.h>
Public Member Functions | |
MusicEventHandler () | |
MusicEventHandler (std::string portname, double acceptable_latency, int max_buffered, Network *net) | |
virtual | ~MusicEventHandler () |
void | register_channel (int channel, nest::Node *mp) |
Register a new node to a specific channel on this port. More... | |
void | publish_port () |
Publish the MUSIC port. More... | |
void | operator() (double t, MUSIC::GlobalIndex channel) |
Called by MUSIC from within tick() to deliver events to NEST. More... | |
void | update (Time const &, const long_t, const long_t) |
This function is called by the scheduler and delivers the queued events to the target music_in_proxies. More... | |
Private Attributes | |
MUSIC::EventInputPort * | music_port_ |
MUSIC::PermutationIndex * | music_perm_ind_ |
bool | published_ |
std::string | portname_ |
std::vector< nest::Node * > | channelmap_ |
Maps channel number to music_event_in_proxy. More... | |
std::vector< MUSIC::GlobalIndex > | indexmap_ |
Maps local index to global MUSIC index (channel) More... | |
double | acceptable_latency_ |
The acceptable latency of the port in ms. More... | |
int | max_buffered_ |
Network * | net_ |
Pointer to global network driver. More... | |
std::vector < std::priority_queue< double, std::vector< double > , std::greater< double > > > | eventqueue_ |
Buffers incoming spike events until they are due. More... | |
Event handler for all events of a MUSIC port received on this process.
nest::MusicEventHandler::MusicEventHandler | ( | ) |
nest::MusicEventHandler::MusicEventHandler | ( | std::string | portname, |
double | acceptable_latency, | ||
int | max_buffered, | ||
Network * | net | ||
) |
|
virtual |
References music_perm_ind_, music_port_, and published_.
void nest::MusicEventHandler::operator() | ( | double | t, |
MUSIC::GlobalIndex | channel | ||
) |
Called by MUSIC from within tick() to deliver events to NEST.
This function only queues the events. Delivery to the targets takes place in update().
References assert(), channelmap_, and eventqueue_.
void nest::MusicEventHandler::publish_port | ( | ) |
Publish the MUSIC port.
This method has to be called once before the first simulation to tell MUSIC which channels lie on which processor.
References acceptable_latency_, channelmap_, nest::Communicator::get_music_setup(), indexmap_, SLIInterpreter::M_INFO, max_buffered_, nest::Network::message(), music_perm_ind_, music_port_, net_, portname_, and published_.
void nest::MusicEventHandler::register_channel | ( | int | channel, |
nest::Node * | mp | ||
) |
Register a new node to a specific channel on this port.
References channelmap_, eventqueue_, indexmap_, and portname_.
Referenced by nest::Network::register_music_event_in_proxy().
This function is called by the scheduler and delivers the queued events to the target music_in_proxies.
References acceptable_latency_, channelmap_, eventqueue_, nest::Time::get_ms(), nest::Time::get_steps(), nest::Time::ms, nest::Event::set_offset(), and nest::Event::set_stamp().
|
private |
The acceptable latency of the port in ms.
Referenced by publish_port(), and update().
|
private |
Maps channel number to music_event_in_proxy.
Referenced by operator()(), publish_port(), register_channel(), and update().
|
private |
Buffers incoming spike events until they are due.
The vector has one entry per channel. The priority queues used within the vector implement min-heaps stored in vectors.
Referenced by operator()(), register_channel(), and update().
|
private |
Maps local index to global MUSIC index (channel)
Referenced by publish_port(), and register_channel().
|
private |
Referenced by publish_port().
|
private |
Referenced by publish_port(), and ~MusicEventHandler().
|
private |
Referenced by publish_port(), and ~MusicEventHandler().
|
private |
Pointer to global network driver.
Referenced by publish_port().
|
private |
Referenced by publish_port(), and register_channel().
|
private |
Referenced by publish_port(), and ~MusicEventHandler().