Dummy SCPITransport for demo scope etc.
More...
#include <SCPINullTransport.h>
|
|
| SCPINullTransport (const std::string &args) |
| |
| virtual std::string | GetConnectionString () override |
| |
| virtual bool | SendCommand (const std::string &cmd) override |
| |
| virtual std::string | ReadReply (bool endOnSemicolon=true, std::function< void(float)> progress=nullptr) override |
| |
| virtual size_t | ReadRawData (size_t len, unsigned char *buf, std::function< void(float)> progress=nullptr) override |
| |
| virtual void | SendRawData (size_t len, const unsigned char *buf) override |
| |
| virtual bool | IsCommandBatchingSupported () override |
| |
| virtual bool | IsConnected () override |
| |
|
virtual std::string | GetName ()=0 |
| |
| virtual bool | SetTimeouts (unsigned int txUs, unsigned int rxUs) |
| | Base implementation does nothing.
|
| |
| void | SendCommandQueued (const std::string &cmd) |
| | Pushes a command into the transmit FIFO then returns immediately.
|
| |
| std::string | SendCommandQueuedWithReply (const std::string &cmd, bool endOnSemicolon=true) |
| | Sends a command (flushing any pending/queued commands first), then returns the response.
|
| |
|
void | SendCommandImmediate (const std::string &cmd) |
| | Sends a command (jumping ahead of the queue) which does not require a response.
|
| |
| std::string | SendCommandImmediateWithReply (const std::string &cmd, bool endOnSemicolon=true) |
| | Sends a command (jumping ahead of the queue), then returns the response.
|
| |
|
void * | SendCommandImmediateWithRawBlockReply (const std::string &cmd, size_t &len) |
| | Sends a command (jumping ahead of the queue) which reads a binary block response.
|
| |
|
bool | FlushCommandQueue () |
| | Pushes all pending commands from SendCommandQueued() calls and blocks until they are all sent.
|
| |
|
std::recursive_mutex & | GetMutex () |
| |
|
virtual void | FlushRXBuffer (void) |
| |
| void | EnableRateLimiting (std::chrono::milliseconds interval) |
| | Enables rate limiting. Rate limiting is only applied to the queued command API.
|
| |
| void | DeduplicateCommand (const std::string &cmd) |
| | Adds a command to the set of commands which may be deduplicated in the queue.
|
| |
|
|
std::string | m_args |
| |
|
std::mutex | m_queueMutex |
| |
|
std::recursive_mutex | m_netMutex |
| |
|
std::list< std::string > | m_txQueue |
| |
|
std::set< std::string > | m_dedupCommands |
| |
|
bool | m_rateLimitingEnabled |
| |
|
std::chrono::system_clock::time_point | m_nextCommandReady |
| |
|
std::chrono::milliseconds | m_rateLimitingInterval |
| |
|
|
typedef SCPITransport *(* | CreateProcType) (const std::string &args) |
| |
|
typedef std::vector< TransportEndpoint >(* | EnumEndpointsProcType) () |
| |
|
typedef std::map< std::string, CreateProcType > | CreateMapType |
| |
|
typedef std::map< std::string, EnumEndpointsProcType > | EnumEndpointsMapType |
| |
|
void | RateLimitingWait () |
| | Block until it's time to send the next command when rate limiting.
|
| |
|
static CreateMapType | m_createprocs |
| |
|
static EnumEndpointsMapType | m_enumEndpointsProcs |
| |
Dummy SCPITransport for demo scope etc.
◆ GetConnectionString()
| string SCPINullTransport::GetConnectionString |
( |
| ) |
|
|
overridevirtual |
◆ IsCommandBatchingSupported()
| bool SCPINullTransport::IsCommandBatchingSupported |
( |
| ) |
|
|
overridevirtual |
◆ IsConnected()
| bool SCPINullTransport::IsConnected |
( |
| ) |
|
|
overridevirtual |
◆ ReadRawData()
◆ ReadReply()
◆ SendCommand()
| bool SCPINullTransport::SendCommand |
( |
const std::string & |
cmd | ) |
|
|
overridevirtual |
◆ SendRawData()
The documentation for this class was generated from the following files: