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: 0c940dcdcfad
Choose a base ref
...
head repository: ngscopeclient/scopehal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1cfc782f2c13
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Dec 13, 2019

  1. LeCroy / R&S: commented out a bunch of unused parameters and added wa…

    …rnings when calling incomplete portions of driver
    azonenberg committed Dec 13, 2019
    Copy the full SHA
    1cfc782 View commit details
Showing with 77 additions and 23 deletions.
  1. +34 −13 scopehal/LeCroyOscilloscope.cpp
  2. +43 −10 scopehal/RohdeSchwarzOscilloscope.cpp
47 changes: 34 additions & 13 deletions scopehal/LeCroyOscilloscope.cpp
Original file line number Diff line number Diff line change
@@ -44,9 +44,9 @@ LeCroyOscilloscope::LeCroyOscilloscope(string hostname, unsigned short port)
, m_hasLA(false)
, m_hasDVM(false)
, m_hasFunctionGen(false)
, m_highDefinition(false)
, m_triggerArmed(false)
, m_triggerOneShot(false)
, m_highDefinition(false)
{
}

@@ -392,7 +392,7 @@ OscilloscopeChannel::CouplingType LeCroyOscilloscope::GetChannelCoupling(size_t
return OscilloscopeChannel::COUPLE_SYNTHETIC;
}

void LeCroyOscilloscope::SetChannelCoupling(size_t i, OscilloscopeChannel::CouplingType type)
void LeCroyOscilloscope::SetChannelCoupling(size_t /*i*/, OscilloscopeChannel::CouplingType /*type*/)
{
//FIXME
}
@@ -412,7 +412,7 @@ double LeCroyOscilloscope::GetChannelAttenuation(size_t i)
return d;
}

void LeCroyOscilloscope::SetChannelAttenuation(size_t i, double atten)
void LeCroyOscilloscope::SetChannelAttenuation(size_t /*i*/, double /*atten*/)
{
//FIXME
}
@@ -616,11 +616,6 @@ void LeCroyOscilloscope::SetMeterMode(Multimeter::MeasurementTypes type)
string stype;
switch(type)
{
//not implemented, disable
case Multimeter::AC_CURRENT:
case Multimeter::DC_CURRENT:
return;

case Multimeter::DC_VOLTAGE:
stype = "DC";
break;
@@ -636,6 +631,14 @@ void LeCroyOscilloscope::SetMeterMode(Multimeter::MeasurementTypes type)
case Multimeter::FREQUENCY:
stype = "Frequency";
break;

//not implemented, disable
case Multimeter::AC_CURRENT:
case Multimeter::DC_CURRENT:
case Multimeter::TEMPERATURE:
LogWarning("unsupported multimeter mode\n");
return;

}

char cmd[128];
@@ -661,6 +664,8 @@ string LeCroyOscilloscope::GetFunctionChannelName(int /*chan*/)

bool LeCroyOscilloscope::GetFunctionChannelActive(int /*chan*/)
{
LogWarning("LeCroyOscilloscope::GetFunctionChannelActive unimplemented\n");
return false;
}

void LeCroyOscilloscope::SetFunctionChannelActive(int /*chan*/, bool on)
@@ -675,36 +680,44 @@ void LeCroyOscilloscope::SetFunctionChannelActive(int /*chan*/, bool on)
float LeCroyOscilloscope::GetFunctionChannelDutyCycle(int /*chan*/)
{
//app.wavesource.dutycycle
LogWarning("LeCroyOscilloscope::GetFunctionChannelDutyCycle unimplemented\n");
return false;
}

void LeCroyOscilloscope::SetFunctionChannelDutyCycle(int /*chan*/, float duty)
void LeCroyOscilloscope::SetFunctionChannelDutyCycle(int /*chan*/, float /*duty*/)
{
//app.wavesource.dutycycle
}

float LeCroyOscilloscope::GetFunctionChannelAmplitude(int /*chan*/)
{
//app.wavesource.amplitude
LogWarning("LeCroyOscilloscope::GetFunctionChannelAmplitude unimplemented\n");
return 0;
}

void LeCroyOscilloscope::SetFunctionChannelAmplitude(int /*chan*/, float amplitude)
void LeCroyOscilloscope::SetFunctionChannelAmplitude(int /*chan*/, float /*amplitude*/)
{
//app.wavesource.amplitude
}

float LeCroyOscilloscope::GetFunctionChannelOffset(int /*chan*/)
{
//app.wavesource.offset
LogWarning("LeCroyOscilloscope::GetFunctionChannelOffset unimplemented\n");
return 0;
}

void LeCroyOscilloscope::SetFunctionChannelOffset(int /*chan*/, float offset)
void LeCroyOscilloscope::SetFunctionChannelOffset(int /*chan*/, float /*offset*/)
{
//app.wavesource.offset
}

float LeCroyOscilloscope::GetFunctionChannelFrequency(int /*chan*/)
{
//app.wavesource.frequency
LogWarning("LeCroyOscilloscope::GetFunctionChannelFrequency unimplemented\n");
return 0;
}

