pldmtool : Add retry option `-n` or `--retry-count`

Add `-n` or `--retry-count` option to support resendinng the PLDM
message when the sendRecvMsg method of pldm transport handler is
failed.

Tested:
1. When the option `-n` or `--retry-count` is included in pldmtool
command and the pldm message keeps be failed. pldmtool will retry to
send PLDM message `-n` times after first failure.

Signed-off-by: ThuBaNguyen <thu@os.amperecomputing.com>
Change-Id: I2c3d5e1514ead5a1f2eea6eb43178d45439788f8
diff --git a/pldmtool/pldm_cmd_helper.hpp b/pldmtool/pldm_cmd_helper.hpp
index 2488135..7b8c7a9 100644
--- a/pldmtool/pldm_cmd_helper.hpp
+++ b/pldmtool/pldm_cmd_helper.hpp
@@ -85,6 +85,8 @@
     {
         app->add_option("-m,--mctp_eid", mctp_eid, "MCTP endpoint ID");
         app->add_flag("-v, --verbose", pldmVerbose);
+        app->add_option("-n, --retry-count", numRetries,
+                        "Number of retry when PLDM request message is failed");
         app->callback([&]() { exec(); });
     }
 
@@ -139,6 +141,7 @@
   protected:
     uint8_t instanceId;
     pldm::InstanceIdDb instanceIdDb;
+    uint8_t numRetries = 0;
 };
 
 } // namespace helper