2 * psychlops_devices_nidaqmxbase.cpp
3 * Psychlops Standard Library (Universal)
5 * Last Modified 2009/04/14 by Kenchi HOSOKAWA
6 * (C) 2009 Kenchi HOSOKAWA, Kazushi MARUYA, Takao SATO
9 #include "../../core/ApplicationInterfaces/psychlops_code_exception.h"
10 #include "../../core/devices/psychlops_io_hid.h"
11 #include "../../core/graphic/psychlops_g_canvas.h"
12 #include "../../core/math/psychlops_math.h"
14 #include "psychlops_devices_util.h"
21 double through(double x) {
26 DisplayFlash::~DisplayFlash() { ; }
\r
27 double DisplayFlash::getLatency() { return 0; }
\r
28 double DisplayFlash::getJitterSD() { return 0; }
\r
29 Interval DisplayFlash::getRange() { Interval i; return 0<=i<=5; }
\r
30 bool DisplayFlash::isAnalog() { return false; }
\r
31 double DisplayFlash::get() { return 0; }
\r
32 void DisplayFlash::put(double v) { Color col(v); draw(col);; }
\r
35 OscillationSimulator::OscillationSimulator()
40 OscillationSimulator::OscillationSimulator(double freq, double amp, double phase)
46 internal_phase = phase;
48 double OscillationSimulator::get()
50 internal_phase += frequency;
51 return amplitude*waveform(internal_phase*2*PI);
55 const double ONESEC = 2.0*PI/1000.0;
56 ClockOscillator::ClockOscillator()
61 ClockOscillator::ClockOscillator(double freq, double amp, double phase)
67 internal_phase = phase;
69 double ClockOscillator::get()
72 return amplitude*waveform(frequency*clock.at_msec()*ONESEC+internal_phase);
77 MouseX::MouseX(const double fac) : factor(fac) {
82 if(Drawable::prime_is_a_canvas()) factor=1.0/Drawable::prime->getWidth();
87 double MouseX::get() {
88 return normalize(factor*Mouse::uniX);
93 } /* <- namespace Psycholops */