NEST
2.6.0,not_revisioned_source_dir@0
|
General analog data recorder. More...
#include <multimeter.h>
Classes | |
struct | Buffers_ |
struct | Parameters_ |
struct | State_ |
struct | Variables_ |
Public Member Functions | |
Multimeter () | |
Multimeter (const Multimeter &) | |
bool | has_proxies () const |
port | send_test_event (Node &, rport, synindex, bool) |
Send an event to the receiving_node passed as an argument. More... | |
void | handle (DataLoggingReply &) |
Handler for universal data logging request. More... | |
void | get_status (DictionaryDatum &) const |
void | set_status (const DictionaryDatum &) |
Public Member Functions inherited from nest::Node | |
Node () | |
Node (Node const &) | |
virtual | ~Node () |
virtual Node * | clone () const |
Virtual copy constructor. More... | |
virtual bool | potential_global_receiver () const |
Returns true for potential global receivers (e.g. More... | |
virtual void | set_has_proxies (const bool) |
Sets has_proxies_ member variable (to switch to global spike detection mode) More... | |
virtual void | set_local_receiver (const bool) |
Sets local_receiver_ member variable (to switch to global spike detection mode) More... | |
virtual bool | local_receiver () const |
Returns true if the node only receives events from nodes/devices on the same thread. More... | |
virtual bool | one_node_per_process () const |
Returns true if the node exists only once per process, but does not have proxies on remote threads. More... | |
virtual bool | is_off_grid () const |
Returns true if the node if it sends/receives -grid events This is used to discriminate between different types of nodes, when adding new nodes to the network. More... | |
virtual bool | is_proxy () const |
Returns true if the node is a proxy node. More... | |
std::string | get_name () const |
Return class name. More... | |
index | get_gid () const |
Return global Network ID. More... | |
index | get_lid () const |
Return local node ID. More... | |
index | get_subnet_index () const |
Return the index to the node in the node array of the parent subnet. More... | |
int | get_model_id () const |
Return model ID of the node. More... | |
Subnet * | get_parent () const |
Return pointer to parent subnet. More... | |
virtual std::string | print_network (int, int, std::string="") |
Prints out one line of the tree view of the network. More... | |
bool | is_frozen () const |
Returns true if node is frozen, i.e., shall not be updated. More... | |
bool | is_local () const |
Returns true if the node is allocated in the local process. More... | |
void | init_state () |
Set state variables to the default values for the model. More... | |
void | init_buffers () |
Initialize buffers of a node. More... | |
virtual void | set_status (const DictionaryDatum &)=0 |
Change properties of the node according to the entries in the dictionary. More... | |
virtual void | get_status (DictionaryDatum &) const =0 |
Export properties of the node by setting entries in the status dictionary. More... | |
virtual port | handles_test_event (SpikeEvent &, rport receptor_type) |
Check if the node can handle a particular event and receptor type. More... | |
virtual port | handles_test_event (RateEvent &, rport receptor_type) |
virtual port | handles_test_event (DataLoggingRequest &, rport receptor_type) |
virtual port | handles_test_event (CurrentEvent &, rport receptor_type) |
virtual port | handles_test_event (ConductanceEvent &, rport receptor_type) |
virtual port | handles_test_event (DoubleDataEvent &, rport receptor_type) |
virtual port | handles_test_event (DSSpikeEvent &, rport receptor_type) |
virtual port | handles_test_event (DSCurrentEvent &, rport receptor_type) |
virtual void | register_stdp_connection (double_t) |
Register a STDP connection. More... | |
virtual void | unregister_stdp_connection (double_t) |
Unregister a STDP connection. More... | |
virtual void | handle (SpikeEvent &e) |
Handle incoming spike events. More... | |
virtual void | handle (RateEvent &e) |
Handler for rate events. More... | |
virtual void | handle (DataLoggingRequest &e) |
Handler for universal data logging request. More... | |
virtual void | handle (CurrentEvent &e) |
Handler for current events. More... | |
virtual void | handle (ConductanceEvent &e) |
Handler for conductance events. More... | |
virtual void | handle (DoubleDataEvent &e) |
Handler for DoubleData events. More... | |
virtual double_t | get_K_value (double_t t) |
return the Kminus value at t (in ms). More... | |
virtual void | get_K_values (double_t t, double_t &Kminus, double_t &triplet_Kminus) |
write the Kminus and triplet_Kminus values at t (in ms) to the provided locations. More... | |
virtual void | get_history (double_t t1, double_t t2, std::deque< histentry >::iterator *start, std::deque< histentry >::iterator *finish) |
return the spike history for (t1,t2]. More... | |
virtual void | event_hook (DSSpikeEvent &) |
Modify Event object parameters during event delivery. More... | |
virtual void | event_hook (DSCurrentEvent &) |
void | set_thread (thread) |
Store the number of the thread to which the node is assigned. More... | |
thread | get_thread () const |
Retrieve the number of the thread to which the node is assigned. More... | |
void | set_vp (thread) |
Store the number of the virtual process to which the node is assigned. More... | |
thread | get_vp () const |
Retrieve the number of the virtual process to which the node is assigned. More... | |
void | set_model_id (int) |
Set the model id. More... | |
virtual bool | is_subnet () const |
DictionaryDatum | get_status_base () |
Return a dictionary with the node's properties. More... | |
void | set_status_base (const DictionaryDatum &) |
Set status dictionary of a node. More... | |
bool | is_model_prototype () const |
Returns true if node is model prototype. More... | |
void | set_thread_lid (const index) |
set thread local index More... | |
index | get_thread_lid () const |
get thread local index More... | |
bool | buffers_initialized () const |
True if buffers have been initialized. More... | |
void | set_buffers_initialized (bool initialized) |
Protected Member Functions | |
void | init_state_ (Node const &) |
Private function to initialize the state of a node to model defaults. More... | |
void | init_buffers_ () |
Private function to initialize the buffers of a node. More... | |
void | calibrate () |
Re-calculate dependent parameters of the node. More... | |
void | finalize () |
Finalize node. More... | |
void | update (Time const &, const long_t, const long_t) |
Collect and output membrane potential information. More... | |
Protected Member Functions inherited from nest::Node | |
virtual size_t | num_thread_siblings_ () const |
Return the number of thread siblings in SiblingContainer. More... | |
virtual Node * | get_thread_sibling_ (index) const |
Return the specified member of a SiblingContainer. More... | |
virtual Node * | get_thread_sibling_safe_ (index) const |
Return specified member of a SiblingContainer, with access control. More... | |
Model & | get_model_ () const |
void | set_frozen_ (bool frozen) |
Mark node as frozen. More... | |
template<typename ConcreteNode > | |
const ConcreteNode & | downcast (const Node &) |
Auxiliary function to downcast a Node to a concrete class derived from Node. More... | |
Private Member Functions | |
bool | is_active (Time const &T) const |
Indicate if recording device is active. More... | |
void | print_value_ (const std::vector< double_t > &) |
"Print" one value to file or screen, depending on settings in RecordingDevice. More... | |
void | add_data_ (DictionaryDatum &) const |
Add recorded data to dictionary. More... | |
Private Attributes | |
RecordingDevice | device_ |
Parameters_ | P_ |
State_ | S_ |
Buffers_ | B_ |
Variables_ | V_ |
Additional Inherited Members | |
Static Public Member Functions inherited from nest::Node | |
static Network * | network () |
Return pointer to network driver class. More... | |
Static Protected Attributes inherited from nest::Node | |
static Network * | net_ =NULL |
Pointer to global network driver. More... | |
General analog data recorder.
This class is based on RecordingDevice and adds common functionality for devices sampling analog values at given time intervals. The user specifies which data are to be sampled at what interval.
Sampling works in the way the the sampled node must store the relevant data for the most recent completed time slice and that the sampling device then sends a Request for data with a given time stamp.
Start and stop are handled as follows: the first recorded data is with time stamp origin+start+1, the last recorded one that with time stamp origin+stop. Only such times are recorded for which (T-(origin+start)) mod interval is zero.
The recording interval defaults to 1ms; this entails that the simulation resolution cannot be set to larger values than 1ms unless the analog recording device interval is set to at least that resolution.
nest::Multimeter::Multimeter | ( | ) |
nest::Multimeter::Multimeter | ( | const Multimeter & | n | ) |
|
private |
Add recorded data to dictionary.
/events | dictionary to be placed in properties dictionary |
References accumulate_property(), append_property(), assert(), nest::Multimeter::State_::data_, device_, initialize_property_doublevector(), P_, nest::Multimeter::Parameters_::record_from_, S_, and nest::RecordingDevice::to_accumulator().
|
protectedvirtual |
Re-calculate dependent parameters of the node.
This function is called each time a simulation is begun/resumed. It must re-calculate all internal Variables of the node required for spike handling or updating the node.
Implements nest::Node.
References nest::RecordingDevice::calibrate(), nest::Multimeter::Variables_::current_request_data_start_, device_, nest::Multimeter::Variables_::new_request_, and V_.
|
protectedvirtual |
Finalize node.
Override this function if a node needs to "wrap up" things after a simulation, i.e., before Scheduler::resume() returns. Typical use-cases are devices that need to flush buffers or disconnect from external files or pipes.
Reimplemented from nest::Node.
References device_, and nest::RecordingDevice::finalize().
|
inline |
|
virtual |
Handler for universal data logging request.
UnexpectedEvent |
Reimplemented from nest::Node.
References assert(), nest::Multimeter::Variables_::current_request_data_start_, nest::Multimeter::State_::data_, device_, nest::DataLoggingReply::get_info(), is_active(), nest::Multimeter::Variables_::new_request_, print_value_(), nest::RecordingDevice::record_event(), S_, nest::Event::set_stamp(), nest::RecordingDevice::to_accumulator(), nest::RecordingDevice::to_memory(), and V_.
|
inlinevirtual |
Reimplemented from nest::Node.
|
protectedvirtual |
Private function to initialize the buffers of a node.
This function, which must be overloaded by all derived classes, provides the implementation for initializing the buffers of a node.
Implements nest::Node.
References device_, and nest::RecordingDevice::init_buffers().
|
protectedvirtual |
Private function to initialize the state of a node to model defaults.
This function, which must be overloaded by all derived classes, provides the implementation for initializing the state of a node to the model defaults; the state is the set of observable dynamic variables.
Reference | to model prototype object. |
Implements nest::Node.
References nest::Multimeter::State_::data_, device_, nest::RecordingDevice::init_state(), and S_.
|
private |
Indicate if recording device is active.
The argument is the time stamp of the data requested, device is active if start_ < T <= stop_ and (T-start_)interval_ == 0.
References device_, nest::Time::get_steps(), nest::Device::get_t_max_(), and nest::Device::get_t_min_().
Referenced by handle().
|
private |
"Print" one value to file or screen, depending on settings in RecordingDevice.
References device_, and nest::RecordingDevice::print_value().
Referenced by handle().
|
virtual |
Send an event to the receiving_node passed as an argument.
Default implementation of check_connection just throws UnexpectedEvent.
This is required during the connection handshaking to test, if the receiving_node can handle the event type and receptor_type sent by the source node.
If dummy_target is true, this indicates that receiving_node is derived from ConnTestDummyNodeBase and used in the first call to send_test_event(). This can be ignored in most cases, but Nodes sending DS*Events to their own event hooks and then *Events to their proper targets must send DS*Events when called with the dummy target, and *Events when called with the real target, see #478.
Reimplemented from nest::Node.
References B_, numerics::e, nest::Node::handles_test_event(), nest::Multimeter::Buffers_::has_targets_, nest::Multimeter::Parameters_::interval_, nest::invalid_port_, nest::Node::is_model_prototype(), nest::names::p, P_, nest::Multimeter::Parameters_::record_from_, and nest::Event::set_sender().
|
inline |
References nest::names::frozen, and nest::Multimeter::Parameters_::set().
|
protectedvirtual |
Collect and output membrane potential information.
This function pages all its targets at all pertinent sample points for membrane potential information and then outputs that information. The sampled nodes must provide data from the previous time slice.
Implements nest::Node.
References B_, nest::Time::get_steps(), nest::Multimeter::Buffers_::has_targets_, nest::Node::network(), nest::Multimeter::Variables_::new_request_, P_, nest::Multimeter::Parameters_::record_from_, nest::Network::send(), and V_.
|
private |
Referenced by send_test_event(), and update().
|
private |
Referenced by add_data_(), calibrate(), finalize(), handle(), init_buffers_(), init_state_(), is_active(), and print_value_().
|
private |
Referenced by add_data_(), send_test_event(), and update().
|
private |
Referenced by add_data_(), handle(), and init_state_().
|
private |
Referenced by calibrate(), handle(), and update().