NEST main@caf0ae8
 
Loading...
Searching...
No Matches
recording_backend.h
Go to the documentation of this file.
1/*
2 * recording_backend.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 RECORDING_BACKEND_H
24#define RECORDING_BACKEND_H
25
26// C++ includes:
27#include <vector>
28
29#include "dictionary.h"
30
31namespace nest
32{
33
34class RecordingDevice;
35class Event;
36
67{
68public:
70 {
71 }
72
73 virtual ~RecordingBackend() throw()
74 {
75 }
76
77 virtual void initialize() = 0;
78 virtual void finalize() = 0;
79
115 virtual void enroll( const RecordingDevice& device, const Dictionary& params ) = 0;
116
132 virtual void disenroll( const RecordingDevice& device ) = 0;
133
152 virtual void set_value_names( const RecordingDevice& device,
153 const std::vector< std::string >& double_value_names,
154 const std::vector< std::string >& long_value_names ) = 0;
155
166 virtual void prepare() = 0;
167
178 virtual void cleanup() = 0;
179
191 virtual void pre_run_hook() = 0;
192
204 virtual void post_run_hook() = 0;
205
216 virtual void post_step_hook() = 0;
217
232 virtual void write( const RecordingDevice& device,
233 const Event& event,
234 const std::vector< double >& double_values,
235 const std::vector< long >& long_values ) = 0;
236
246 virtual void set_status( const Dictionary& params ) = 0;
247
257 virtual void get_status( Dictionary& params ) const = 0;
258
275 virtual void check_device_status( const Dictionary& params ) const = 0;
276
286 virtual void get_device_defaults( Dictionary& params ) const = 0;
287
302 virtual void get_device_status( const RecordingDevice& device, Dictionary& params ) const = 0;
303
304 static const std::vector< std::string > NO_DOUBLE_VALUE_NAMES;
305 static const std::vector< std::string > NO_LONG_VALUE_NAMES;
306 static const std::vector< double > NO_DOUBLE_VALUES;
307 static const std::vector< long > NO_LONG_VALUES;
308};
309
310} // namespace
311
312#endif /* #ifndef RECORDING_BACKEND_H */
Dictionary class for interface to Python and C++ API.
Definition dictionary.h:213
Encapsulate information sent between nodes.
Definition event.h:103
Abstract base class for all NESTio recording backends.
Definition recording_backend.h:67
RecordingBackend()
Definition recording_backend.h:69
static const std::vector< std::string > NO_LONG_VALUE_NAMES
Definition recording_backend.h:305
virtual void post_run_hook()=0
Clean up the backend at the end of a Run.
static const std::vector< std::string > NO_DOUBLE_VALUE_NAMES
Definition recording_backend.h:304
virtual void pre_run_hook()=0
Initialize global backend-specific data structures.
virtual void get_device_status(const RecordingDevice &device, Dictionary &params) const =0
Return the per-device status of the given recording device by writing it to the given params dictiona...
static const std::vector< double > NO_DOUBLE_VALUES
Definition recording_backend.h:306
virtual ~RecordingBackend()
Definition recording_backend.h:73
static const std::vector< long > NO_LONG_VALUES
Definition recording_backend.h:307
virtual void write(const RecordingDevice &device, const Event &event, const std::vector< double > &double_values, const std::vector< long > &long_values)=0
Write the data from the event to the backend specific channel together with the values given.
virtual void cleanup()=0
Clean up the backend at the end of a user level call to the NEST Simulate function.
virtual void get_status(Dictionary &params) const =0
Return the status of the recording backend by writing it to the given params dictionary.
virtual void enroll(const RecordingDevice &device, const Dictionary &params)=0
Enroll a RecordingDevice with the RecordingBackend.
virtual void post_step_hook()=0
Do work required at the end of each simulation step.
virtual void disenroll(const RecordingDevice &device)=0
Disenroll a RecordingDevice from the RecordingBackend.
virtual void prepare()=0
Prepare the backend at begin of the NEST Simulate function.
virtual void check_device_status(const Dictionary &params) const =0
Check if the given per-device properties are valid and usable by the backend.
virtual void get_device_defaults(Dictionary &params) const =0
Return the per-device defaults by writing it to the given params dictionary.
virtual void set_status(const Dictionary &params)=0
Set the status of the recording backend using the key-value pairs contained in the params dictionary.
virtual void set_value_names(const RecordingDevice &device, const std::vector< std::string > &double_value_names, const std::vector< std::string > &long_value_names)=0
To make the names of recorded quantities known to the RecordingBackend, the vectors double_value_name...
virtual void finalize()=0
virtual void initialize()=0
Base class for all recording devices.
Definition recording_device.h:157
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33