NEST
2.6.0,not_revisioned_source_dir@0
|
Base class for common properties of Stimulating Devices. More...
#include <stimulating_device.h>
Public Member Functions | |
StimulatingDevice () | |
StimulatingDevice (StimulatingDevice< EmittedEvent > const &) | |
virtual | ~StimulatingDevice () |
bool | is_active (const Time &) const |
Determine whether device is active. More... | |
void | get_status (DictionaryDatum &d) const |
void | enforce_single_syn_type (synindex) |
Throws IllegalConnection if synapse id differs from initial synapse id. More... | |
template<> | |
bool | is_active (const Time &T) const |
Returns true if the device is active at the given time stamp. More... | |
template<> | |
bool | is_active (const Time &T) const |
Returns true if the device is active at the given time stamp. More... | |
template<> | |
bool | is_active (const Time &T) const |
Returns true if the device is active at the given time stamp. More... | |
Public Member Functions inherited from nest::Device | |
Device () | |
Device (const Device &n) | |
virtual | ~Device () |
virtual void | init_parameters (const Device &) |
Reset parameters to those of model; also resets state. More... | |
virtual void | init_state (const Device &) |
Reset dynamic state to that of model. More... | |
virtual void | init_buffers () |
Reset buffers. More... | |
virtual void | calibrate () |
Set internal variables, including opening files. More... | |
virtual void | finalize () |
Housekeeping at end of simulation, eg close files. More... | |
virtual void | set_status (const DictionaryDatum &) |
long_t | get_t_min_ () const |
Return lower limit in steps. More... | |
long_t | get_t_max_ () const |
Return upper limit in steps. More... | |
Time const & | get_origin () const |
Time const & | get_start () const |
Time const & | get_stop () const |
Private Attributes | |
synindex | first_syn_id_ |
Synapse type of the first outgoing connection made by the Device. More... | |
Base class for common properties of Stimulating Devices.
Stimulating devices are all devices injecting currents, spike trains or other signals into a network. They provide only output and do not receive any input.
Stimulating devices come in (at least) two varieties: those providing analog signals (CurrentEvent) and thos providing spike trains (SpikeEvent). Device activation needs to be handled differently in both cases. The general principle is that of the left-open, right-closed interval (start, stop]. For devices emitting spikes, spikes with times in that interval will be emitted.
For analog stimuli, e.g., currents, a stimulus is present in the interval (t, t+h], where h is the simulation resolution, if the effect of the stimulus can be observed at t+h. Thus, if a stimulus is to be active from time a, its effect will first be observable at a+h. This requires that the Event communicating the stimulus must be delivered at time a, i.e., by the deliver_events() call prior to the update for (a, a+h].
Since stimulating devices are connected to their targets with a delay of one time step, this means that analog stimulating devices need to emit the event during the update step for the interval (a-h, a]. Thus, the device needs to be PRO-ACTIVE.
Further, activity of stimulating devices is determined on the basis of simulation time, not event time stamps. This means that the first simulation time step during which the device must emit events is the step for which the global clock has time a-h. If stimulation is to end by time b, this means that the last event should be emitted during the time step for which the global clock has time b-2h.
nest::StimulatingDevice< EmittedEvent >::StimulatingDevice | ( | ) |
nest::StimulatingDevice< EmittedEvent >::StimulatingDevice | ( | StimulatingDevice< EmittedEvent > const & | sd | ) |
|
inlinevirtual |
|
inline |
Throws IllegalConnection if synapse id differs from initial synapse id.
References nest::invalid_synindex.
|
inlinevirtual |
Reimplemented from nest::Device.
References nest::names::element_type, and nest::names::stimulator.
|
virtual |
Determine whether device is active.
The argument is the value of the simulation time.
Implements nest::Device.
|
inlinevirtual |
Returns true if the device is active at the given time stamp.
Semantics are implemented by subclasses.
Implements nest::Device.
References nest::Time::get_steps().
|
inlinevirtual |
Returns true if the device is active at the given time stamp.
Semantics are implemented by subclasses.
Implements nest::Device.
References nest::Time::get_steps().
|
inlinevirtual |
Returns true if the device is active at the given time stamp.
Semantics are implemented by subclasses.
Implements nest::Device.
References nest::Time::get_steps().
|
private |
Synapse type of the first outgoing connection made by the Device.
Used to check that devices connect using only a single synapse type, see #481 and #737. Since this value must survive resets, it is stored here, even though it is an implementation detail.