void LeCroyOscilloscope::SetFunctionChannelFrequency(int /*chan*/, float hz)
@@ -718,16 +731,21 @@ void LeCroyOscilloscope::SetFunctionChannelFrequency(int /*chan*/, float hz)
FunctionGenerator::WaveShape LeCroyOscilloscope::GetFunctionChannelShape(int /*chan*/)
{
//app.wavesource.shape

LogWarning("LeCroyOscilloscope::GetFunctionChannelShape unimplemented\n");
return FunctionGenerator::SHAPE_SINE;
}

void LeCroyOscilloscope::SetFunctionChannelShape(int /*chan*/, WaveShape shape)
void LeCroyOscilloscope::SetFunctionChannelShape(int /*chan*/, WaveShape /*shape*/)
{
//app.wavesource.shape
}

float LeCroyOscilloscope::GetFunctionChannelRiseTime(int /*chan*/)
{
//app.wavesource.risetime
LogWarning("LeCroyOscilloscope::GetFunctionChannelRiseTime unimplemented\n");
return 0;
}

void LeCroyOscilloscope::SetFunctionChannelRiseTime(int /*chan*/, float sec)
@@ -741,6 +759,8 @@ void LeCroyOscilloscope::SetFunctionChannelRiseTime(int /*chan*/, float sec)
float LeCroyOscilloscope::GetFunctionChannelFallTime(int /*chan*/)
{
//app.wavesource.falltime
LogWarning("LeCroyOscilloscope::GetFunctionChannelFallTime unimplemented\n");
return 0;
}

void LeCroyOscilloscope::SetFunctionChannelFallTime(int /*chan*/, float sec)
@@ -1353,9 +1373,10 @@ double LeCroyOscilloscope::GetChannelOffset(size_t i)
return offset;
}

void LeCroyOscilloscope::SetChannelOffset(size_t i, double offset)
void LeCroyOscilloscope::SetChannelOffset(size_t /*i*/, double /*offset*/)
{
//TODO
LogWarning("LeCroyOscilloscope::SetChannelOffset unimplemented\n");
}

double LeCroyOscilloscope::GetChannelVoltageRange(size_t i)
53 changes: 43 additions & 10 deletions scopehal/RohdeSchwarzOscilloscope.cpp
Original file line number Diff line number Diff line change
@@ -228,6 +228,12 @@ OscilloscopeChannel::CouplingType RohdeSchwarzOscilloscope::GetChannelCoupling(s
return OscilloscopeChannel::COUPLE_GND;
else if(reply == "DC")
return OscilloscopeChannel::COUPLE_DC_50;

else
{
LogWarning("invalid coupling value\n");
return OscilloscopeChannel::COUPLE_DC_50;
}
}

void RohdeSchwarzOscilloscope::SetChannelCoupling(size_t i, OscilloscopeChannel::CouplingType type)
@@ -256,7 +262,7 @@ void RohdeSchwarzOscilloscope::SetChannelCoupling(size_t i, OscilloscopeChannel:
}
}

double RohdeSchwarzOscilloscope::GetChannelAttenuation(size_t i)
double RohdeSchwarzOscilloscope::GetChannelAttenuation(size_t /*i*/)
{
/*
lock_guard<recursive_mutex> lock(m_mutex);
@@ -268,14 +274,19 @@ double RohdeSchwarzOscilloscope::GetChannelAttenuation(size_t i)
sscanf(reply.c_str(), "%lf", &atten);
return atten;
*/

LogWarning("RohdeSchwarzOscilloscope::GetChannelAttenuation unimplemented\n");
return 1;
}

void RohdeSchwarzOscilloscope::SetChannelAttenuation(size_t i, double atten)
void RohdeSchwarzOscilloscope::SetChannelAttenuation(size_t /*i*/, double /*atten*/)
{
//FIXME

LogWarning("RohdeSchwarzOscilloscope::SetChannelAttenuation unimplemented\n");
}

int RohdeSchwarzOscilloscope::GetChannelBandwidthLimit(size_t i)
int RohdeSchwarzOscilloscope::GetChannelBandwidthLimit(size_t /*i*/)
{
/*
lock_guard<recursive_mutex> lock(m_mutex);
@@ -287,11 +298,14 @@ int RohdeSchwarzOscilloscope::GetChannelBandwidthLimit(size_t i)
else
return 0;
*/

LogWarning("RohdeSchwarzOscilloscope::GetChannelBandwidthLimit unimplemented\n");
return 0;
}

void RohdeSchwarzOscilloscope::SetChannelBandwidthLimit(size_t i, unsigned int limit_mhz)
void RohdeSchwarzOscilloscope::SetChannelBandwidthLimit(size_t /*i*/, unsigned int /*limit_mhz*/)
{
//FIXME
LogWarning("RohdeSchwarzOscilloscope::SetChannelBandwidthLimit unimplemented\n");
}

