Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ngscopeclient/scopehal
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: fcb75684e7b7
Choose a base ref
...
head repository: ngscopeclient/scopehal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c1098235754f
Choose a head ref
  • 2 commits
  • 12 files changed
  • 1 contributor

Commits on Jun 9, 2020

  1. Copy the full SHA
    a9030dc View commit details
  2. Copy the full SHA
    c109823 View commit details
1 change: 0 additions & 1 deletion scopehal/AgilentOscilloscope.h
Original file line number Diff line number Diff line change
@@ -89,7 +89,6 @@ class AgilentOscilloscope : public SCPIOscilloscope
OscilloscopeChannel* m_extTrigChannel;

//Mutexing for thread safety
std::recursive_mutex m_mutex;
std::recursive_mutex m_cacheMutex;

//hardware analog channel count, independent of LA option etc
1 change: 0 additions & 1 deletion scopehal/AntikernelLabsOscilloscope.h
Original file line number Diff line number Diff line change
@@ -91,7 +91,6 @@ class AntikernelLabsOscilloscope : public SCPIOscilloscope
//OscilloscopeChannel* m_extTrigChannel;

//Mutexing for thread safety
std::recursive_mutex m_mutex;
std::recursive_mutex m_cacheMutex;

//hardware analog channel count, independent of LA option etc
6 changes: 6 additions & 0 deletions scopehal/AntikernelLogicAnalyzer.cpp
Original file line number Diff line number Diff line change
@@ -90,6 +90,12 @@ AntikernelLogicAnalyzer::~AntikernelLogicAnalyzer()

}


string AntikernelLogicAnalyzer::IDPing()
{
return "";
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Information queries

2 changes: 2 additions & 0 deletions scopehal/AntikernelLogicAnalyzer.h
Original file line number Diff line number Diff line change
@@ -44,6 +44,8 @@ class AntikernelLogicAnalyzer
AntikernelLogicAnalyzer(SCPITransport* transport);
virtual ~AntikernelLogicAnalyzer();

virtual std::string IDPing();

virtual std::string GetTransportConnectionString();
virtual std::string GetTransportName();

5 changes: 0 additions & 5 deletions scopehal/LeCroyOscilloscope.h
Original file line number Diff line number Diff line change
@@ -192,10 +192,6 @@ class LeCroyOscilloscope
unsigned int m_analogChannelCount;
unsigned int m_digitalChannelCount;

std::string m_vendor;
std::string m_model;
std::string m_serial;
std::string m_fwVersion;
Model m_modelid;

//set of SW/HW options we have
@@ -229,7 +225,6 @@ class LeCroyOscilloscope
std::vector<OscilloscopeChannel*> m_digitalChannels;

//Mutexing for thread safety
std::recursive_mutex m_mutex;
std::recursive_mutex m_cacheMutex;

public:
5 changes: 5 additions & 0 deletions scopehal/MockOscilloscope.cpp
Original file line number Diff line number Diff line change
@@ -58,6 +58,11 @@ MockOscilloscope::~MockOscilloscope()
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Information queries

string MockOscilloscope::IDPing()
{
return "";
}

string MockOscilloscope::GetTransportName()
{
return "null";
5 changes: 5 additions & 0 deletions scopehal/MockOscilloscope.h
Original file line number Diff line number Diff line change
@@ -42,6 +42,8 @@ class MockOscilloscope : public Oscilloscope
MockOscilloscope(std::string name, std::string vendor, std::string serial);
virtual ~MockOscilloscope();

virtual std::string IDPing();

virtual std::string GetTransportConnectionString();
virtual std::string GetTransportName();

@@ -98,9 +100,12 @@ class MockOscilloscope : public Oscilloscope

protected:
void ArmTrigger();

//standard *IDN? fields
std::string m_name;
std::string m_vendor;
std::string m_serial;
std::string m_fwVersion;

OscilloscopeChannel* m_extTrigger;

9 changes: 9 additions & 0 deletions scopehal/Oscilloscope.h
Original file line number Diff line number Diff line change
@@ -54,6 +54,14 @@ class Oscilloscope : public virtual Instrument
Oscilloscope();
virtual ~Oscilloscope();

/**
@brief Returns the instrument's identification string.
This function MUST NOT CACHE the return value and is safe to use as a barrier synchronization to ensure that
the instrument has received and processed all previous commands.
*/
virtual std::string IDPing() =0;

/**
@brief Instruments are allowed to cache configuration settings to reduce round trip queries to the device.
@@ -439,6 +447,7 @@ class Oscilloscope : public virtual Instrument
typedef std::map<OscilloscopeChannel*, WaveformBase*> SequenceSet;
std::list<SequenceSet> m_pendingWaveforms;
std::mutex m_pendingWaveformsMutex;
std::recursive_mutex m_mutex;

protected:

1 change: 0 additions & 1 deletion scopehal/RigolOscilloscope.h
Original file line number Diff line number Diff line change
@@ -95,7 +95,6 @@ class RigolOscilloscope : public SCPIOscilloscope
OscilloscopeChannel* m_extTrigChannel;

//Mutexing for thread safety
std::recursive_mutex m_mutex;
std::recursive_mutex m_cacheMutex;

//hardware analog channel count, independent of LA option etc
1 change: 0 additions & 1 deletion scopehal/RohdeSchwarzOscilloscope.h
Original file line number Diff line number Diff line change
@@ -90,7 +90,6 @@ class RohdeSchwarzOscilloscope : public SCPIOscilloscope
OscilloscopeChannel* m_extTrigChannel;

//Mutexing for thread safety
std::recursive_mutex m_mutex;
std::recursive_mutex m_cacheMutex;

//hardware analog channel count, independent of LA option etc
7 changes: 7 additions & 0 deletions scopehal/SCPIOscilloscope.cpp
Original file line number Diff line number Diff line change
@@ -48,6 +48,13 @@ SCPIOscilloscope::~SCPIOscilloscope()
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Accessors

string SCPIOscilloscope::IDPing()
{
lock_guard<recursive_mutex> lock(m_mutex);
m_transport->SendCommand("*IDN?");
return m_transport->ReadReply();
}

string SCPIOscilloscope::GetTransportName()
{
return m_transport->GetName();
2 changes: 2 additions & 0 deletions scopehal/SCPIOscilloscope.h
Original file line number Diff line number Diff line change
@@ -40,6 +40,8 @@ class SCPIOscilloscope : public Oscilloscope
SCPIOscilloscope(SCPITransport* transport);
virtual ~SCPIOscilloscope();

virtual std::string IDPing();

virtual std::string GetTransportConnectionString();
virtual std::string GetTransportName();