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

Commits on May 25, 2020

  1. Updated to latest xptools

    azonenberg committed May 25, 2020
    Copy the full SHA
    bb56e70 View commit details
  2. Copy the full SHA
    e04e0a0 View commit details
5 changes: 5 additions & 0 deletions scopehal/SCPILxiTransport.cpp
Original file line number Diff line number Diff line change
@@ -90,6 +90,11 @@ SCPILxiTransport::~SCPILxiTransport()
delete[] m_staging_buf;
}

bool SCPILxiTransport::IsConnected()
{
return (m_device != LXI_ERROR);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Actual transport code

1 change: 1 addition & 0 deletions scopehal/SCPILxiTransport.h
Original file line number Diff line number Diff line change
@@ -54,6 +54,7 @@ class SCPILxiTransport : public SCPITransport
virtual void SendRawData(size_t len, const unsigned char* buf);

virtual bool IsCommandBatchingSupported();
virtual bool IsConnected();

TRANSPORT_INITPROC(SCPILxiTransport)

7 changes: 7 additions & 0 deletions scopehal/SCPISocketTransport.cpp
Original file line number Diff line number Diff line change
@@ -61,11 +61,13 @@ SCPISocketTransport::SCPISocketTransport(string args)

if(!m_socket.Connect(m_hostname, m_port))
{
m_socket.Close();
LogError("Couldn't connect to socket\n");
return;
}
if(!m_socket.DisableNagle())
{
m_socket.Close();
LogError("Couldn't disable Nagle\n");
return;
}
@@ -75,6 +77,11 @@ SCPISocketTransport::~SCPISocketTransport()
{
}

bool SCPISocketTransport::IsConnected()
{
return m_socket.IsValid();
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Actual transport code

1 change: 1 addition & 0 deletions scopehal/SCPISocketTransport.h
Original file line number Diff line number Diff line change
@@ -56,6 +56,7 @@ class SCPISocketTransport : public SCPITransport
virtual void SendRawData(size_t len, const unsigned char* buf);

virtual bool IsCommandBatchingSupported();
virtual bool IsConnected();

TRANSPORT_INITPROC(SCPISocketTransport)

1 change: 1 addition & 0 deletions scopehal/SCPITransport.h
Original file line number Diff line number Diff line change
@@ -54,6 +54,7 @@ class SCPITransport
virtual void SendRawData(size_t len, const unsigned char* buf) =0;

virtual bool IsCommandBatchingSupported() =0;
virtual bool IsConnected() =0;

public:
typedef SCPITransport* (*CreateProcType)(std::string args);
7 changes: 7 additions & 0 deletions scopehal/VICPSocketTransport.cpp
Original file line number Diff line number Diff line change
@@ -61,11 +61,13 @@ VICPSocketTransport::VICPSocketTransport(string args)

if(!m_socket.Connect(m_hostname, m_port))
{
m_socket.Close();
LogError("Couldn't connect to socket\n");
return;
}
if(!m_socket.DisableNagle())
{
m_socket.Close();
LogError("Couldn't disable Nagle\n");
return;
}
@@ -75,6 +77,11 @@ VICPSocketTransport::~VICPSocketTransport()
{
}

bool VICPSocketTransport::IsConnected()
{
return m_socket.IsValid();
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Actual transport code

1 change: 1 addition & 0 deletions scopehal/VICPSocketTransport.h
Original file line number Diff line number Diff line change
@@ -56,6 +56,7 @@ class VICPSocketTransport : public SCPITransport
virtual void SendRawData(size_t len, const unsigned char* buf);

virtual bool IsCommandBatchingSupported();
virtual bool IsConnected();

//VICP constant helpers
enum HEADER_OPS
2 changes: 1 addition & 1 deletion xptools