23#ifndef MUSIC_MESSAGE_IN_PROXY_H
24#define MUSIC_MESSAGE_IN_PROXY_H
51void register_music_message_in_proxy(
const std::string& name );
105class MsgHandler :
public MUSIC::MessageHandler
107 std::vector< std::string >
messages;
111 operator()(
double t,
void* msg,
size_t size )
114 messages.push_back( std::string(
static_cast< char*
>( msg ), size ) );
123 dict[ names::message_times ] = std::vector< double >( message_times );
124 d[ names::n_messages ] =
static_cast< long >(
messages.size() );
125 d[ names::data ] = dict;
141class music_message_in_proxy :
public DeviceNode
145 music_message_in_proxy();
146 music_message_in_proxy(
const music_message_in_proxy& );
154 one_node_per_process()
const
163 void init_buffers_();
167 update( Time
const&,
const long,
const long )
176 std::string port_name_;
177 double acceptable_latency_;
186 void set(
const Dictionary&, State_&, Node* );
201 void set(
const Dictionary&,
const Parameters_&, Node* );
208 MsgHandler message_handler_;
215 MUSIC::MessageInputPort* MP_;
227music_message_in_proxy::get_status(
Dictionary& d )
const
232 B_.message_handler_.get_status( d );
236music_message_in_proxy::set_status(
const Dictionary& d )
238 Parameters_ ptmp = P_;
239 ptmp.set( d, S_,
this );
242 stmp.set( d, P_,
this );
249 B_.message_handler_.clear();
253 throw BadProperty(
"n_messaged can only be set to 0." );
Dictionary class for interface to Python and C++ API.
Definition dictionary.h:213
const std::string clear("clear")
const std::string message_times("messages_times")
const std::string messages("messages")
const std::string n_messages("n_messages")
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33
bool update_value_param(Dictionary const &d, const std::string &key, T &value, nest::Node *node)
Obtain value from parameter dictionary including evaluation of random or spatial parameters.
Definition dict_util.h:42