diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2016-07-23 13:45:53 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2016-08-01 13:54:56 +0200 |
commit | 6eec45d9f1dfdfc14d9f5b3ef9f6de03b4277b85 (patch) | |
tree | 26c9cf1a797cda53a8bffe05a1d5fcda473cb742 /include | |
parent | 1fa8a10d3baeebbec58f09203482fb0e8b84db15 (diff) | |
download | libnitrokey-6eec45d9f1dfdfc14d9f5b3ef9f6de03b4277b85.tar.gz libnitrokey-6eec45d9f1dfdfc14d9f5b3ef9f6de03b4277b85.tar.bz2 |
Allow setting last command status on device
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/device.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/device.h b/include/device.h index 2b51812..c4e2747 100644 --- a/include/device.h +++ b/include/device.h @@ -42,6 +42,13 @@ class Device { int get_retry_count() const { return m_retry_count; }; std::chrono::milliseconds get_retry_timeout() const { return m_retry_timeout; }; + int get_last_command_status() const; + void set_last_command_status(uint8_t _err) { last_command_status = _err;} ; + bool last_command_sucessfull() const {return last_command_status == 0;}; + +private: + uint8_t last_command_status; + protected: uint16_t m_vid; uint16_t m_pid; |