2727* *
2828***********************************************************************************************************************/
2929
30+ /* *
31+ @file
32+ @author Andrew D. Zonenberg
33+ @brief Declaration of TektronixOscilloscope
34+
35+ @ingroup scopedrivers
36+ */
37+
3038#ifndef TektronixOscilloscope_h
3139#define TektronixOscilloscope_h
3240
@@ -39,6 +47,7 @@ class WindowTrigger;
3947
4048/* *
4149 @brief Driver for Tektronix oscilloscopes
50+ @ingroup scopedrivers
4251
4352 Tek scopes appear to adhere strictly to the LXI-style request-response model.
4453 Sending a new command while another is currently executing will result in one or both commands aborting.
@@ -56,6 +65,12 @@ class WindowTrigger;
5665 Prints a status register, not quite sure what this does
5766 ALLEV?
5867 Prints the error log in a somewhat confusing and not-human-readable format
68+
69+ Other gotchas to be aware of: if you send a command that is malformed or the scope is not in the correct state for
70+ (e.g. querying status of a MSO channel when there is no MSO probe connected to that channel), it will be dropped
71+ silently and the scope may hang for a few seconds before processing more commands. Resync after this is difficult.
72+
73+ Just don't do it.
5974 */
6075class TektronixOscilloscope
6176 : public virtual SCPIOscilloscope
@@ -206,9 +221,18 @@ class TektronixOscilloscope
206221 virtual int64_t GetResolutionBandwidth () override ;
207222
208223protected:
224+
225+ // /@brief External trigger
209226 OscilloscopeChannel* m_extTrigChannel;
227+
228+ // /@brief Function generator output
210229 FunctionGeneratorChannel* m_awgChannel;
211230
231+ /* *
232+ @brief Binary waveform header
233+
234+ TODO: link relevant documentation
235+ */
212236 struct mso56_preamble
213237 {
214238 int byte_num;
@@ -249,32 +273,69 @@ class TektronixOscilloscope
249273 bool AcquireDataMSO56 (std::map<int , std::vector<WaveformBase*> >& pending_waveforms);
250274 void DetectProbes ();
251275
252- // hardware analog channel count, independent of LA option etc
276+ // /@brief Hardware analog channel count, independent of LA option etc
253277 unsigned int m_analogChannelCount;
254278
279+ // /@brief Type of probe connected to a hardware channel
255280 enum ProbeType
256281 {
282+ // /@brief Standard high impedance probe
257283 PROBE_TYPE_ANALOG,
284+
285+ // /@brief 250K ohm high bandwidth probe
258286 PROBE_TYPE_ANALOG_250K,
287+
288+ // /@brief Current probe
259289 PROBE_TYPE_ANALOG_CURRENT,
290+
291+ // /@brief 8-bit logic pod
260292 PROBE_TYPE_DIGITAL_8BIT
261293 };
262294
263295 // config cache
296+
297+ // /@brief Cached map of <channel ID, offset>
264298 std::map<size_t , float > m_channelOffsets;
299+
300+ // /@brief Cached map of <channel ID, full scale range>
265301 std::map<size_t , float > m_channelVoltageRanges;
302+
303+ // /@brief Cached map of <channel ID, coupling>
266304 std::map<size_t , OscilloscopeChannel::CouplingType> m_channelCouplings;
305+
306+ // /@brief Cached map of <channel ID, attenuation>
267307 std::map<size_t , double > m_channelAttenuations;
308+
309+ // /@brief Cached map of <channel ID, bandwidth limiter>
268310 std::map<size_t , int > m_channelBandwidthLimits;
311+
312+ // /@brief Cached map of <channel ID, enable flag>
269313 std::map<int , bool > m_channelsEnabled;
314+
315+ // /@brief True if m_triggerChannel is valid, false if out of sync
270316 bool m_triggerChannelValid;
317+
318+ // /@brief Index of the channel selected for triggering
271319 size_t m_triggerChannel;
320+
321+ // /@brief True if m_sampleRate is valid, false if out of sync
272322 bool m_sampleRateValid;
323+
324+ // /@brief Acquisition sample rate, in samples/sec
273325 uint64_t m_sampleRate;
326+
327+ // /@brief True if m_sampleDepth is valid, false if out of sync
274328 bool m_sampleDepthValid;
329+
330+ // /@brief Acquisition memory depth, in samples
275331 uint64_t m_sampleDepth;
332+
333+ // /@brief True if m_triggerOffset is valid, false if out of sync
276334 bool m_triggerOffsetValid;
335+
336+ // /@brief Offset from start of wavefrom to trigger position
277337 int64_t m_triggerOffset;
338+
278339 std::map<size_t , int64_t > m_channelDeskew;
279340 std::map<size_t , ProbeType> m_probeTypes;
280341 std::map<size_t , std::string> m_probeNames;
0 commit comments