Provides connection to the device via computer's USB port. More...
#include <cyberatom.hpp>
Public Member Functions | |
| UsbConnection () | |
| UsbConnection (const char *serialNumber) | |
| Connects to USB device that has specific serial number. More... | |
| virtual void | sendMessage (uint8_t code, const uint8_t *payload, size_t len) override |
| virtual void | checkForMessages (IDevice &receiver) override |
Static Public Member Functions | |
| static std::vector< std::string > | enumerateDevices () |
Provides connection to the device via computer's USB port.
Construction of this class automatically opens connection to CyberAtom USB device. The connection is closed when the object is deleted (released).
| cyberatom::UsbConnection::UsbConnection | ( | ) |
| DeviceNotFoundException | |
| CannotOpenDeviceException |
| cyberatom::UsbConnection::UsbConnection | ( | const char * | serialNumber | ) |
Connects to USB device that has specific serial number.
| serialNumber | A serial number of the USB device to connect to. |
| DeviceNotFoundException | |
| CannotOpenDeviceException |
|
overridevirtual |
| code | |
| payload | |
| len |
Implements cyberatom::IConnection.