NEST  2.6.0,not_revisioned_source_dir@0
static_connection_hom_w.h
Go to the documentation of this file.
1 /*
2  * static_connection_hom_w.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 
24 /* BeginDocumentation
25  Name: static_synapse_hom_w - Synapse type for static connections with homogeneous weight.
26 
27  Description:
28  static_synapse_hom_w does not support any kind of plasticity. It simply stores
29  the parameters target, and receiver port for each connection and uses a common
30  weight and delay for all connections.
31 
32  Transmits: SpikeEvent, RateEvent, CurrentEvent, ConductanceEvent, DataLoggingRequest, DoubleDataEvent
33 
34  Parameters:
35  No Parameters
36 
37  References:
38  No References
39  FirstVersion: April 2008
40  Author: Susanne Kunkel, Moritz Helias
41  SeeAlso: synapsedict, static_synapse
42 */
43 
44 #ifndef STATICCONNECTION_HOM_W_H
45 #define STATICCONNECTION_HOM_W_H
46 
47 #include "connection.h"
49 
50 namespace nest
51 {
52 
57 template<typename targetidentifierT>
58 class StaticConnectionHomW : public Connection<targetidentifierT>
59 {
60 
61  public:
62 
63  // this line determines which common properties to use
66 
67  // Explicitly declare all methods inherited from the dependent base ConnectionBase.
68  // This avoids explicit name prefixes in all places these functions are used.
69  // Since ConnectionBase depends on the template parameter, they are not automatically
70  // found in the base class.
74 
76  {
77  public:
78  // Ensure proper overriding of overloaded virtual functions.
79  // Return values from functions are ignored.
89  };
90 
91 
92  void get_status(DictionaryDatum & d) const;
93 
95  {
96  ConnTestDummyNode dummy_target;
97  ConnectionBase::check_connection_(dummy_target, s, t, receptor_type);
98  }
99 
107  {
108  e.set_weight(cp.get_weight());
110  e.set_receiver( *get_target(t) );
111  e.set_rport( get_rport() );
112  e();
113  }
114 
115  void set_weight(double_t) { throw BadProperty("Setting of individual weights is not possible! The common weights can be changed via CopyModel()."); }
116 
117 };
118 
119 
120  template<typename targetidentifierT>
122  {
123  ConnectionBase::get_status(d);
124  def<long_t>(d, names::size_of, sizeof(*this));
125  }
126 
127 } // namespace
128 
129 #endif /* #ifndef STATICCONNECTION_HOM_W_H */
void set_rport(rport p)
Set the receiver port number (r-port).
Definition: event.h:817
void set_receiver(Node &)
Change pointer to receiving Node.
Definition: event.h:708
const Name receptor_type("receptor_type")
Connection parameters.
Definition: nest_names.h:240
Definition: lockptrdatum.h:40
port handles_test_event(DataLoggingRequest &, rport)
Definition: static_connection_hom_w.h:83
const Name d("d")
Specific to Izhikevich 2003.
Definition: nest_names.h:83
void send(Event &e, thread t, double_t, const CommonPropertiesHomW &cp)
Send an event to the receiver of this connection.
Definition: static_connection_hom_w.h:106
double_t get_weight() const
Definition: common_properties_hom_w.h:64
"Callback request event" for use in Device.
Definition: event.h:374
long_t get_delay_steps() const
Return the delay of the connection in steps.
Definition: connection.h:126
Definition: static_connection_hom_w.h:75
void check_connection_(Node &dummy_target, Node &source, Node &target, rport receptor_type)
This function calls check_connection() on the sender to check if the receiver accepts the event type ...
Definition: connection.h:183
const rport invalid_port_
Value for invalid connection port number.
Definition: nest.h:160
Encapsulates information which is sent between Nodes.
Definition: event.h:73
void check_connection(Node &s, Node &t, rport receptor_type, double_t, const CommonPropertiesType &)
Definition: static_connection_hom_w.h:94
void set_weight(weight t)
Set weight of the event.
Definition: event.h:751
Event for electrical currents.
Definition: event.h:420
long_t rport
Connection port number to distinguish incoming connections, also called receiver port.
Definition: nest.h:147
port handles_test_event(CurrentEvent &, rport)
Definition: static_connection_hom_w.h:84
Node * get_target(thread t) const
Definition: connection.h:155
void get_status(DictionaryDatum &d) const
Definition: static_connection_hom_w.h:121
port handles_test_event(DSSpikeEvent &, rport)
Definition: static_connection_hom_w.h:87
void set_delay(delay)
Set the transmission delay of the event.
Definition: event.h:781
port handles_test_event(DoubleDataEvent &, rport)
Definition: static_connection_hom_w.h:86
Connection< targetidentifierT > ConnectionBase
Definition: static_connection_hom_w.h:65
Base class for dummy nodes used in connection testing.
Definition: connection.h:64
CommonPropertiesHomW CommonPropertiesType
Definition: static_connection_hom_w.h:64
Event for firing rate information.
Definition: event.h:387
Exception to be thrown if a status parameter is incomplete or inconsistent.
Definition: exceptions.h:420
port handles_test_event(ConductanceEvent &, rport)
Definition: static_connection_hom_w.h:85
long_t port
Connection port number to distinguis outgoing connections.
Definition: nest.h:155
double double_t
Double precision floating point numbers.
Definition: nest.h:93
void set_weight(double_t)
Definition: static_connection_hom_w.h:115
rport get_rport() const
Definition: connection.h:156
virtual port handles_test_event(SpikeEvent &, rport receptor_type)
Check if the node can handle a particular event and receptor type.
Definition: node.cpp:203
Request data to be logged/logged data to be sent.
Definition: event.h:486
const Name size_of("sizeof")
Connection parameters.
Definition: nest_names.h:259
Definition: event.h:685
port handles_test_event(DSCurrentEvent &, rport)
Definition: static_connection_hom_w.h:88
port handles_test_event(SpikeEvent &, rport)
Check if the node can handle a particular event and receptor type.
Definition: static_connection_hom_w.h:81
Base class for representing connections.
Definition: connection.h:85
Event for spike information.
Definition: event.h:320
Base class for all NEST network objects.
Definition: node.h:96
int_t thread
Thread index type.
Definition: nest.h:133
const double e
Definition: numerics.cpp:62
Class representing a static connection.
Definition: static_connection_hom_w.h:58
Class containing the common properties for all synapses with common weight.
Definition: common_properties_hom_w.h:45
"Callback request event" for use in Device.
Definition: event.h:465
Event for electrical conductances.
Definition: event.h:616
port handles_test_event(RateEvent &, rport)
Definition: static_connection_hom_w.h:82