ngscopeclient v0.2.1
Loading...
Searching...
No Matches
AntikernelLabsSerdesILA8b10b.h
Go to the documentation of this file.
1/***********************************************************************************************************************
2* *
3* libscopehal *
4* *
5* Copyright (c) 2012-2026 Andrew D. Zonenberg and contributors *
6* All rights reserved. *
7* *
8* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the *
9* following conditions are met: *
10* *
11* * Redistributions of source code must retain the above copyright notice, this list of conditions, and the *
12* following disclaimer. *
13* *
14* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the *
15* following disclaimer in the documentation and/or other materials provided with the distribution. *
16* *
17* * Neither the name of the author nor the names of any contributors may be used to endorse or promote products *
18* derived from this software without specific prior written permission. *
19* *
20* THIS SOFTWARE IS PROVIDED BY THE AUTHORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
21* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL *
22* THE AUTHORS BE HELD LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES *
23* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR *
24* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
25* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *
26* POSSIBILITY OF SUCH DAMAGE. *
27* *
28***********************************************************************************************************************/
29
37#ifndef AntikernelLabsSerdesILA8b10b_h
38#define AntikernelLabsSerdesILA8b10b_h
39
40class EdgeTrigger;
41
47 : public virtual SCPIOscilloscope
48{
49public:
52
53 //not copyable or assignable
56
57public:
58 //Device information
59 virtual unsigned int GetInstrumentTypes() const override;
60
61 virtual void FlushConfigCache() override;
62 virtual OscilloscopeChannel* GetExternalTrigger() override;
63
64 //Channel configuration
65 virtual uint32_t GetInstrumentTypesForChannel(size_t i) const override;
66 virtual bool IsChannelEnabled(size_t i) override;
67 virtual void EnableChannel(size_t i) override;
68 virtual void DisableChannel(size_t i) override;
69 virtual OscilloscopeChannel::CouplingType GetChannelCoupling(size_t i) override;
70 virtual void SetChannelCoupling(size_t i, OscilloscopeChannel::CouplingType type) override;
71 virtual std::vector<OscilloscopeChannel::CouplingType> GetAvailableCouplings(size_t i) override;
72 virtual double GetChannelAttenuation(size_t i) override;
73 virtual void SetChannelAttenuation(size_t i, double atten) override;
74 virtual unsigned int GetChannelBandwidthLimit(size_t i) override;
75 virtual void SetChannelBandwidthLimit(size_t i, unsigned int limit_mhz) override;
76 virtual std::vector<unsigned int> GetChannelBandwidthLimiters(size_t i) override;
77 virtual float GetChannelVoltageRange(size_t i, size_t stream) override;
78 virtual void SetChannelVoltageRange(size_t i, size_t stream, float range) override;
79 virtual float GetChannelOffset(size_t i, size_t stream) override;
80 virtual void SetChannelOffset(size_t i, size_t stream, float offset) override;
81 virtual std::string GetProbeName(size_t i) override;
82
83 //Triggering
84 virtual Oscilloscope::TriggerMode PollTrigger() override;
85 virtual bool AcquireData() override;
86 virtual void Start() override;
87 virtual void StartSingleTrigger() override;
88 virtual void Stop() override;
89 virtual void ForceTrigger() override;
90 virtual bool IsTriggerArmed() override;
91 virtual void PushTrigger() override;
92 virtual void PullTrigger() override;
93
94 //Timebase
95 virtual std::vector<uint64_t> GetSampleRatesNonInterleaved() override;
96 virtual std::vector<uint64_t> GetSampleRatesInterleaved() override;
97 virtual std::set<InterleaveConflict> GetInterleaveConflicts() override;
98 virtual std::vector<uint64_t> GetSampleDepthsNonInterleaved() override;
99 virtual std::vector<uint64_t> GetSampleDepthsInterleaved() override;
100 virtual uint64_t GetSampleRate() override;
101 virtual uint64_t GetSampleDepth() override;
102 virtual void SetSampleDepth(uint64_t depth) override;
103 virtual void SetSampleRate(uint64_t rate) override;
104 virtual void SetTriggerOffset(int64_t offset) override;
105 virtual int64_t GetTriggerOffset() override;
106 virtual bool IsInterleaving() override;
107 virtual bool SetInterleaving(bool combine) override;
108
109protected:
110
112 uint32_t m_memDepth;
113
115 uint64_t m_period;
116
118 uint64_t m_srate;
119
122
123public:
124 //This is intentionally not virtual since it's a static method used by enumeration
125 //cppcheck-suppress duplInheritedMember
126 static std::vector<SCPIInstrumentModel> GetDriverSupportedModels()
127 {
128 return
129 {
130 {"ila", {{ SCPITransportType::TRANSPORT_LAN, "localhost:5025" }}}
131 };
132 }
133
134 static std::string GetDriverNameInternal();
135 OSCILLOSCOPE_INITPROC(AntikernelLabsSerdesILA8b10b)
136};
137
138#endif
139
Protocol analyzer driver for Linux SocketCAN API.
Definition AntikernelLabsSerdesILA8b10b.h:48
virtual unsigned int GetChannelBandwidthLimit(size_t i) override
Gets the bandwidth limit for an input channel.
Definition AntikernelLabsSerdesILA8b10b.cpp:155
virtual void Start() override
Starts the instrument in continuous trigger mode.
Definition AntikernelLabsSerdesILA8b10b.cpp:273
virtual void Stop() override
Stops triggering.
Definition AntikernelLabsSerdesILA8b10b.cpp:287
virtual void SetSampleRate(uint64_t rate) override
Sets the sample rate of the scope, in Hz.
Definition AntikernelLabsSerdesILA8b10b.cpp:348
virtual int64_t GetTriggerOffset() override
Gets the trigger offset.
Definition AntikernelLabsSerdesILA8b10b.cpp:365
virtual bool IsInterleaving() override
Checks if the scope is currently combining channels.
Definition AntikernelLabsSerdesILA8b10b.cpp:372
virtual uint64_t GetSampleRate() override
Gets the current sampling rate (in Hz) of this scope.
Definition AntikernelLabsSerdesILA8b10b.cpp:334
virtual std::vector< unsigned int > GetChannelBandwidthLimiters(size_t i) override
Gets the set of available bandwidth limiters for an input channel.
Definition AntikernelLabsSerdesILA8b10b.cpp:164
virtual void EnableChannel(size_t i) override
Turn a channel on, given the index.
Definition AntikernelLabsSerdesILA8b10b.cpp:118
virtual float GetChannelVoltageRange(size_t i, size_t stream) override
Gets the range of the current channel configuration.
Definition AntikernelLabsSerdesILA8b10b.cpp:170
virtual void SetChannelAttenuation(size_t i, double atten) override
Sets the probe attenuation used for an input channel.
Definition AntikernelLabsSerdesILA8b10b.cpp:146
virtual void SetSampleDepth(uint64_t depth) override
Sets the sample depth of the scope.
Definition AntikernelLabsSerdesILA8b10b.cpp:344
virtual void DisableChannel(size_t i) override
Turn a channel off, given the index.
Definition AntikernelLabsSerdesILA8b10b.cpp:122
virtual std::vector< uint64_t > GetSampleDepthsNonInterleaved() override
Get the legal memory depths for this scope in all-channels mode.
Definition AntikernelLabsSerdesILA8b10b.cpp:322
virtual float GetChannelOffset(size_t i, size_t stream) override
Gets the offset, in volts, for a given channel.
Definition AntikernelLabsSerdesILA8b10b.cpp:179
virtual void PullTrigger() override
Updates m_trigger with any changes made from the instrument side.
Definition AntikernelLabsSerdesILA8b10b.cpp:382
virtual void StartSingleTrigger() override
Arms the trigger for a single acquistion.
Definition AntikernelLabsSerdesILA8b10b.cpp:280
virtual std::vector< uint64_t > GetSampleDepthsInterleaved() override
Get the legal memory depths for this scope in combined-channels mode.
Definition AntikernelLabsSerdesILA8b10b.cpp:329
virtual OscilloscopeChannel::CouplingType GetChannelCoupling(size_t i) override
Gets the coupling used for an input channel.
Definition AntikernelLabsSerdesILA8b10b.cpp:132
virtual OscilloscopeChannel * GetExternalTrigger() override
Returns the external trigger input channel, if we have one.
Definition AntikernelLabsSerdesILA8b10b.cpp:108
virtual void SetChannelVoltageRange(size_t i, size_t stream, float range) override
Sets the range of the current channel configuration.
Definition AntikernelLabsSerdesILA8b10b.cpp:175
uint64_t m_period
Sample period, in fs.
Definition AntikernelLabsSerdesILA8b10b.h:115
uint32_t m_memDepth
Memory depth.
Definition AntikernelLabsSerdesILA8b10b.h:112
virtual uint64_t GetSampleDepth() override
Gets the current sample depth of this scope.
Definition AntikernelLabsSerdesILA8b10b.cpp:339
virtual void PushTrigger() override
Pushes changes made to m_trigger to the instrument.
Definition AntikernelLabsSerdesILA8b10b.cpp:408
virtual void SetChannelOffset(size_t i, size_t stream, float offset) override
Sets the offset for a given channel.
Definition AntikernelLabsSerdesILA8b10b.cpp:184
virtual std::vector< uint64_t > GetSampleRatesInterleaved() override
Get the legal sampling rates (in Hz) for this scope in combined-channels mode.
Definition AntikernelLabsSerdesILA8b10b.cpp:311
virtual bool IsTriggerArmed() override
Checks if the trigger is currently armed.
Definition AntikernelLabsSerdesILA8b10b.cpp:299
virtual void FlushConfigCache() override
Instruments are allowed to cache configuration settings to reduce round trip queries to the device.
Definition AntikernelLabsSerdesILA8b10b.cpp:104
virtual void SetChannelCoupling(size_t i, OscilloscopeChannel::CouplingType type) override
Sets the coupling used for an input channel.
Definition AntikernelLabsSerdesILA8b10b.cpp:137
uint64_t m_srate
Sample rate, in Hz.
Definition AntikernelLabsSerdesILA8b10b.h:118
virtual bool AcquireData() override
Pull data from the instrument.
Definition AntikernelLabsSerdesILA8b10b.cpp:204
virtual unsigned int GetInstrumentTypes() const override
Returns a bitfield describing the set of instrument types that this instrument supports.
Definition AntikernelLabsSerdesILA8b10b.cpp:91
virtual bool IsChannelEnabled(size_t i) override
Checks if a channel is enabled in hardware.
Definition AntikernelLabsSerdesILA8b10b.cpp:113
virtual void SetTriggerOffset(int64_t offset) override
Sets the trigger offset.
Definition AntikernelLabsSerdesILA8b10b.cpp:353
static std::string GetDriverNameInternal()
Return the constant driver name.
Definition AntikernelLabsSerdesILA8b10b.cpp:86
virtual std::string GetProbeName(size_t i) override
Returns the name of the probe connected to the scope, if possible.
Definition AntikernelLabsSerdesILA8b10b.cpp:150
virtual Oscilloscope::TriggerMode PollTrigger() override
Checks the curent trigger status.
Definition AntikernelLabsSerdesILA8b10b.cpp:190
virtual void SetChannelBandwidthLimit(size_t i, unsigned int limit_mhz) override
Sets the bandwidth limit for an input channel.
Definition AntikernelLabsSerdesILA8b10b.cpp:160
virtual std::vector< uint64_t > GetSampleRatesNonInterleaved() override
Get the legal sampling rates (in Hz) for this scope in all-channels mode.
Definition AntikernelLabsSerdesILA8b10b.cpp:304
virtual std::vector< OscilloscopeChannel::CouplingType > GetAvailableCouplings(size_t i) override
Gets the set of legal coupling values for an input channel.
Definition AntikernelLabsSerdesILA8b10b.cpp:126
virtual double GetChannelAttenuation(size_t i) override
Gets the probe attenuation for an input channel.
Definition AntikernelLabsSerdesILA8b10b.cpp:141
virtual void ForceTrigger() override
Forces a single acquisition as soon as possible.
Definition AntikernelLabsSerdesILA8b10b.cpp:294
virtual uint32_t GetInstrumentTypesForChannel(size_t i) const override
Returns a bitfield describing the set of instrument types that a given channel supports.
Definition AntikernelLabsSerdesILA8b10b.cpp:96
uint32_t m_triggerWordPosition
Trigger position.
Definition AntikernelLabsSerdesILA8b10b.h:121
virtual bool SetInterleaving(bool combine) override
Configures the scope to combine channels.
Definition AntikernelLabsSerdesILA8b10b.cpp:377
Simple edge trigger.
Definition EdgeTrigger.h:44
A single channel on an oscilloscope.
Definition OscilloscopeChannel.h:49
TriggerMode
Definition Oscilloscope.h:398
An SCPI-based oscilloscope.
Definition SCPIOscilloscope.h:38
Abstraction of a transport layer for moving SCPI data between endpoints.
Definition SCPITransport.h:53