double RohdeSchwarzOscilloscope::GetChannelVoltageRange(size_t i)
@@ -314,14 +328,16 @@ double RohdeSchwarzOscilloscope::GetChannelVoltageRange(size_t i)
return range;
}

void RohdeSchwarzOscilloscope::SetChannelVoltageRange(size_t i, double range)
void RohdeSchwarzOscilloscope::SetChannelVoltageRange(size_t /*i*/, double /*range*/)
{
//FIXME
LogWarning("RohdeSchwarzOscilloscope::SetChannelVoltageRange unimplemented\n");
}

OscilloscopeChannel* RohdeSchwarzOscilloscope::GetExternalTrigger()
{
//FIXME
LogWarning("RohdeSchwarzOscilloscope::GetExternalTrigger unimplemented\n");
return NULL;
}

@@ -347,14 +363,16 @@ double RohdeSchwarzOscilloscope::GetChannelOffset(size_t i)
return offset;
}

void RohdeSchwarzOscilloscope::SetChannelOffset(size_t i, double offset)
void RohdeSchwarzOscilloscope::SetChannelOffset(size_t /*i*/, double /*offset*/)
{
//FIXME
LogWarning("RohdeSchwarzOscilloscope::SetChannelOffset unimplemented\n");
}

void RohdeSchwarzOscilloscope::ResetTriggerConditions()
{
//FIXME
LogWarning("RohdeSchwarzOscilloscope::ResetTriggerConditions unimplemented\n");
}

Oscilloscope::TriggerMode RohdeSchwarzOscilloscope::PollTrigger()
@@ -537,9 +555,10 @@ size_t RohdeSchwarzOscilloscope::GetTriggerChannelIndex()
}
}

void RohdeSchwarzOscilloscope::SetTriggerChannelIndex(size_t i)
void RohdeSchwarzOscilloscope::SetTriggerChannelIndex(size_t /*i*/)
{
//FIXME
LogWarning("RohdeSchwarzOscilloscope::SetTriggerChannelIndex unimplemented\n");
}

float RohdeSchwarzOscilloscope::GetTriggerVoltage()
@@ -561,57 +580,71 @@ float RohdeSchwarzOscilloscope::GetTriggerVoltage()
return level;
}

void RohdeSchwarzOscilloscope::SetTriggerVoltage(float v)
void RohdeSchwarzOscilloscope::SetTriggerVoltage(float /*v*/)
{
//FIXME
LogWarning("RohdeSchwarzOscilloscope::SetTriggerVoltage unimplemented\n");
}

Oscilloscope::TriggerType RohdeSchwarzOscilloscope::GetTriggerType()
{
//FIXME
LogWarning("RohdeSchwarzOscilloscope::GetTriggerType unimplemented\n");
return Oscilloscope::TRIGGER_TYPE_RISING;
}

void RohdeSchwarzOscilloscope::SetTriggerType(Oscilloscope::TriggerType type)
void RohdeSchwarzOscilloscope::SetTriggerType(Oscilloscope::TriggerType /*type*/)
{
//FIXME
LogWarning("RohdeSchwarzOscilloscope::SetTriggerType unimplemented\n");
}

void RohdeSchwarzOscilloscope::SetTriggerForChannel(OscilloscopeChannel* /*channel*/, vector<TriggerType> /*triggerbits*/)
{
//unimplemented, no LA support
LogWarning("RohdeSchwarzOscilloscope::SetTriggerForChannel unimplemented\n");
}

vector<uint64_t> RohdeSchwarzOscilloscope::GetSampleRatesNonInterleaved()
{
LogWarning("RohdeSchwarzOscilloscope::GetSampleRatesNonInterleaved unimplemented\n");

//FIXME
vector<uint64_t> ret;
return ret;
}

vector<uint64_t> RohdeSchwarzOscilloscope::GetSampleRatesInterleaved()
{
LogWarning("RohdeSchwarzOscilloscope::GetSampleRatesInterleaved unimplemented\n");

//FIXME
vector<uint64_t> ret;
return ret;
}

set<Oscilloscope::InterleaveConflict> RohdeSchwarzOscilloscope::GetInterleaveConflicts()
{
LogWarning("RohdeSchwarzOscilloscope::GetInterleaveConflicts unimplemented\n");

//FIXME
set<Oscilloscope::InterleaveConflict> ret;
return ret;
}

vector<uint64_t> RohdeSchwarzOscilloscope::GetSampleDepthsNonInterleaved()
{
LogWarning("RohdeSchwarzOscilloscope::GetSampleDepthsNonInterleaved unimplemented\n");

//FIXME
vector<uint64_t> ret;
return ret;
}

vector<uint64_t> RohdeSchwarzOscilloscope::GetSampleDepthsInterleaved()
{
LogWarning("RohdeSchwarzOscilloscope::GetSampleDepthsInterleaved unimplemented\n");

//FIXME
vector<uint64_t> ret;
return ret;