From d92707ca48137b47800006a09539470acb4e4d69 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Sat, 5 Mar 2016 17:10:14 +0100 Subject: adding basic tests --- include/stick10_commands.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'include') diff --git a/include/stick10_commands.h b/include/stick10_commands.h index b140e99..ab1a5bb 100644 --- a/include/stick10_commands.h +++ b/include/stick10_commands.h @@ -196,6 +196,10 @@ class GetPasswordRetryCount : Command { uint8_t password_retry_count; bool isValid() const { return true; } + std::string dissect() const { + std::stringstream ss; + ss << " password_retry_count\t" << password_retry_count<< std::endl; + return ss.str(); } } __packed; typedef Transaction @@ -209,6 +213,10 @@ class GetUserPasswordRetryCount uint8_t password_retry_count; bool isValid() const { return true; } + std::string dissect() const { + std::stringstream ss; + ss << " password_retry_count\t" << password_retry_count<< std::endl; + return ss.str(); } } __packed; typedef Transaction @@ -233,12 +241,20 @@ class GetPasswordSafeSlotName : Command { uint8_t slot_number; bool isValid() const { return !(slot_number & 0xF0); } + std::string dissect() const { + std::stringstream ss; + ss << "slot_number\t" << slot_number << std::endl; + return ss.str(); } } __packed; struct ResponsePayload { uint8_t slot_name[PWS_SLOTNAME_LENGTH]; bool isValid() const { return true; } + std::string dissect() const { + std::stringstream ss; + ss << " slot_name\t" << slot_name << std::endl; + return ss.str(); } } __packed; typedef Transaction