NEST main@caf0ae8
 
Loading...
Searching...
No Matches
nest::Connection< targetidentifierT > Class Template Reference

Base class for representing connections. More...

#include <connection.h>

Inheritance diagram for nest::Connection< targetidentifierT >:
[legend]
Collaboration diagram for nest::Connection< targetidentifierT >:
[legend]

Public Member Functions

 Connection ()
 
 Connection (const Connection< targetidentifierT > &rhs)=default
 
Connection & operator= (const Connection< targetidentifierT > &rhs)=default
 
std::unique_ptr< SecondaryEvent > get_secondary_event ()
 Get a pointer to an instance of a SecondaryEvent if this connection supports secondary events.
 
void get_status (Dictionary &d) const
 Get all properties of this connection and put them into a dictionary.
 
void set_status (const Dictionary &d, ConnectorModel &cm)
 Set properties of this connection from the values given in dictionary.
 
void check_synapse_params (const Dictionary &d) const
 Check syn_spec dictionary for parameters that are not allowed with the given connection.
 
void calibrate (const TimeConverter &)
 Calibrate the delay of this connection to the desired resolution.
 
double get_delay () const
 Return the delay of the connection in ms.
 
long get_delay_steps () const
 Return the delay of the connection in steps.
 
void set_delay (const double delay)
 Set the delay of the connection.
 
void set_delay_steps (const long delay)
 Set the delay of the connection in steps.
 
void set_syn_id (synindex syn_id)
 Set the synapse id of the connection.
 
synindex get_syn_id () const
 Get the synapse id of the connection.
 
long get_label () const
 
void trigger_update_weight (const size_t, const std::vector< spikecounter > &, const double, const CommonSynapseProperties &)
 Triggers an update of a synaptic weight.
 
Node * get_target (const size_t tid) const
 
size_t get_rport () const
 
void set_source_has_more_targets (const bool more_targets)
 Sets a flag in the connection to signal that the following connection has the same source.
 
bool source_has_more_targets () const
 Returns a flag denoting whether the connection has source subsequent targets.
 
void disable ()
 Disables the connection.
 
bool is_disabled () const
 Returns a flag denoting if the connection is disabled.
 

Static Public Attributes

static constexpr ConnectionModelProperties properties = ConnectionModelProperties::NONE
 
static constexpr bool supports_flush_event = false
 

Protected Member Functions

void check_connection_ (Node &dummy_target, Node &source, Node &target, const size_t receptor_type)
 This function calls check_connection() on the sender to check if the receiver accepts the event type and receptor type requested by the sender.
 

Protected Attributes

targetidentifierT target_
 
SynIdDelay syn_id_delay_
 

Detailed Description

template<typename targetidentifierT>
class nest::Connection< targetidentifierT >

Base class for representing connections.

It provides the mandatory properties receiver port and target, as well as the functions get_status() and set_status() to read and write them. A suitable Connector containing these connections can be obtained from the template GenericConnector.

Note
Please note that the event received by the send() function is a reference to a single object that is re-used by each Connection. This means that the object must not be changed in the Connection, or if needs to be changed, everything has to be reset after sending (i.e. after Event::operator() has been called).

Constructor & Destructor Documentation

◆ Connection() [1/2]

template<typename targetidentifierT >
nest::Connection< targetidentifierT >::Connection ( )
inline

◆ Connection() [2/2]

template<typename targetidentifierT >
nest::Connection< targetidentifierT >::Connection ( const Connection< targetidentifierT > &  rhs)
default

Member Function Documentation

◆ calibrate()

template<typename targetidentifierT >
void nest::Connection< targetidentifierT >::calibrate ( const TimeConverter &  tc)
inline

Calibrate the delay of this connection to the desired resolution.

References nest::TimeConverter::from_old_steps(), and nest::Time::get_steps().

Here is the call graph for this function:

◆ check_connection_()

template<typename targetidentifierT >
void nest::Connection< targetidentifierT >::check_connection_ ( Node &  dummy_target,
Node &  source,
Node &  target,
const size_t  receptor_type 
)
inlineprotected

