diff options
Diffstat (limited to 'test/test-platform/main.cpp')
-rw-r--r-- | test/test-platform/main.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/test-platform/main.cpp b/test/test-platform/main.cpp index 8e2e17c..1cd1594 100644 --- a/test/test-platform/main.cpp +++ b/test/test-platform/main.cpp @@ -26,6 +26,7 @@ #include <semaphore.h> #include "TestPlatform.h" #include <semaphore.h> +#include <stdlib.h> using namespace std; @@ -37,11 +38,13 @@ const char* gpcParameterFrameworkConfigurationFolderPath = "/etc/parameter-frame #endif */ +const int iDefaultPortNumber = 5001; + int main(int argc, char *argv[]) { if (argc < 2) { - cerr << "Missing arguments" << endl; + cerr << "Missing arguments: test-platform <file path> [port number, default " << iDefaultPortNumber << "]" << endl; return -1; } @@ -49,7 +52,7 @@ int main(int argc, char *argv[]) string strError; // Create param mgr - CTestPlatform testPlatform(argv[1]); + CTestPlatform testPlatform(argv[1], argc > 2 ? atoi(argv[2]) : iDefaultPortNumber); // Start platformmgr if (!testPlatform.load(strError)) { |