mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Added error checking and removed some redundancy from device isOpen()
This commit is contained in:
@@ -32,6 +32,7 @@ public:
|
||||
|
||||
bool open();
|
||||
bool close();
|
||||
bool isOpen();
|
||||
virtual void spawnThreads();
|
||||
virtual void joinThreads();
|
||||
bool rawWrite(const std::vector<uint8_t>& bytes) { return impl->write(bytes); }
|
||||
@@ -62,8 +63,6 @@ protected:
|
||||
std::atomic<bool> closing{false};
|
||||
|
||||
private:
|
||||
bool isOpen = false;
|
||||
|
||||
std::thread readTaskThread;
|
||||
void readTask();
|
||||
};
|
||||
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
virtual bool open();
|
||||
virtual bool close();
|
||||
virtual bool isOnline() const { return online; }
|
||||
virtual bool isOpen() const { return opened; }
|
||||
virtual bool isOpen() const { return com->isOpen(); }
|
||||
virtual bool goOnline();
|
||||
virtual bool goOffline();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user