aboutsummaryrefslogtreecommitdiff
path: root/include/device.h
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-07-29 15:15:03 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2016-08-01 13:54:58 +0200
commit5cd264c294ca6f1bf0758bb5fb0b51f3584d2795 (patch)
tree0b53876fbe298999835dc44e50d77696e2dde40f /include/device.h
parent24ad4504648cd3918bb181b1d54a7c3441c02ae0 (diff)
downloadlibnitrokey-5cd264c294ca6f1bf0758bb5fb0b51f3584d2795.tar.gz
libnitrokey-5cd264c294ca6f1bf0758bb5fb0b51f3584d2795.tar.bz2
Set variable send_receive delay
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'include/device.h')
-rw-r--r--include/device.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/device.h b/include/device.h
index 1f6d486..ffc38e5 100644
--- a/include/device.h
+++ b/include/device.h
@@ -10,6 +10,7 @@
namespace nitrokey {
namespace device {
+ using namespace std::chrono_literals;
enum class CommError {
ERR_NO_ERROR = 0,
@@ -25,7 +26,8 @@ enum class DeviceModel{
};
class Device {
- public:
+
+public:
Device();
// lack of device is not actually an error,
@@ -46,6 +48,7 @@ class Device {
int get_retry_count() const { return m_retry_count; };
std::chrono::milliseconds get_retry_timeout() const { return m_retry_timeout; };
+ std::chrono::milliseconds get_send_receive_delay() const {return m_send_receive_delay;}
int get_last_command_status() const;
void set_last_command_status(uint8_t _err) { last_command_status = _err;} ;
@@ -66,6 +69,7 @@ private:
*/
int m_retry_count;
std::chrono::milliseconds m_retry_timeout;
+ std::chrono::milliseconds m_send_receive_delay;
hid_device *mp_devhandle;
};