2 #include <ne10/NE10_types.h>
7 #define FRAMES_STORED 4
9 #define TRIGGER_LOG_COUNT 16
37 Scope(
unsigned int numChannels,
float sampleRate);
51 void setup(
unsigned int numChannels,
float sampleRate);
61 void log(
double chn1, ...);
71 void log(
const float* values);
94 void triggerTimeDomain();
102 void scope_control_connected();
103 void scope_control_data(
const char* data);
106 bool volatile isUsingOutBuffer;
107 bool volatile isUsingBuffer;
108 bool volatile isResizing;
115 PlotMode plotMode = TIME_DOMAIN;
117 unsigned int triggerChannel;
133 std::vector<float> buffer;
134 std::vector<float> outBuffer;
140 int customTriggerPointer;
144 bool triggerCollecting;
147 int autoTriggerCount;
149 bool customTriggered;
162 ne10_fft_cpx_float32_t* inFFT;
163 ne10_fft_cpx_float32_t* outFFT;
164 ne10_fft_cfg_float32_t cfg;
166 std::unique_ptr<AuxTaskRT> scopeTriggerTask;
169 void setSetting(std::wstring setting,
float value);
171 std::unique_ptr<WSServer> ws_server;
173 std::map<std::wstring, float> settings;
Auto triggering.
Definition: Scope.h:26
void setup(unsigned int numChannels, float sampleRate)
Initialise the scope, setting the number of channels and the sample rate.
Definition: Scope.cpp:48
void log(double chn1,...)
Logs a frame of data to the scope.
Definition: Scope.cpp:159
Definition: AuxTaskRT.h:24
bool trigger()
Cause the scope to trigger when set to custom trigger mode.
Definition: Scope.cpp:206
Trigger on any crossing of the threshold.
Definition: Scope.h:33
Definition: WSServer.h:17
Definition: JSONValue.h:37
Trigger when crossing the threshold and the signal is increasing.
Definition: Scope.h:31
void setTrigger(TriggerMode mode, unsigned int channel=0, TriggerSlope dir=BOTH, float level=0)
Definition: Scope.cpp:473
Trigger when crossing the threshold and the signal is decreasing.
Definition: Scope.h:32
TriggerMode
Definition: Scope.h:25
Normal triggering.
Definition: Scope.h:27
Triggering when calling trigger()
Definition: Scope.h:28
TriggerSlope
Definition: Scope.h:30
An oscilloscope which allows data to be visualised in a browser in real time.
Definition: Scope.h:23