NEST  2.6.0,not_revisioned_source_dir@0
pseudo_recording_device.h
Go to the documentation of this file.
1 /*
2  * pseudo_recording_device.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 PSEUDO_RECORDING_DEVICE_H
24 #define PSEUDO_RECORDING_DEVICE_H
25 
26 #include "nest.h"
27 #include "dictdatum.h"
28 #include "dictutils.h"
29 #include "lockptr.h"
30 #include "device.h"
31 
32 #include <vector>
33 #include <fstream>
34 
35 namespace nest {
36 
37  /*BeginDocumentation
38  Name: PseudoRecordingDevice - Common properties of all pseudo-recording devices.
39  Description:
40 
41  Pseudo recording devices are used to measure properties of or signals emitted
42  by network nodes. In contrast to fully flegded recording devices, they only
43  register data in memory, but do not write data to file or screen.
44 
45  Parameters:
46  The following parameters are shared with all devices:
47  /start - Actication time, relative to origin.
48  /stop - Inactivation time, relative to origin.
49  /origin - Reference time for start and stop.
50 
51  SeeAlso: Device, StimulatingDevice, RecordingDevice
52  */
53 
54 
73  class PseudoRecordingDevice : public Device
74  {
75 
76  public:
80 
85  bool is_active(Time const & T) const;
86  };
87 
88  inline
90  : Device()
91  {}
92 
93  inline
95  : Device(prd)
96  {}
97 
98  inline
99  bool PseudoRecordingDevice::is_active(Time const & T) const
100  {
101  const long_t stamp = T.get_steps();
102 
103  return get_t_min_() < stamp && stamp <= get_t_max_();
104  }
105 
106 } // namespace
107 
108 #endif // PSEUDO_RECORDING_DEVICE_H
bool is_active(Time const &T) const
Indicate if recording device is active.
Definition: pseudo_recording_device.h:99
Base class for all pseudo recording devices.
Definition: pseudo_recording_device.h:73
delay get_steps() const
Definition: nest_time.h:395
PseudoRecordingDevice()
Definition: pseudo_recording_device.h:89
Class implementing common interface and properties common for all devices.
Definition: device.h:94
virtual ~PseudoRecordingDevice()
Definition: pseudo_recording_device.h:79
Definition: nest_time.h:130
long_t get_t_max_() const
Return upper limit in steps.
Definition: device.h:246
long_t get_t_min_() const
Return lower limit in steps.
Definition: device.h:240
Default types used by the NEST kernel.
long long_t
Integer number with at least 32 bit.
Definition: nest.h:96