38#ifndef CommandLineDriver_h
39#define CommandLineDriver_h
54 std::recursive_mutex m_transportMutex;
81 std::function<
void(
float)>
progress =
nullptr,
119 std::function<
void(
float)>
progress =
nullptr,
129 size_t m_maxResponseSize;
130 double m_communicationTimeout;
133 inline static const std::string TRAILER_STRING =
"ch> ";
135 inline static const size_t TRAILER_STRING_LENGTH = TRAILER_STRING.size();
137 inline static const std::string EOL_STRING =
"\r\n";
139 inline static const size_t EOL_STRING_LENGTH = EOL_STRING.size();
Definition AcceleratorBuffer.h:204
Helper class for command line drivers: provides helper methods for command line based communication w...
Definition CommandLineDriver.h:46
std::string DrainTransport()
Consume any pending data from the transport layer.
Definition CommandLineDriver.cpp:194
std::string ConverseSingle(const std::string &commandString, bool hasEcho=true)
Converse with the device : send a command and read the reply over several lines.
Definition CommandLineDriver.cpp:91
bool ConverseSweep(int64_t &sweepStart, int64_t &sweepStop, bool setFreqValues=false)
Set and/or read the sweep values from the device.
Definition CommandLineDriver.h:103
bool ConverseSweep(int64_t &sweepStart, int64_t &sweepStop, int64_t &points, bool setFreqValues=false)
Set and/or read the sweep values from the device.
Definition CommandLineDriver.cpp:159
size_t ConverseMultiple(const std::string &commandString, std::vector< std::string > &readLines, bool hasEcho=true, std::function< void(float)> progress=nullptr, size_t expecedLines=0)
Converse with the device by sending a command and receiving a single line response.
Definition CommandLineDriver.cpp:58
std::string ConverseString(const std::string &commandString, std::function< void(float)> progress=nullptr, size_t expecedLines=0)
Base method to converse with the device.
Definition CommandLineDriver.cpp:111
An SCPI-based device.
Definition SCPIDevice.h:37
Abstraction of a transport layer for moving SCPI data between endpoints.
Definition SCPITransport.h:53