This function calls check_connection() on the sender to check if the receiver accepts the event type and receptor type requested by the sender.

Parameters
sThe source node
rThe target node
receptorThe ID of the requested receptor type
thelast spike produced by the presynaptic neuron (for STDP and maturing connections)

Referenced by nest::bernoulli_synapse< targetidentifierT >::check_connection(), nest::clopath_synapse< targetidentifierT >::check_connection(), nest::cont_delay_synapse< targetidentifierT >::check_connection(), nest::ht_synapse< targetidentifierT >::check_connection(), nest::jonke_synapse< targetidentifierT >::check_connection(), nest::quantal_stp_synapse< targetidentifierT >::check_connection(), nest::static_synapse< targetidentifierT >::check_connection(), nest::static_synapse_hom_w< targetidentifierT >::check_connection(), nest::stdp_facetshw_synapse_hom< targetidentifierT >::check_connection(), nest::stdp_nn_pre_centered_synapse< targetidentifierT >::check_connection(), nest::stdp_nn_restr_synapse< targetidentifierT >::check_connection(), nest::stdp_nn_symm_synapse< targetidentifierT >::check_connection(), nest::stdp_pl_synapse_hom< targetidentifierT >::check_connection(), nest::stdp_synapse< targetidentifierT >::check_connection(), nest::stdp_synapse_hom< targetidentifierT >::check_connection(), nest::stdp_triplet_synapse< targetidentifierT >::check_connection(), nest::tsodyks2_synapse< targetidentifierT >::check_connection(), nest::tsodyks_synapse< targetidentifierT >::check_connection(), nest::tsodyks_synapse_hom< targetidentifierT >::check_connection(), nest::urbanczik_synapse< targetidentifierT >::check_connection(), nest::vogels_sprekeler_synapse< targetidentifierT >::check_connection(), and nest::stdp_dopamine_synapse< targetidentifierT >::check_connection().

Here is the caller graph for this function:

◆ check_synapse_params()

template<typename targetidentifierT >
void nest::Connection< targetidentifierT >::check_synapse_params ( const Dictionary &  d) const
inline

Check syn_spec dictionary for parameters that are not allowed with the given connection.

Will issue warning or throw error if an illegal parameter is found. The method does nothing if no illegal parameter is found.

Note
Classes requiring checks need to override the function with their own implementation, as this base class implementation does not do anything.
See also
ConnectorModel::check_synapse_params

◆ disable()

template<typename targetidentifierT >
void nest::Connection< targetidentifierT >::disable ( )
inline

Disables the connection.

See also
is_disabled

References nest::SynIdDelay::disable(), and nest::Connection< targetidentifierT >::syn_id_delay_.

Here is the call graph for this function:

◆ get_delay()

template<typename targetidentifierT >
double nest::Connection< targetidentifierT >::get_delay ( ) const
inline

Return the delay of the connection in ms.

References nest::SynIdDelay::get_delay_ms(), and nest::Connection< targetidentifierT >::syn_id_delay_.

Here is the call graph for this function:

◆ get_delay_steps()

template<typename targetidentifierT >
long nest::Connection< targetidentifierT >::get_delay_steps ( ) const
inline

Return the delay of the connection in steps.

References nest::SynIdDelay::delay, and nest::Connection< targetidentifierT >::syn_id_delay_.

◆ get_label()

template<typename targetidentifierT >
long nest::Connection< targetidentifierT >::get_label ( ) const
inline

◆ get_rport()

template<typename targetidentifierT >
size_t nest::Connection< targetidentifierT >::get_rport ( ) const
inline

◆ get_secondary_event()

template<typename targetidentifierT >
std::unique_ptr< SecondaryEvent > nest::Connection< targetidentifierT >::get_secondary_event ( )

Get a pointer to an instance of a SecondaryEvent if this connection supports secondary events.

To prevent erronous calls of this function on primary connections, the base class implementation below just contains assert(false).

◆ get_status()

template<typename targetidentifierT >
void nest::Connection< targetidentifierT >::get_status ( Dictionary &  d) const
inline

Get all properties of this connection and put them into a dictionary.

References nest::names::delay().

Here is the call graph for this function:

◆ get_syn_id()

template<typename targetidentifierT >
synindex nest::Connection< targetidentifierT >::get_syn_id ( ) const
inline

Get the synapse id of the connection.

References nest::SynIdDelay::syn_id, and nest::Connection< targetidentifierT >::syn_id_delay_.

◆ get_target()

template<typename targetidentifierT >
Node * nest::Connection< targetidentifierT >::get_target ( const size_t  tid) const
inline

◆ is_disabled()

template<typename targetidentifierT >
bool nest::Connection< targetidentifierT >::is_disabled ( ) const
inline

Returns a flag denoting if the connection is disabled.

See also
disable

References nest::SynIdDelay::is_disabled(), and nest::Connection< targetidentifierT >::syn_id_delay_.

Here is the call graph for this function:

◆ operator=()

template<typename targetidentifierT >
Connection & nest::Connection< targetidentifierT >::operator= ( const Connection< targetidentifierT > &  rhs)
default

◆ set_delay()

template<typename targetidentifierT >
void nest::Connection< targetidentifierT >::set_delay ( const double  delay)
inline

Set the delay of the connection.

References nest::SynIdDelay::set_delay_ms(), and nest::Connection< targetidentifierT >::syn_id_delay_.

Here is the call graph for this function:

◆ set_delay_steps()

template<typename targetidentifierT >
void nest::Connection< targetidentifierT >::set_delay_steps ( const long  delay)
inline

Set the delay of the connection in steps.

References nest::SynIdDelay::delay, and nest::Connection< targetidentifierT >::syn_id_delay_.

◆ set_source_has_more_targets()

template<typename targetidentifierT >
void nest::Connection< targetidentifierT >::set_source_has_more_targets ( const bool  more_targets)
inline

Sets a flag in the connection to signal that the following connection has the same source.

See also
source_has_more_targets

References nest::SynIdDelay::set_source_has_more_targets(), and nest::Connection< targetidentifierT >::syn_id_delay_.

Here is the call graph for this function:

◆ set_status()

template<typename targetidentifierT >
void nest::Connection< targetidentifierT >::set_status ( const Dictionary &  d,
ConnectorModel &  cm 
)
inline

Set properties of this connection from the values given in dictionary.

Note
Target and Rport cannot be changed after a connection has been created.

References nest::DelayChecker::assert_valid_delay_ms(), nest::KernelManager::connection_manager, nest::names::delay(), nest::ConnectionManager::get_delay_checker(), and nest::kernel().

Here is the call graph for this function:

◆ set_syn_id()

template<typename targetidentifierT >
void nest::Connection< targetidentifierT >::set_syn_id ( synindex  syn_id)
inline

Set the synapse id of the connection.

References nest::SynIdDelay::syn_id, and nest::Connection< targetidentifierT >::syn_id_delay_.

◆ source_has_more_targets()

template<typename targetidentifierT >
bool nest::Connection< targetidentifierT >::source_has_more_targets ( ) const
inline

Returns a flag denoting whether the connection has source subsequent targets.

See also
set_source_has_more_targets

References nest::SynIdDelay::source_has_more_targets(), and nest::Connection< targetidentifierT >::syn_id_delay_.

Here is the call graph for this function:

◆ trigger_update_weight()

template<typename targetidentifierT >
void nest::Connection< targetidentifierT >::trigger_update_weight ( const size_t  ,
const std::vector< spikecounter > &  ,
const double  ,
const CommonSynapseProperties &   
)
inline

Triggers an update of a synaptic weight.

This function is needed for neuromodulated synaptic plasticity

Member Data Documentation

◆ properties

template<typename targetidentifierT >
constexpr ConnectionModelProperties nest::Connection< targetidentifierT >::properties = ConnectionModelProperties::NONE
staticconstexpr

◆ supports_flush_event

template<typename targetidentifierT >
constexpr bool nest::Connection< targetidentifierT >::supports_flush_event = false
staticconstexpr

◆ syn_id_delay_

◆ target_

template<typename targetidentifierT >
targetidentifierT nest::Connection< targetidentifierT >::target_
protected

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