NEST main@caf0ae8
 
Loading...
Searching...
No Matches
sic_connection.h
Go to the documentation of this file.
1/*
2 * sic_connection.h
3 *
4 * This file is part of NEST.
5 *
6 * Copyright (C) 2004 The NEST Initiative
7 *
8 * NEST is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * NEST is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with NEST. If not, see <http://www.gnu.org/licenses/>.
20 *
21 */
22
23#ifndef SIC_CONNECTION_H
24#define SIC_CONNECTION_H
25
26#include "connection.h"
27
28namespace nest
29{
30
31/* BeginUserDocs: synapse, astrocyte
32
33Short description
34+++++++++++++++++
35
36Synapse type for astrocyte-neuron connections
37
38Description
39+++++++++++
40
41``sic_connection`` connects an astrocyte to a target neuron. It exposes the target neuron to a slow inward current (SIC)
42induced by the astrocyte. The amplitude of the current is the product of the astrocytic current and the weight of the
43``sic_connection``.
44
45The source node of a ``sic_connection`` must be an astrocyte emitting a slow inward current, and the target node must be
46able to handle slow inward current input. Currently, :doc:`aeif_cond_alpha_astro` is the only neuron model that can
47receive ``sic_connection``. The connection may have a delay.
48
49Sends
50+++++
51
52SICEvent
53
54See also
55++++++++
56
57astrocyte_lr_1994, aeif_cond_alpha_astro
58
59Examples using this model
60+++++++++++++++++++++++++
61
62.. listexamples:: sic_connection
63
64EndUserDocs */
65
66void register_sic_connection( const std::string& name );
67
68template < typename targetidentifierT >
69class sic_connection : public Connection< targetidentifierT >
70{
71
72public:
73 // this line determines which common properties to use
78
85 , weight_( 1.0 )
86 {
87 }
88
89 std::unique_ptr< SecondaryEvent > get_secondary_event();
90
91 // Explicitly declare all methods inherited from the dependent base
92 // ConnectionBase. This avoids explicit name prefixes in all places these
93 // functions are used. Since ConnectionBase depends on the template parameter,
94 // they are not automatically found in the base class.
98
99 void
100 check_connection( Node& s, Node& t, size_t receptor_type, const CommonPropertiesType& )
101 {
102 EventType ge;
103
104 s.sends_secondary_event( ge );
105 ge.set_sender( s );
106 Connection< targetidentifierT >::target_.set_rport( t.handles_test_event( ge, receptor_type ) );
108 }
109
115 bool
116 send( Event& e, size_t t, const CommonSynapseProperties& )
117 {
118 e.set_weight( weight_ );
119 e.set_delay_steps( get_delay_steps() );
120 e.set_receiver( *get_target( t ) );
121 e.set_rport( get_rport() );
122 e();
123
124 return true;
125 }
126
127 void get_status( Dictionary& d ) const;
128
129 void set_status( const Dictionary& d, ConnectorModel& cm );
130
131 void
132 set_weight( double w )
133 {
134 weight_ = w;
135 }
136
137private:
138 double weight_;
139};
140
141template < typename targetidentifierT >
143
144template < typename targetidentifierT >
145void
147{
148 // We have to include the delay here to prevent
149 // errors due to internal calls of
150 // this function in SLI/pyNEST
151 ConnectionBase::get_status( d );
152 d[ names::weight ] = weight_;
153 d[ names::size_of ] = static_cast< long >( sizeof( *this ) );
154}
155
156template < typename targetidentifierT >
157std::unique_ptr< SecondaryEvent >
159{
160 return std::make_unique< SICEvent >();
161}
162
163template < typename targetidentifierT >
164void
166{
167 ConnectionBase::set_status( d, cm );
168 d.update_value( names::weight, weight_ );
169}
170
171} // namespace
172
173#endif /* #ifndef SIC_CONNECTION_H */
Dictionary class for interface to Python and C++ API.
Definition dictionary.h:213
Class containing the common properties for all connections of a certain type.
Definition common_synapse_properties.h:50
Base class for representing connections.
Definition connection.h:110
long get_delay_steps() const
Return the delay of the connection in steps.
Definition connection.h:181
Node * get_target(const size_t tid) const
Definition connection.h:239
size_t get_rport() const
Definition connection.h:244
Definition connector_model.h:69
Encapsulate information sent between nodes.
Definition event.h:103
void set_sender(Node &)
Change pointer to sending Node.
Definition event.h:920
Base class for all NEST network objects.
Definition node.h:99
Event for slow inward current (SIC) connections between astrocytes and neurons.
Definition secondary_event.h:458
Definition sic_connection.h:70
Connection< targetidentifierT > ConnectionBase
Definition sic_connection.h:75
void set_status(const Dictionary &d, ConnectorModel &cm)
Definition sic_connection.h:165
long get_delay_steps() const
Return the delay of the connection in steps.
Definition connection.h:181
SICEvent EventType
Definition sic_connection.h:76
Node * get_target(const size_t tid) const
Definition connection.h:239
double weight_
connection weight
Definition sic_connection.h:138
size_t get_rport() const
Definition connection.h:244
void set_weight(double w)
Definition sic_connection.h:132
static constexpr ConnectionModelProperties properties
Definition sic_connection.h:77
std::unique_ptr< SecondaryEvent > get_secondary_event()
Definition sic_connection.h:158
sic_connection()
Default Constructor.
Definition sic_connection.h:83
void check_connection(Node &s, Node &t, size_t receptor_type, const CommonPropertiesType &)
Definition sic_connection.h:100
bool send(Event &e, size_t t, const CommonSynapseProperties &)
Send an event to the receiver of this connection.
Definition sic_connection.h:116
void get_status(Dictionary &d) const
Definition sic_connection.h:146
CommonSynapseProperties CommonPropertiesType
Definition sic_connection.h:74
virtual size_t handles_test_event(SpikeEvent &, size_t receptor_type)
Check if the node can handle a particular event and receptor type.
Definition node.cpp:271
virtual void sends_secondary_event(GapJunctionEvent &ge)
Required to check, if source neuron may send a SecondaryEvent.
Definition node.cpp:381
const std::string weight("weight")
const std::string size_of("sizeof")
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33
void register_sic_connection(const std::string &name)
Definition sic_connection.cpp:32
ConnectionModelProperties
Definition connector_model.h:49