ABS SCPI Driver 0.2.0
ABS SCPI driver library
|
Base class for all ABS SCPI comm drivers. More...
#include <CommDriver.h>
Base class for all ABS SCPI comm drivers.
Public Member Functions | |
virtual ErrorCode | Write (std::string_view data, unsigned int timeout_ms) const =0 |
Write data with a timeout. | |
virtual Result< std::string > | ReadLine (unsigned int timeout_ms) const =0 |
Read a line from the device with a timeout. | |
virtual void | SetDeviceID (unsigned int id) |
Set the target device ID. | |
virtual unsigned int | GetDeviceID () const |
Get the target device ID. | |
virtual bool | IsSendOnly () const |
Determines whether a driver is send-only in the average case. | |
|
inlinevirtual |
Get the target device ID.
Not implemented by most drivers.
Reimplemented in SerialDriver.
|
inlinevirtual |
Determines whether a driver is send-only in the average case.
UDP multicast is always send-only, and RS-485 is send-only depending on the device ID.
Reimplemented in SerialDriver, and UdpMcastDriver.
|
pure virtual |
Read a line from the device with a timeout.
[in] | timeout_ms | read timeout in milliseconds |
Implemented in SerialDriver, TcpDriver, UdpDriver, and UdpMcastDriver.
|
inlinevirtual |
Set the target device ID.
Not implemented by most drivers.
[in] | id | the device's serial ID 0-31, or 32+ to broadcast to all devices on the bus |
Reimplemented in SerialDriver.
|
pure virtual |
Write data with a timeout.
The concrete driver type may or may not support a write timeout feature.
[in] | data | data to send |
[in] | timeout_ms | send timeout in milliseconds (may be ignored by some drivers) |
Implemented in SerialDriver, TcpDriver, UdpDriver, and UdpMcastDriver.